---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/code-assistant/operations/quick-actions.md
  - href: https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/llms.txt
    rel: describedby
title: Quick actions in SourceCraft Code Assistant
description: How to use quick actions in Code Assistant.
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/en/llms.txt


# Quick actions in SourceCraft Code Assistant

<!-- source: en/_includes/code-assistant/quick-actions-description.md -->
For your convenience with the plugin, there are _quick actions_, i.e., Code Assistant integrations with your IDE.

The following integrations are available for **Visual Studio Code**:
* _Lightbulb_: Menu you access by clicking ![image](../../_assets/console-icons/bulb.svg) next to the code blocks and can use to generate [docs](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#docs) and [tests](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#test).
* _CodeLens_: Buttons above the code blocks you can use to generate docs and tests and [set up actions displayed in codelenses and lightbulbs](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#set-actions).
* _Context menu_: Right-click menu you can use to generate docs and tests, [send selected code to the chat](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#send-to-chat), request code [autocompletion](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#autocompletion)/[improvements](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#provide-improvements), or [generate a commit message](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#commit) in the [Git](https://git-scm.com/) version control system.
* _Slash (/) commands_: You can use the ![image](../../_assets/console-icons/thunderbolt.svg) **Slash Commands** selector in the chat toolbar to request [text generation](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#test) or [code improvement](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#provide-improvements) for the file opened in the editor, [generate a commit message](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#commit) in the [git](https://git-scm.com/) version control system, and invoke [AI code review](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/quick-actions.md#review).

For **JetBrains IDEs**, there are codelenses that can generate docs and tests.
<!-- endsource: en/_includes/code-assistant/quick-actions-description.md -->

{% note warning %}

You can tailor the quick actions prompt to your project's requirements. In the chat's top panel, click **Settings** and edit your prompt in the ![image](../../_assets/code-assistant/message.svg) **Quick Actions** section, adding project-specific guidelines.

{% endnote %}

<!-- source: en/_includes/code-assistant/ide-function-difference.md -->
Functionality varies depending on the IDE you are using.
<!-- endsource: en/_includes/code-assistant/ide-function-difference.md -->

<!-- source: en/_includes/code-assistant/vscode-ui-language.md -->
{% note info %}

The interface language of the Visual Studio Code plugin depends on the selected IDE language.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/vscode-ui-language.md -->

## AI code review {#review}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

Only the [Git](https://git-scm.com/) version control system is supported.

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. <!-- source: en/_includes/code-assistant/open-chat-vsc.md -->
     Click ![image](../../_assets/code-assistant/chat-logo.svg) **SourceCraft Code Assistant** in the editor’s left panel.

     If you have many plugins, the chat button may be hidden in the ![image](../../_assets/console-icons/ellipsis.svg) menu.

     Alternatively, use **Ctrl** + **L** in Windows/Linux or **Command** + **L** in macOS.
     <!-- endsource: en/_includes/code-assistant/open-chat-vsc.md -->
  1. In the message input window, click ![image](../../_assets/console-icons/thunderbolt.svg) and select:
      * **Neouroreview: Diff with Current Branch** ![image](../../_assets/console-icons/house.svg): To review differences with the current branch.
      * **Neouroreview: Diff with Main Branch** ![image](../../_assets/console-icons/house.svg): To review differences with the main branch.

      You can also right-click in the editor to open the context menu and select **AI code review**.

  **AI code review** will intellectually analyze the code changes using information from `git diff`, and suggest some constructive improvements. You can invoke AI code review to analyze the differences between your code and either the **current branch** or the **main branch**.

{% endlist %}

## Generating tests {#test}

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  In the codelens or lightbulb next to the code section you want to generate tests for, click **SourceCraft Code Assistant: Generate Tests**.

  Alternatively, you can right-click within the code section for which you want to generate tests and select **SourceCraft Code Assistant** → **Generate Tests**.

  The generated tests will appear in a new chat.

- JetBrains IDE {#jb}

  Above the code section you want to generate tests for, click **SourceCraft Code Assistant: Generate Tests**.

  The generated tests will appear in a new chat.

{% endlist %}

## Generating docs {#docs}

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  In the codelens or lightbulb next to the code section you want to generate docs for, click **SourceCraft Code Assistant: Generate Docs**.

  Alternatively, you can right-click within the code section for which you want to generate docs and select **SourceCraft Code Assistant** → **Generate Docs**.

  The docs will be suggested in the form of a code section comment. To accept or reject the comment, click **Accept** (**Ctrl** + **Y** in Windows/Linux or **Command** + **Y** in macOS) or **Reject** (**Ctrl** + **N** in Windows/Linux or **Command** + **N** in macOS).

- JetBrains IDE {#jb}

  Above the code section you want to generate docs for, click **SourceCraft Code Assistant: Generate Docs**.

  The generated docs will appear in a new chat.

{% endlist %}

## Refactoring code {#provide-improvements}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. <!-- source: en/_includes/code-assistant/open-chat-vsc.md -->
     Click ![image](../../_assets/code-assistant/chat-logo.svg) **SourceCraft Code Assistant** in the editor’s left panel.

     If you have many plugins, the chat button may be hidden in the ![image](../../_assets/console-icons/ellipsis.svg) menu.

     Alternatively, use **Ctrl** + **L** in Windows/Linux or **Command** + **L** in macOS.
     <!-- endsource: en/_includes/code-assistant/open-chat-vsc.md -->
  1. In the message input window, click ![image](../../_assets/console-icons/thunderbolt.svg) and select **Refactor code**.

  You can also use the editor: right-click to open the context menu and select **SourceCraft Code Assistant** → **Refactor code**.

  The refactored code and explanations will appear in the chat.

{% endlist %}

## Sending a code section to a chat {#send-to-chat}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. Select the code section.
  1. Right-click to open the context menu and select **SourceCraft Code Assistant** → **Add Selection to Chat**.

      Alternatively, you can use **Ctrl** + **I** in Windows/Linux or **Command** + **I** in macOS.

{% endlist %}

## Generating a commit message {#commit}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

Only the [Git](https://git-scm.com/) version control system is supported.

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. <!-- source: en/_includes/code-assistant/open-chat-vsc.md -->
     Click ![image](../../_assets/code-assistant/chat-logo.svg) **SourceCraft Code Assistant** in the editor’s left panel.

     If you have many plugins, the chat button may be hidden in the ![image](../../_assets/console-icons/ellipsis.svg) menu.

     Alternatively, use **Ctrl** + **L** in Windows/Linux or **Command** + **L** in macOS.
     <!-- endsource: en/_includes/code-assistant/open-chat-vsc.md -->
  1. In the message input window, click ![image](../../_assets/console-icons/thunderbolt.svg) and select **Commit description**.

  You can also use the editor: right-click to open the context menu and select **SourceCraft Code Assistant** → **Commit description**.

  You will see a change summary and commit message in a new chat.

{% endlist %}

## Setting up actions displayed in code lenses and lightbulbs {#set-actions}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. In the codelens above the code section, click ![image](../../_assets/console-icons/xmark.svg).
  1. In the settings window that opens, select which actions should appear in codelenses and which in lightbulbs. 

{% endlist %}

## Invoking code autocompletion {#autocompletion}

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

{% list tabs group=ide %}

- Visual Studio Code {#vscode}

  1. Position the cursor to where you want to invoke autocompletion.
  1. Right-click to open the context menu and select **SourceCraft Code Assistant** → **Suggest code**.

Alternatively, you can use **Ctrl** + **Enter**.

{% endlist %}

#### Useful links {#see-also}

* [Getting started with SourceCraft Code Assistant](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/index.md)
* [SourceCraft Code Assistant overview](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/concepts/index.md)
* [SourceCraft Code Assistant chat interface in the JetBrains IDE](https://vibe.sourcecraft.dev/portal/docs/en/code-assistant/operations/chat.md)