cody
cody copied to clipboard
Track file renamed/moved events
Fixes https://github.com/sourcegraph/jetbrains/issues/2360.
This PR adds missing handling for onDidRenameFiles events.
Test plan
Note: It refers to JB Client.
Test Case 1: File Rename Operation
Setup:
project/
├── src/
│ └── foo.txt
Steps:
- Open
foo.txtin editor - Trigger Cody's "Edit Code" action
- Verify code lenses appear with Accept/Reject buttons
- Use Shift+F6 (or right click / Rename...) to rename
foo.txttobar.txt - Verify:
- Code lenses remain visible after rename
- Accept button successfully dismisses the lenses
- New file path is correctly reflected
Test Case 2: File Move Operation
Setup:
project/
├── src/
│ └── foo.txt
└── dest/
Steps:
- Open
src/foo.txtin editor - Trigger Cody's "Edit Code" action
- Verify code lenses appear with Accept/Reject buttons
- Drag and drop
foo.txtfromsrc/todest/folder - Verify:
- Code lenses remain visible after move
- Accept button successfully dismisses the lenses
- File path updated to reflect new location
Expected Behavior
- Code lenses should remain functional after file operations
- Accept/Reject buttons should work properly
- File path references should be updated in Cody's internal state