ReSharper 2024.3 Help

AI prompt library

You can add your own prompts to the prompt library and use them as context actions in the AI Assistant submenu of the Alt+Enter popup.

Configure prompt library

  1. Do one of the following:

    • In the AI Assistant window, click Prompt Library and then click Change prompts.

    • In the editor, press Alt+Enter and choose AI Assistant | Prompt Library...

    • Open the AI Assistant page of ReSharper options Alt+R, O and click Open Library

  2. In the dialog that opens, click Add New Prompt in the bottom left corner.

  3. A new prompt will appear in the User prompts category on the left. Click the three-dots button next to it and give it a short and descriptive name.

  4. In the text field, write your prompt. You can use the $SELECTION variable, which will be replaced with the selected code and its language when you invoke the prompt from the editor.

    When the prompt is ready, you can experiment with improving it: click Improve and see whether it became better. If not, click the revert button in the text field.

  5. Select Show in Alt+Enter menu to make the prompt appear in the AI Assistant submenu of the Alt+Enter popup.

  6. By default, your prompt will be sent for processing as soon as you choose it in the Alt+Enter popup. If you want to make the prompt more flexible, choose Use for additional input after invoking. In this case, the prompt will be sent to the AI Assistant window where you will be able to edit it before sending.

  7. Click OK to finish creating the prompt.

Last modified: 24 August 2024