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

Custom Command: supports keybinding registration #3242

Merged
merged 11 commits into from
Feb 23, 2024

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Feb 21, 2024

CLOSE #3202

image

  • All custom commands will be registered as a VS Code command that can be found in the Keyboard Shortcuts editor
  • Added keybinding registration for custom commands in the CustomCommandsManager class

This allows custom commands to be executed via custom keybindings in VS Code.

Also added related docs and walkthrough page.

Test plan

  1. In your cody.json file, create a custom command
  2. Save the cody.json file
  3. Open the Keyboard Shortcuts editor
    image
  4. In the Keyboard Shortcuts editor, search for cody.command.customn.{NAME_OF_YOUR_COMMAND}
  5. Click on the + icon next to the command to assign a custom keybinding for your custom command
    image

@abeatrix abeatrix requested review from chillatom, taylorsperry and a team February 21, 2024 23:10
@toolmantim
Copy link
Contributor

“register” is a very generic property name, which could mean anything. Perhaps “allowKeybinding” is more suitable? Also does this property make sense for Jetbrains, or is it very VS Code specific?

Instead… why don’t we just register all custom commands by default?

@abeatrix
Copy link
Contributor Author

Also does this property make sense for Jetbrains, or is it very VS Code specific?

Jetbrains supports custom keymap as well so i'd assume yes? It will not break Jetbrains as well since the register command is also supported in agent, with tests in agent to cover.

Instead… why don’t we just register all custom commands by default?

I thought about registering all custom commands but i'm not sure if that'd be a good idea for users that have 1000 custom commands.

@toolmantim
Copy link
Contributor

Do we support 1000 custom commands? I think that is beyond our design specs.

I'd suggest we register them by default and do away with the config — it's one less config to document, discover, etc.

@abeatrix
Copy link
Contributor Author

Do we support 1000 custom commands? I think that is beyond our design specs.

I'd suggest we register them by default and do away with the config — it's one less config to document, discover, etc.

Makes sense, will update the PR tomorrow to reflect this!

@abeatrix abeatrix changed the title Custom Command: Add keybinding registration Custom Command: supports keybinding registration Feb 23, 2024
@abeatrix abeatrix merged commit 11edc6d into main Feb 23, 2024
18 of 19 checks passed
@abeatrix abeatrix deleted the bee/custom-commands-keybinds branch February 23, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feedback: Allow VS Code keybindings for Cody Custom Commands
2 participants