Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VS Code] [Accessibility] Add shortcuts to jump between code suggestion in chat #1245

Open
2 tasks done
d-mahard opened this issue May 7, 2024 · 2 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@d-mahard
Copy link
Contributor

d-mahard commented May 7, 2024

Validations

  • I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • I'm not able to find an open issue that requests the same enhancement

Problem

First of all, thanks for the great tool! I have tested many AI VScode clients and this is the best in terms of features and user experience (especially the sleek UI that integrates very well with the VSCode workbench).

I am trying to use keyboard as much as possible, including when using continue.dev. This is my typical workflow:

  1. writing a code in my editor
  2. ask continue.dev a question (usually using continue.focusContinueInput shortcut)
  3. at this point my cursor position will jump to the continuedev prompt field. I will then type my question
  4. I get the answer. I would want to scroll up and down to read the answer (using mouse)
  5. In many cases there are multiple code suggestions (see example below), I would want to choose one of them and then either copy the code or insert at cursor. (still using mouse)
  6. Sometimes I just want to copy just part of the suggested code (therefore, I cannot using the copy or insert-at-cursor button) - so I use my mouse to select the code I want and either press Ctrl+C or right click on the mouse to copy.

image

Solution

For step 4, 5, and 6 above, would be nice to have some shortcut commands.

For step 4:
First of all, we need a way to move focus from the prompt field to the whole continue.dev view by using keyboard. From there I think up and down arrow or even PgUp and PgDown should work. I tried to get the focus manually to the view, and the arrows work fine. EDIT: there is a command for that: continue.continueGUIView.focus. Does not have a default shortcut but can be assigned. To go back to the prompt field: continue.focusContinueInputWithoutClear)

For step 5:
We need two things:

  • a way to focus to the code boxes. Alt+[ and Alt+] seems to be pretty common to go next/previous for things like this.
  • after we get the focus on the code box, there should be a shortcut key to copy / insert / apply

For step 6:
A step further after getting focus to the code box, we should have a cursor to select text and copy (so the code box should behave like a read-only text editor).

I am not sure if we can use monaco elements/classes, e.g. monaco editor for the code box , so that the styling will simply follow the one that is active in the workbench (eg. a focused element will have --vscode-focusBorder color). Would be great if that's possible.

@d-mahard d-mahard added the enhancement New feature or request label May 7, 2024
@sestinj
Copy link
Contributor

sestinj commented May 8, 2024

Love the alt+[ idea. I think this would be a great improvement

In order to focus the window rather than just the text box, you can use alt+ctrl+L (the command for toggling the Continue sidebar)

@d-mahard
Copy link
Contributor Author

d-mahard commented May 8, 2024

In order to focus the window rather than just the text box, you can use alt+ctrl+L (the command for toggling the Continue sidebar)

From what I see on my side, that would simply close the aux sidebar instead of focusing on it. But you gave me a clue, so I found that the command is continue.continueGUIView.focus which does not have a default shortcut but can be assigned. That will do for step 4, thanks!

And to go back to the prompt field is continue.focusContinueInputWithoutClear. That's nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants