vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Add option to chat without workspace context

Open EwenDC opened this issue 1 year ago • 5 comments

Having a back-and-forth with Copilot is very frustrating due to the lengthly process to collect workspace information (exacerbated by VSCode forcing the "@workspace" context, and the trigger-happiness of the algorithm that determines what to collect). This creates a ~5 second delay before each response that slows down conversation unnecessarily when asking general questions not related to your codebase.

On top of that, it makes Copilot dumber as it unnecessarily prioritises the data it gets from the workspace context over the current chat context. As an example, I was asking Copilot to write a comparator function for sorting arrays in JavaScript. When it responded with a function that only sorted numbers, I asked it to rewrite the function to cover all data types. Rather than pay attention to our chat context, it assumed I must be talking about a random function in a file I had open and started trying to rewrite it. After I restated the prompt about creating a new sorting function, it just parroted back the sorting function in our codebase that I was trying to compare against a Copilot generated implementation.

EwenDC avatar May 27 '24 06:05 EwenDC

It should not be including workspace everytime. Can you include a screen recording. https://gifcap.dev/ is a tool I use to capture screen recordings

lramos15 avatar May 30 '24 18:05 lramos15

Here's me opening a brand new VSCode window, and typing a message without any context. As you can see, the second the message is sent, it gains the @workspace context, and Copilot attempts to scan my workspace. https://github.com/microsoft/vscode-copilot-release/assets/39972488/95d1d023-7739-4358-a6d9-115fbbe79c1d

EwenDC avatar Jun 05 '24 04:06 EwenDC

Hi @EwenDC, sorry this got buried a bit in my inbox. On the latest version are you still experiencing this problem?

lramos15 avatar Jun 20 '24 15:06 lramos15

Hi @lramos15, apologies for the slow response.

Yes, this is still occurring for me. https://github.com/user-attachments/assets/3fe9256b-a5af-4a6b-979d-13d6a8087081

EwenDC avatar Aug 08 '24 01:08 EwenDC

Are you up to date? I see a pending extension update and VS Code update in that recording

lramos15 avatar Aug 08 '24 13:08 lramos15

Sorry missed your response again 😔. Updated and same result

https://github.com/user-attachments/assets/4b849c91-b164-473f-bfd4-c904782fee4f

EwenDC avatar Aug 20 '24 00:08 EwenDC

Is it possible that you are pressing cmd+enter to submit the chat? That does send it to @workspace. enter should not do that.

If you're just pressing enter, you can check the keybindings editor to see whether you ended up with a different keybinding for the command workbench.action.chat.submitSecondaryAgent.

You could also run the command "Toggle Keyboard Shortcuts Troubleshooting" and check the Window log to see which command it actually picked up to run

roblourens avatar Aug 21 '24 17:08 roblourens

Oh my god I am so dumb 🤦‍♂️. Yeah I was doing ctrl + enter. I blame slack for giving me the muscle memory. Thanks for sticking with me and sorry for wasting your time.

EwenDC avatar Aug 22 '24 04:08 EwenDC

No worries, you can also customize the keybindings if you'd like to keep the familiar muscle memory

roblourens avatar Aug 22 '24 16:08 roblourens