cody icon indicating copy to clipboard operation
cody copied to clipboard

Track file renamed/moved events

Open mkondratek opened this issue 11 months ago • 1 comments

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:

  1. Open foo.txt in editor
  2. Trigger Cody's "Edit Code" action
  3. Verify code lenses appear with Accept/Reject buttons
  4. Use Shift+F6 (or right click / Rename...) to rename foo.txt to bar.txt
  5. 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:

  1. Open src/foo.txt in editor
  2. Trigger Cody's "Edit Code" action
  3. Verify code lenses appear with Accept/Reject buttons
  4. Drag and drop foo.txt from src/ to dest/ folder
  5. 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

mkondratek avatar Mar 04 '25 20:03 mkondratek