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
314 stars 28 forks source link

Copilot Chat should directly apply suggestion as edited/new files #95

Open AndyOR-R opened 1 year ago

AndyOR-R commented 1 year ago

At a minimum we need to be able to give copilot access to the working directory and files. I think many developers would like it to have write access as well as just read.

It could help speed up tasks such as making new reports when there are existing reports for copilot to use as a template. Create new files based on what's being discussed etc.

I might be trying to jump a couple of years with the write access, but there's no reason it shouldn't be able to read what is right in front of it.

SirV00lkon commented 1 year ago

This shoul be a must, optional of course, but ready to roll at any moment

NikiLentz commented 1 year ago

I would also love that. Atm it's not able to do some things that intellisense can do, just because it doesn't know even the full open file.(for example "remove unused imports")

NarHakobyan commented 1 year ago

Yeah, I thought it has a access to whole project, but seems it doesn't and also as I can see it's working using gpt-3.5 so it doesn't make sense to use it. ChatGPT plus will work better.

JohannesHoppe commented 1 year ago

I see no reason why I should use Github Copilot Chat, when I have exactly the same user experience on https://chat.openai.com/ It would be a game changer if I could ask it questions regarding the whole codebase.

At least I have Chat GPT-4 there!

Screenshot 2023-05-25 at 13 18 12
TitaniumKnight1 commented 1 year ago

I do appreciate that it is able to access and understand GitHub repositories which allow easy integration but without it being able to read my active files I cannot have it work as efficiently as I need it to. It often forgets what I am referencing so it starts building new code. If it is using GPT-3 it is definitely falling behind however I have yet to see it make horrible mistakes like outdated includes which GPT does quite often.

digitarald commented 1 year ago

Focusing this to the gist of the initial comment, giving Copilot write access.

angrypro commented 1 year ago

From what I understand, today the copilot has the same capacity as ChatGPT with an increase of being able to see the current context of the file that is open.

What I really wanted was to be able to give some commands like:

Copilot should already understand my source, my standards and create a list of new entity files, repository, models, controllers, routes etc and also modify more where necessary like permissions etc.

It could even show a summary of what would be changed first (like a GIT diff for example) and have an "Apply" button.

After confirmation, the change should be applied.

Very close to what Microsoft is doing with the copilot for their tools, but in the entire VSCode project.

mjomble commented 1 year ago

For me, it's not that important to have Copilot be able to edit the file system directly.

I'd be happy with a more powerful version of the "Insert at Cursor" feature, which doesn't have file system access either, but changes code in the editor and lets you save it manually.

For example, I write in the chat panel that I want to refactor the code in a specific way and Copilot responds with something like this:

Make these changes in dir1/file1.ts: (code diff block with an "Apply" button that edits file1.ts instead of inserting a new block of code)

Create new file dir2/file2.ts: (collapsed long code block with an "Apply" button that's similar to "Insert into new file", but associates the new editor with the suggested file path, even if the file doesn't exist yet, so that it will be created after saving)

("Apply all" button)

It would, of course, be nice if I didn't have to manually save each open editor, but if "giving AI direct file system access" turns out to be a major blocker on this issue, I wouldn't mind pressing "Ctrl-K S" myself to do that 😁

AndyOR-R commented 1 year ago

I appreciate how this is coming along. Copilot can sometimes see the file that I have open. Not sure why it doesn't recognize it every time. But that still isn't enough for it to be truly useful. It needs to be able to read the entire project folder. If I'm working on a web application it should already know what files I have in the folder, full awareness of the CSS being used etc. I understand there might need to be a limit on the amount of files/data it can read at any one point. Perhaps as a stepping stone we could just give it read access to all currently open files. Not just the current tab. That would allow us to open the relevant CSS/HTML/TypeScript files so that copilot has a better understanding of what we are currently working on. I've done this with GPT4 by copying and pasting the different files into the chat window and it has been able to reference CSS etc. that it is now aware of. Likewise if I'm working on a NodeJS script I'd like it to at least be able to read the package.json file and know what node modules I'm using. At the moment if I ask it a question about what I'm working on then it just answers it as though it'd dealing with a general question about code. I'd like it to be able to answer within the context of the project.

Really appreciate what you are working towards here. Changing the world ain't easy.

pepijndevos commented 10 months ago

I was really hoping Copilot would help with tedious changes but it really doesn't. I made a commit that I want to apply in a dozen similar places. So I copied the diff into the chat, but it started simply printing what it thought the updated file would look like.

First of all it ran out of message length, secondly it seems like I'd need to manually copy-paste the code and hope for the best.

It seems like inline chat is able to make changes directly but only in a very local way. In this case this is slower than just using autocomplete.

I look forward to the day I can tell copilot to just go and execute a bunch of mechanical changes across the workspace for me.

JohannesHoppe commented 10 months ago

I'm unsubscribing now. You had several months to convince me, but using Chat GPT 4 directly is much more direct and useful. I'm surprised by the low quality of this product. There is literally no advantage or reason to use this plugin.

digitarald commented 10 months ago

As clarification, GPT-4 is used for all chat panel questions since the latest release of Copilot Chat (0.10): https://github.com/microsoft/vscode-copilot-release/issues/6#issuecomment-1789914587

The main idea of this issue, applying chat panel code directly, is being worked on. Meanwhile I recommend Inline Chat to apply Copilot edits directly to a single file.

Wladefant commented 9 months ago

@digitarald what I would suggest is adding some kind of button here image for "smart pasting". So that it uses inline chat to not think what the solutoin should be, but instead pastes in the right way. Because often the code block consists of code from different lines, sometimes with unnecessary definition of classes, which means you have to only select spefcific lines in the code, which amounts to even more work.

TLDR: "Smart" pasting from the sidebar code blocks with the help of inline chat.

kakadais commented 4 months ago

This was not applied yet? To edit the code on the editor directly like the other AI plugin like 'continue' or 'AI Assistant for jetbrains'.

s-nt-s commented 4 weeks ago

Please let me know when github copilot can make bulk changes like "format code", "remove unused imports", "document functions", "add typing", etc.

From what I understand from this issue, this can't be done yet, right?

I'll wait until it can be done to buy the subscription.

riadhnet commented 4 weeks ago

i agree, this would be a powerful thing, otherwise i would copy paste like i do with other ai sites

digitarald commented 3 weeks ago

Hey 👋 subscribers and readers: The July release added a smart action for applying Chat's codeblocks directly to the open file – not for new file or multiple files yet, so I am keeping this issue open, but as we polish the quality of this basic flow, we will explore those.

Image

Please try this out and report feedback (via new issues, please), helping us make this work rock-solid for y'all.