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

Open Session in New Window causes Copilot Chat to lose access to code context #811

Open PaulMcInnis opened 7 months ago

PaulMcInnis commented 7 months ago

Steps to Reproduce:

  1. Create a new window in VSCode with some content inside
  2. Open Copilot chat
  3. hit the three dots in the top right and select Open Session in a new Window (floating) image
  4. ask anything relating to the code in that new session window
  5. Observe that copilot chat cannot use that context as a distinct session window

image

I expected that if I had a floating window, I could use it like the sidebar, but it seems to behave as if it's a tab in my editor instead, and does not expect me to be viewing other files while interacting with the copilot window.

Please look into this, as using a tiny sidebar is very annoying when viewing complete functions with 100 character width, it's just not big enough and a seperate window is way better as a user experience.

PaulMcInnis commented 7 months ago

This is exacerbated by this issue where you cannot intelligently set sidebar sizes, so as a user you often have a small sidebar set when entering the copilot chat, opening the session in a new window would be a good flow if it worked.

Cinlends commented 7 months ago

Same problem, I want to use it in a new window, but it can't read any files and code

roblourens commented 5 months ago

Context should not just be based on the 'active' editor

eleanorjboyd commented 4 months ago

the original question still doesn't work but an at workspace question does work Screenshot 2024-04-23 at 10 54 58 AM Screenshot 2024-04-23 at 10 54 18 AM

roblourens commented 4 months ago

This is about selection context in the text editor that you have in the main window behind the chat window. So open the chat window, but have a text editor active in the main window, and test that it can see your selection/viewport in that editor.

roblourens commented 4 months ago

Ah something is wrong here

roblourens commented 4 months ago

This is due to ITabsAndEditorsService being instantiated lazily, and so it doesn't get to set up its listener early

roblourens commented 4 months ago

Ok I've got one change but also https://github.com/microsoft/vscode/issues/211405