microsoft / vscode-copilot-release

Feedback on GitHub Copilot Chat UX in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Creative Commons Attribution 4.0 International
322 stars 29 forks source link

Aider like code edit feature #1254

Open cloudbow opened 4 months ago

cloudbow commented 4 months ago

Please provide ability to edit code in the live vscode environment using copilot chat. The edit can go as a new diff to the existing code. And using the git tools I can see the diff. Its a great help than being able to copy the code to the right place.

This is how a tool called aider works. It directly edits code and add the change into the code. we want this functionality to be there in copilot extension as well.

fisforfaheem commented 4 months ago

+1

jrieken commented 4 months ago

@cloudbow Do you know about inline chat (https://code.visualstudio.com/docs/copilot/getting-started-chat#_stay-in-the-flow-with-inline-chat) and iff so how it is different?

cloudbow commented 4 months ago

Inline chat floating window is not a good experience when it comes to seeing the changes made in context of whole file. Inline chat is very clumsy to handle in the sense that we are always afraid if the floating window will close then we will loose changes.Since the window is floating over the existing code,its also confusing what the diff is telling because there is already other code behind it. Why can't we use the standard diff tool of the ide itself instead of creating another floating window? Working copy modification can be done with the input from the copilot. And I can use the standard git diff between working copy and staging repository from the version control plugin itself. Once I am happy with it I can add this code edit to my staging repo by staging it. This is more natural git workflow. And I can keep doing it until I see my staging repo matches the requirements for the feature and then I commit it.

jrieken commented 4 months ago

Since the window is floating over the existing code,its also confusing what the diff is telling because there is already other code behind it.

I hear you but inline chat is actually not floating. After the initial input it's an inset between the lines that sticks around until you close it. I agree that the inline diff, when large, is confusing and we do have an issue to allow to open all current changes as a separate diff editor. Also, you can move an inline conversation into sidebar chat which then renders all changes via the diff editor. All of this is in insiders and next stable, so this my invite to give this another try

cloudbow commented 3 months ago

Thank You! I tested it and liked the feature of direct edit of code in the file itself!