ReSharper 2024.3 Help

AI-powered context suggestions

AI-powered context actions

You can start interacting with the AI Assistant right from the editor — press Alt+Enter and choose one of the actions marked with the AI Assistant icon ReSharper: AI assistant icon or actions from the AI Assistant submenu. Depending on the context, the following actions are available:

  • Selection in the editor: You can choose Send to chat or Send to new chat to use the selected code as a part of your query.

  • Caret at a class declaration: You can choose Explain this and Write XML documentation. Both actions will create a new chat in the AI Assistant window and produce the relevant output.

  • Caret at a method declaration: You can additionally choose Find issues in. ReSharper will list all potential issues in the method in a new chat in the AI Assistant window.

  • Caret at an empty method declaration: You can additionally choose Implement this. ReSharper will generate a method implementation taking into account its name and parameters.

AI-powered inline suggestions

By default, some AI-powered actions also appear as inline suggestions in the editor:

  • Implement this action is available as a clickable inline suggestion for empty methods. The action will generate an implementation based on the current context, method name, and signature.

    ReSharper: Implement method with AI
  • Document this action is available as a clickable inline suggestion for empty documentation comments on types and type members. The action will generate XML-doc comments based on the name and the contents of the corresponding symbol.

    ReSharper: Document type or type member with AI

You can disable inline suggestions on the AI Assistant | General page of ReSharper options Alt+R, O by clearing the Show all in-place AI actions suggestions checkbox or the nested checkboxes for specific actions.

Here is an example of using AI Assistant on an empty method:

ReSharper: Implementing method with AI Assistant

After choosing this action, ReSharper creates a new AI chat and generates an implementation:

ReSharper: Implementing method with AI Assistant

You can press Ctrl+Enter or click Accept to add the generated code to the file. If you don't like the generated code, use the text field in the popup that appears below the generated suggestion to provide additional information that will help generate a better alternative.

Last modified: 13 November 2024