microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.31k stars 28.9k forks source link

Inline Diff without "Toggle Changes" on is not showing all deleted lines, can be confusing #231025

Open damienmg opened 3 hours ago

damienmg commented 3 hours ago

Steps to Reproduce:

  1. Ask copilot (Cmd+I) to delete lines
  2. Get a seemingly empty diff
  3. Use the down arrow button, select "Toggle Changes"
  4. See the deleted lines

Shouldn't "Toggle Changes" be the default or at least it be an option to keep it on?

damienmg commented 3 hours ago

(I have a change already to make it on by default FYI)

vs-code-engineering[bot] commented 3 hours ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

damienmg commented 3 hours ago

Hey I cannot easily update to 1.94.2, AFAICT this behavior is still true as https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/inlineChat/common/inlineChat.ts#L107 is still of by default.

I have also look at src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.ts and all the logic related to this behavior seems to haven't changed