undo_last_modification
Roll back incorrectly generated code by restoring files to their last committed git state, or deleting untracked files. Also re-syncs the symbol index.
Instructions
Safely roll back incorrectly generated code by restoring a file to its last committed state. If the file is tracked by git, runs git checkout HEAD — this discards ALL uncommitted changes to the file, not just the most recent edit (the "last modification" name is historical). If the file is untracked (newly created), deletes it.
Also re-syncs the symbol/label index to the restored content — prefer this over a manual git revert or editor undo, which leave the index stale and (for .xml/.xpp) can desync the VS 2022 in-memory model.
⚠️ Local companion tool: available only in write-only/local mode (Windows VM).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file to restore to HEAD (or delete, if untracked) |