You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/copilot/copilot-edits.md
+11-20Lines changed: 11 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Copilot Edits can function in two modes:
20
20
> [!NOTE]
21
21
> 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).
22
22
>
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`.
24
24
25
25
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.
26
26
@@ -74,11 +74,10 @@ In edit mode, you select which files to edit and provide the relevant context an
74
74
75
75
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".
76
76
77
-
## Use agent mode (preview)
77
+
## Use Agent mode (preview)
78
78
79
79
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:
80
80
81
-
* Creates a plan of action and decomposes the request into smaller tasks.
82
81
* Determines the relevant context and files to edit autonomously.
83
82
* Offers both code changes and terminal commands to complete the task. For example, Copilot might compile code, install packages, run tests, and more.
84
83
* 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
87
86
88
87
To use agent mode in Copilot Edits:
89
88
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`.
91
90
92
91
1. Open the Copilot Edits view (`kb(workbench.action.chat.openEditSession)`)
93
92
@@ -113,6 +112,9 @@ To use agent mode in Copilot Edits:
113
112
114
113

115
114
115
+
> [!NOTE]
116
+
> The `setting(chat.agent.maxRequests)` setting controls the maximum number of requests that Copilot Edits can make in agent mode.
117
+
116
118
1. Continue to ask follow-up questions and iterate on the code changes that Copilot Edits provides.
117
119
118
120
## Manage the working set
@@ -207,22 +209,11 @@ After moving a chat request to Copilot Edits, the chat request is removed from t
207
209
208
210
## Agent mode tools
209
211
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.
213
213
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.
224
215
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.
226
217
227
218
## Settings
228
219
@@ -231,10 +222,10 @@ The following list contains the settings related to Copilot Edits. You can confi
231
222
*`setting(chat.editing.confirmEditRequestRemoval)` - ask for confirmation before undoing an edit (default: `true`)
232
223
*`setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
233
224
*`setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
234
-
*`setting(github.copilot.chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
225
+
*`setting(chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
235
226
*`setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
236
227
*`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)
Copy file name to clipboardExpand all lines: docs/copilot/copilot-settings.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ The team is continuously working on improving Copilot in VS Code and adding new
47
47
*`setting(chat.editing.confirmEditRequestRemoval)` - ask for confirmation before undoing an edit (default: `true`)
48
48
*`setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
49
49
*`setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
50
-
*`setting(github.copilot.chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
50
+
*`setting(chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
51
51
*`setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
52
52
*`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`)
53
53
*`setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 15)
0 commit comments