Add and customize prompts
You can define your own custom prompts and add them to the AI Actions menu, or modify the built-in prompts.
Add your own prompts to prompts library
You can add your own prompts to the prompts library and use them via the AI Actions menu.
Do one of the following:
Right-click anywhere in the editor to open the context menu, then go to
.Press Alt+Enter, select AI Actions, and click Add your prompts.
Press Ctrl+Alt+S to open settings and then select
.
Click
to create a new prompt.
In the text field, write the prompt.
If needed, click the
$SELECTION
variable to add a Markdown-formatted code block with current code selection and language name to the new prompt.Edit the new prompt name.
Select the first checkbox if you want AI Assistant to wait for you to make additional input in the chat after invoking the prompt.
Keep the second checkbox if you want your new prompt to be listed in the AI Actions menu.
Click Apply.
Once you create a prompt, you can edit or delete it at any time.
You can also select a prompt from the list and move it up or down to change the order in which the prompts are displayed.
Modify built-in prompts
You can adjust how AI Assistant behaves in certain scenarios by modifying the prompts used for the corresponding actions. For example, you can add specific guidelines for commit message generation.
Do one of the following:
Right-click anywhere in the editor to open the context menu, then go to
.Press Alt+Enter, select AI Actions, and click Add your prompts.
Press Ctrl+Alt+S to open settings and then select
.
Select the action for which you want to modify the prompt.
Add new instructions.
Click Apply.
The provided instructions will be appended to the default prompt, extending the functionality of the corresponding action.