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

feat: pass additional input to custom command #1731

Merged
merged 6 commits into from
Nov 15, 2023
Merged

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Nov 14, 2023

CLOSE #1742

Screen.Recording.2023-11-13.at.5.44.38.PM.mov

Allows passing additional input text to custom commands.

The additional input text is appended to the prompt text before sending to the LLM.

-Updates the CustomPrompt recipe to concat additionalInput to prompt text.

  • Passes additionalInput to addCommand in CommandsController.

Test plan

In chat input box, first enter the slash command, then follow by additional text that you want to use as additional instruction.

For example, /explain response in french

You should see Cody will respect the additional input you have entered

@abeatrix abeatrix requested review from a team and kukicado November 14, 2023 02:25
Copy link
Contributor

@kalanchan kalanchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is neat! tested on your branch and is working as expected, good work
CleanShot 2023-11-15 at 11 21 44@2x

@abeatrix abeatrix merged commit 35b89e6 into main Nov 15, 2023
14 checks passed
@abeatrix abeatrix deleted the bee/additional-input branch November 15, 2023 21:56
@toolmantim
Copy link
Contributor

This seems very hidden… how do you think users or command authors would discover this?

I'm wondering if it might be better to allow custom commands to specify that they require an argument? One that can be documented on https://docs.sourcegraph.com/cody/custom-commands. And if it's not supplied, we show a quick input for the user to type into.

@abeatrix
Copy link
Contributor Author

This seems very hidden… how do you think users or command authors would discover this?

I'm wondering if it might be better to allow custom commands to specify that they require an argument? One that can be documented on https://docs.sourcegraph.com/cody/custom-commands. And if it's not supplied, we show a quick input for the user to type into.

This can be used for all commands so that it's consistent, so I guess we can just mention it in the command palette or anywhere we show the custom commands?

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.

VSCE Custom Commands: Support additional instruction via chat input
3 participants