microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.19k stars 28.06k forks source link

[Accessibility] Preserve last position in the Copilot Chat response list view #199126

Open jooyoungseo opened 7 months ago

jooyoungseo commented 7 months ago

Type: Feature Request

CC @meganrogge

This is a feature request and I was wondering if we could have a custom setting to configure whether to preserve the last position in the Copilot response view. Currently, the focus is set to the last response.

  1. In Copilot Chat, ask multiple questions.

  2. Press Ctrl+UpArrow to focus in the response list view.

  3. Focus in the first response using Up/DownArrow key.

  4. Move your focus back to the Chat input area via Ctrl+DownArrow.

  5. Go back to the response list view via Ctrl+UpArrow.

VS Code version: Code - Insiders 1.85.0-insider (eb56719ae7653bff54989385818ef39e1cd73d29, 2023-11-24T15:21:39.004Z) OS version: Windows_NT x64 10.0.22631 Modes:

jooyoungseo commented 7 months ago

A possible usecase is as follows:

  1. User creates multiple chat inquiries (say, 4 different questions).

  2. User wants to execute the second response out of the four responses.

  3. The second response contains 2 separate codeblocks.

  4. user inserts codeblock 1 into editor.

  5. User wants to come back to the second response in order to insert the remaining codeblock 2.

[
  {
    "command": "runCommands",
    "key": "ctrl+k alt+f2",
    "args": {
      "commands": [
        "workbench.panel.chat.view.copilot.focus",
        "chat.action.focus",
        "editor.action.accessibleView"
      ]
    }
  }
]
meganrogge commented 4 months ago

We could consider a separate command for this so a user can go back to their last position without compromising the default behavior which is to go the most recently run command result.

meganrogge commented 4 months ago

@roblourens what do you think of this?

roblourens commented 4 months ago

I think I'd be fine with maintaining the focused item in the chat list instead of having cmd+up always focus the last item. That seems fine to me. I think we should move focus to the last item whenever a new chat request is submitted though.