microsoft / vscode-copilot-release

Feedback on GitHub Copilot Chat UX in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Creative Commons Attribution 4.0 International
295 stars 28 forks source link

Feature Request: Saving custom prompts, and adding them to the Copilot context menu. #754

Open futuremotiondev opened 5 months ago

futuremotiondev commented 5 months ago

Feature Request: Custom Prompts and Context Menu Integration

I almost exclusively use my own custom prompts instead of the built-in copilot prompts here:

Code_t0tW4aFLM7

I would like to request a mechanism to save custom prompts and optionally insert them into the Copilot context menu for convenient prompting.

I don't know how exactly this would be implemented, but one idea would be to expose 4-5 generic "prompt" commands under contributes > commands in the package.json. See this example:

{
    "command": "github.copilot.chat.customPrompt01",
    "title": "%github.copilot.command.customPrompt01%",
    "enablement": "!github.copilot.interactiveSession.disabled && !editorReadonly",
    "category": "GitHub Copilot"
},
{
    "command": "github.copilot.chat.customPrompt02",
    "title": "%github.copilot.command.customPrompt02%",
    "enablement": "!github.copilot.interactiveSession.disabled && !editorReadonly",
    "category": "GitHub Copilot"
},
{
    "command": "github.copilot.chat.customPrompt03",
    "title": "%github.copilot.command.customPrompt03%",
    "enablement": "!github.copilot.interactiveSession.disabled && !editorReadonly",
    "category": "GitHub Copilot"
},

Then let us configure what the exact prompts are in the general configuration:

Example:


Example-1

Example, Populated:


Example-Filled-In


This is just a quick example / mock-up for demonstration purposes - I'm sure your team could find the best way to integrate this kind of functionality.

It would be a fantastic workflow booster if something like this was implemented.

I appreciate any consideration.

daniram94 commented 4 months ago

i founded this usefull

Klaster1 commented 1 month ago

Second the suggestion. I have a set of code operations I perform often and prompting Copilot with examples would be much simpler than writing a custom VSCode extension that transforms at the AST level. Of course, if Codepilot could generate LSP suggestions for later, it would be even better.

mgrandau commented 3 weeks ago

Here's a suggestion: Save the custom prompt as a comment in a snippet and use autocomplete to complete your code.