microsoft / vscode

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

Creating commands that can be used in the Ctrl+I menu #221490

Open yurifw opened 1 month ago

yurifw commented 1 month ago

When you press Ctrl + I in VsCode a little Input text appears where you can "Ask Copilot or type / for commands". Some example of commands are /doc to add documentation and /fix to fix problems in the code.

It would be nice if we could create commands of our own that would be basically shortcuts for prompts, for example:

I could type /clear instead of typing the prompt Remove all unused imports, variables and all the comments that are not documentation in this file

or

/component instead of create a new functional component with the same name as this file

jrieken commented 1 month ago

fyi @aeschli @digitarald