Skip to content

Commit cfaef41

Browse files
authored
Document the "Fix with AI" feature (#342)
1 parent bd8a5f8 commit cfaef41

File tree

4 files changed

+91
-11
lines changed

4 files changed

+91
-11
lines changed

docs/guides/config-vscode.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Configure the VSCode extension
3+
description: How to configure the CodeRabbit VSCode extension
4+
---
5+
6+
This page is about configuring the CodeRabbit VSCode extension. For more information about the extension, see
7+
[Review local changes](/code-editors).
8+
9+
:::note
10+
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
11+
:::
12+
13+
## Find the settings screen {#find}
14+
15+
To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps:
16+
17+
1. In the activity bar, click the Extensions icon.
18+
19+
1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row.
20+
21+
1. In the menu that appears, select **Settings**.
22+
23+
The settings screen contains the following configuration controls.
24+
25+
## Configure AI agent integration {#agent}
26+
27+
The **Agent Type** setting lets you choose the extension's response to using the **Fix with AI** feature during code reviews. Your options are the following:
28+
29+
- **Native**: The extension prompts the AI agent associated with your IDE to apply the suggested fix.
30+
31+
This works only with VSCode, using Copilot. If you have this option selected when using a different IDE, then the extension instead copies the prompt to your clipboard.
32+
33+
- **Claude Code**: The extension opens the Terminal pane of your IDE and tries to use the `claude` command-line program to apply the suggested fix to your code. You need to have Claude Code installed for this option to be effective.
34+
35+
- **Clipboard**: The extension copies prompt text describing the suggested fix to your clipboard. From there, you can manually paste the prompt into the coding AI agent that you use with your IDE.
36+
37+
For more information about the **Fix with AI** feature, see [Request help from your AI coding agent](/guides/use-vscode#agent).
38+
39+
## Configure automatic review behavior {#auto-reviews}
40+
41+
The **Auto Review Mode** setting lets you control the behavior of the automatic code reviews that the extension can perform after you make commits to your local Git repository. Your options are the following:
42+
43+
- **Disabled**: The extension doesn't perform automatic code reviews.
44+
45+
- **Prompt**: After every commit, the extension displays a dialog asking if you'd like it to perform a code review.
46+
47+
- **Auto**: The extension always performs a review after every commit.
48+
49+
For more information about this feature, see [Automatically review local commits](/guides/use-vscode#auto-reviews).
50+
51+
## Set a review timeout {#timeout}
52+
53+
The **Review Timeout** setting lets you specify how long the extension waits for a response from CodeRabbit remote servers before timing out a code review. The default value is `20`.
54+
55+
To turn off timeouts, set this value to `0`.
56+
57+
## What's next {#whats-next}
58+
59+
- [Use the VSCode extension](/guides/use-vscode)
60+
61+
- [Uninstall the VSCode extension](/guides/uninstall-vscode)

docs/guides/install-vscode.md

+2
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ This connects your CodeRabbit account with the CodeRabbit VSCode extension.
4545
## What's next
4646

4747
- [Use the VSCode extension](/guides/use-vscode)
48+
49+
- [Configure the VSCode extension](/guides/config-vscode)

docs/guides/use-vscode.md

+27-11
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,25 @@ The CodeRabbit VSCode extension works by comparing changes in your current, chec
1212
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
1313
:::
1414

15-
## Automatically review local commits
15+
## Automatically review local commits {#auto-reviews}
1616

1717
You can let CodeRabbit automatically review commits that you make to your local Git repository. These automatic reviews compare all committed changes against the branch that your working branch is based on.
1818

1919
To perform an automatic review, follow these steps:
2020

2121
1. Perform a Git commit using VSCode. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?**
2222

23-
1. Click **Yes.** The CodeRabbit sidebar appears in your VSCode window.
23+
1. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window.
2424

2525
1. Wait for the review to complete. This might take a few minutes. To cancel a review in progress, click **Stop the review**.
2626

27-
After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work-with-code-reviews).
27+
After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work).
2828

29-
For more options and control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section.
29+
You can optionally configure the extension to either always or never perform automatic code reviews on commit, instead of displaying this yes-or-no dialog. For more information, see [Configure automatic review behavior](/guides/config-vscode#auto-reviews).
3030

31-
## Manually request code reviews
31+
For more control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section.
32+
33+
## Manually request code reviews {#manual-reviews}
3234

3335
To manually review changes in a local Git branch using the CodeRabbit VSCode extension, follow these steps:
3436

@@ -56,38 +58,52 @@ To manually review changes in a local Git branch using the CodeRabbit VSCode ext
5658

5759
After the review completes, you can browse and respond to review comments as described in the following section.
5860

59-
## Work with code reviews
61+
## Work with code reviews {#work}
6062

6163
The CodeRabbit VSCode extension presents code reviews as a series of actionable comments, connected to specific files and lines. It gives you tools to apply its suggestions quickly, when possible.
6264

63-
### Browse comments
65+
### Browse comments {#browse}
6466

6567
After the extension finishes its review, it adds any comments to the CodeRabbit sidebar under the **Files** heading in the **Reviews** section.
6668

6769
Each item in **Files** is a comment referring to one or more lines in that file. Click the comment to see a detailed, inline comment in the editor, attached to the appropriate file and lines.
6870

6971
You can react to these comments however you want: you can apply their advice literally, or let them guide you to find alternate solutions, or ignore them entirely. CodeRabbit comments are metadata stored with VSCode, and are not part of your files. The presence of comments doesn't block your use of version control.
7072

71-
### Apply suggested changes
73+
### Apply suggested changes {#apply}
7274

7375
Whenever possible, the CodeRabbit VSCode extension attaches discrete change suggestion to comments in the form of code diffs. For example, if it detects a typo in a new function name, the extension might attach a diff with a suggested correction.
7476

7577
If you agree with CodeRabbit about the suggested fix and want to apply to exactly as it proposes, click the checkmark-shaped **Apply suggested change** icon in the inline comment. The extension makes the change for you in the editor.
7678

77-
### Ignore or collapse comments
79+
### Request help from your AI coding agent {#agent}
80+
81+
If CodeRabbit determines that an AI coding agent could help with resolving one of its comments, then it adds a star-shaped **Fix with AI** icon to the inline display of that comment. To have the extension generate a request for an AI agent to address the comment, click this icon.
82+
83+
Depending upon your IDE and the current extension settings, the extension performs one of the following actions:
84+
85+
- If you are using VSCode with Copilot installed, then the extension can send the request directly to Copilot.
86+
- If you have Claude Code installed, then the extension can send the request to the `claude` command-line program.
87+
- As a fallback, the extension can copy the request, phrased as an AI prompt, to your clipboard. You can then manually paste this prompt into the coding AI of your IDE.
88+
89+
For more information about configuring this behavior, see [Configure AI agent integration](/guides/config-vscode#agent).
90+
91+
### Ignore or collapse comments {#ignore}
7892

7993
To remove a comment from the editor, click its **Ignore** icon.
8094

8195
To remove a comment but keep an icon in the editor noting its presence, click its **Collapse** icon.
8296

8397
To see an ignored or collapsed comment in the editor again, click its summary in the CodeRabbit sidebar.
8498

85-
### Browse previous reviews
99+
### Browse previous reviews {#previous}
86100

87101
If you have performed reviews prior to the most recent review in the current VSCode window, then you can browse the comments from these reviews under the **Previous reviews** heading in the CodeRabbit sidebar.
88102

89103
If a past review comment no longer applies to the current state of your code, then clicking that comment won't display a detailed comment or suggestion in the editor.
90104

91-
## What's next
105+
## What's next {#whats-next}
106+
107+
- [Configure the VSCode extension](/guides/config-vscode)
92108

93109
- [Uninstall the VSCode extension](/guides/uninstall-vscode)

sidebars.ts

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const sidebars: SidebarsConfig = {
116116
"guides/about-vscode",
117117
"guides/install-vscode",
118118
"guides/use-vscode",
119+
"guides/config-vscode",
119120
"guides/uninstall-vscode",
120121
],
121122
},

0 commit comments

Comments
 (0)