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

Copilot Chat in "Open chat in Editor" mode doesn't auto-reference selected code or respond to #selection command, unlike other modes #1441

Open dbsxdbsx opened 1 month ago

dbsxdbsx commented 1 month ago

Issue Description

When using GitHub Copilot Chat in Visual Studio Code, I've noticed inconsistent behavior in the "Open chat in Editor" mode compared to other chat modes:

  1. In the side panel chat and "Open Chat in New Window" mode, Copilot automatically references selected code in the editor.
  2. However, in the "Open chat in Editor" mode, Copilot does not auto-reference selected code.
  3. Additionally, the #selection command, which should reference selected code, does not work in the "Open chat in Editor" mode, while it functions correctly in other modes.

Steps to Reproduce

  1. Open a code file in Visual Studio Code.
  2. Select a portion of code in the editor.
  3. Test each Copilot Chat mode: a. Side panel chat: Selected code is auto-referenced. b. "Open Chat in New Window": Selected code is auto-referenced. c. "Open chat in Editor": Selected code is not auto-referenced.
  4. Try using the #selection command in each mode: a. Side panel chat: #selection works. b. "Open Chat in New Window": #selection works. c. "Open chat in Editor": #selection does not work.

Expected Behavior

Actual Behavior

Environment

Additional Notes

This inconsistency in the "Open chat in Editor" mode makes it less convenient to interact with Copilot when using this specific chat mode. Having consistent behavior across all chat modes would greatly improve the user experience and workflow efficiency.

dbsxdbsx commented 1 month ago

And I also found some other inconsistency. For example, if not in the side chat view, the 2 buttons for the code have no effect: image

The screenshot is in new window mode. But same issue for the "Open chat in Editor" mode.