Skip to content

Commit 730f0b9

Browse files
committed
Update after engineering review
1 parent b7cd6d7 commit 730f0b9

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

docs/copilot/copilot-edits.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Copilot Edits can function in two modes:
2020
> [!NOTE]
2121
> Agent mode is currently in preview and we continue to improve the experience. Provide feedback and report issues in the [Copilot repository](https://github.com/microsoft/vscode-copilot-release/issues).
2222
>
23-
> To enable agent mode, set the `setting(github.copilot.chat.agent.enabled)` setting to `true`.
23+
> To enable agent mode, set the `setting(chat.agent.enabled)` setting to `true`.
2424
2525
The following video demonstrates how to use Copilot Edits to extend a basic Express app, such as adding a new page, navigation bar, and theme switcher.
2626

@@ -74,11 +74,10 @@ In edit mode, you select which files to edit and provide the relevant context an
7474

7575
If you're not entirely happy with the edits, you can ask follow-up questions, such as "don't include the phone number", or "use jest instead of vitest". Or you can incrementally edit your code further. For example, when building a web app, use a series of prompts such as "add a navigation bar", "add a theme switcher", "store order items in JSON format in MongoDB".
7676

77-
## Use agent mode (preview)
77+
## Use Agent mode (preview)
7878

7979
In agent mode, Copilot Edits operates in a more autonomous and dynamic manner to achieve the desired outcome. To process a request, Copilot loops over the following steps and iterates multiple times as needed:
8080

81-
* Creates a plan of action and decomposes the request into smaller tasks.
8281
* Determines the relevant context and files to edit autonomously.
8382
* Offers both code changes and terminal commands to complete the task. For example, Copilot might compile code, install packages, run tests, and more.
8483
* Monitors the correctness of code edits and terminal command output and iterates to remediate issues.
@@ -87,7 +86,7 @@ Copilot Edits agent mode uses a set of [_tools_](#agent-mode-tools) to accomplis
8786

8887
To use agent mode in Copilot Edits:
8988

90-
1. Enable agent mode in by setting the `setting(github.copilot.chat.agent.enabled)` setting to `true`.
89+
1. Enable agent mode in by setting the `setting(chat.agent.enabled)` setting to `true`.
9190

9291
1. Open the Copilot Edits view (`kb(workbench.action.chat.openEditSession)`)
9392

@@ -113,6 +112,9 @@ To use agent mode in Copilot Edits:
113112

114113
![Screenshot showing the Copilot Edits view, highlighting that Copilot verified the code edits for errors.](images/copilot-edits/copilot-edits-agent-check-errors.png)
115114

115+
> [!NOTE]
116+
> The `setting(chat.agent.maxRequests)` setting controls the maximum number of requests that Copilot Edits can make in agent mode.
117+
116118
1. Continue to ask follow-up questions and iterate on the code changes that Copilot Edits provides.
117119

118120
## Manage the working set
@@ -207,22 +209,11 @@ After moving a chat request to Copilot Edits, the chat request is removed from t
207209

208210
## Agent mode tools
209211

210-
To complete a request, Copilot Edits uses a set of _tools_ to accomplish the individual tasks. Consider these tools as specialized utilities that Copilot can use to perform a specific task, such as listing the files in a directory, or running a terminal command. These tools can run in parallel to accomplish the requested task.
211-
212-
The following list gives an overview of the built-in tools:
212+
To complete a request, Copilot Edits uses a set of _tools_ to accomplish the individual tasks. Consider these tools as specialized utilities that Copilot can use to perform a specific task. Examples of such tasks are listing the files in a directory, editing a file in your workspace, running a terminal command, getting the output from the terminal, and more.
213213

214-
* `search_codebase` - Search the workspace for relevant code or documentation
215-
* `file_search` - Search for files by glob patterns (for example, "**/*.js")
216-
* `grep_search` - Do a text search in files for exact strings or regex patterns
217-
* `read_file` - Read the contents of a file
218-
* `edit_file` - Edit a file in the workspace, changes can be [reviewed](#accept-or-discard-edits) like other edits
219-
* `list_dir` - List the contents of a directory
220-
* `run_in_terminal` - Run shell commands in a terminal (requires user confirmation)
221-
* `get_terminal_output` - Get output from a previously run terminal command
222-
* `get_errors` - Check for errors in code files and helps agent mode to self-correct code issues
223-
* `get_changed_files` - Get diffs of file changes
214+
Based on the outcome of a tool, Copilot might invoke other tools to accomplish the overall request. For example, if a code edit results in syntax errors in the file, Copilot might explore another approach and suggest different code changes.
224215

225-
Agent mode gives you a more autonomous AI-powered editing experience, however you maintain control over the generated edits and terminal commands that are run.
216+
Although agent mode can operate in an autonomous manner, you maintain control over the generated edits and the terminal commands that are run.
226217

227218
## Settings
228219

@@ -231,10 +222,10 @@ The following list contains the settings related to Copilot Edits. You can confi
231222
* `setting(chat.editing.confirmEditRequestRemoval)` - ask for confirmation before undoing an edit (default: `true`)
232223
* `setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
233224
* `setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
234-
* `setting(github.copilot.chat.agent.enabled)` <i class="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
225+
* `setting(chat.agent.enabled)` <i class="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
235226
* `setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
236227
* `setting(github.copilot.chat.edits.codesearch.enabled)` _(preview)_ - let Copilot find the right files by adding `#codebase` to your prompt, similar to how agent mode works (default: `false`)
237-
* `setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 15)
228+
* `setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 5 for Copilot Free users, 15 for other users)
238229

239230
## Keyboard shortcuts
240231

docs/copilot/copilot-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The team is continuously working on improving Copilot in VS Code and adding new
4747
* `setting(chat.editing.confirmEditRequestRemoval)` - ask for confirmation before undoing an edit (default: `true`)
4848
* `setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
4949
* `setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
50-
* `setting(github.copilot.chat.agent.enabled)` <i class="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
50+
* `setting(chat.agent.enabled)` <i class="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
5151
* `setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
5252
* `setting(github.copilot.chat.edits.codesearch.enabled)` _(preview)_ - let Copilot find the right files by adding `#codebase` to your prompt, similar to how agent mode works (default: `false`)
5353
* `setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 15)

0 commit comments

Comments
 (0)