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
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ In edit mode, you select which files to edit and provide the relevant context an
66
66
Copilot Edits streams the edits in the editor. In the working set, files that were edited by Copilot are marked in bold.
67
67
68
68
> [!TIP]
69
-
> Let Copilot find the right files automatically by adding `#codebase` in your prompt.
69
+
> Let Copilot find the right files automatically by adding `#codebase` in your prompt. Make sure to enable the `setting(github.copilot.chat.edits.codesearch.enabled)`_(preview)_ setting to get the best results.
70
70
71
71
1. Review the suggested edits and accept or discard the suggested edits
72
72
@@ -137,6 +137,8 @@ You have many options to add files to the working set:
137
137
138
138
* Let Copilot find the right files automatically by adding `#codebase` in your prompt.
139
139
140
+
Make sure to enable the `setting(github.copilot.chat.edits.codesearch.enabled)`_(preview)_ setting to get the best results.
141
+
140
142
* Drag and drop editor tabs, or files or folders from the Explorer view, Search view, or editor breadcrumb onto the Copilot Edits view.
141
143
142
144
When you drop a folder onto the Copilot Edits view, all files in that folder are added to the working set.
@@ -155,13 +157,13 @@ When Copilot Edits generates edits for your project, it visually indicates which
155
157
156
158
## Accept or discard edits
157
159
158
-
Copilot Edits gives you a code review flow where you can accept or discard each of the AI-generated edits. When you accept the AI-generated edits, the file changes are confirmed in the working set. If you discard the edits, the files are restored to their previously accepted state.
160
+
Copilot Edits gives you a code review flow where you can accept or discard each of the AI-generated edits. If you discard the edits, the modified files are restored to their previously accepted state.
159
161
160
-
Navigate between the different edits in your project by using the editor overlay controls. Use the **Accept**and**Discard**controls to accept or reject all changes for a given file.
162
+
With the editor overlay controls, you can navigate between the suggested edits by using the <iclass="codicon codicon-arrow-up"></i> and <iclass="codicon codicon-arrow-down"></i> controls. Use the **Accept**or**Discard**button to accept or reject the edits for a given file.
161
163
162
164

163
165
164
-
For more fine-grained control over which edit you want to accept or reject within a file, hover over the code edit and select the **Undo**control to reject a change.
166
+
To accept or discard a specific edit within a file, hover over the code edit and use the **Accept**or **Discard** controls for that edit.
165
167
166
168
Alternatively, you can also accept or discard the changes from the working set in the Copilot Edits view:
167
169
@@ -171,16 +173,12 @@ Alternatively, you can also accept or discard the changes from the working set i
171
173
172
174

173
175
174
-
## Save generated edits
175
-
176
-
Copilot Edits shows the generated edits in-place in your code but doesn't automatically save the changes to disk (notice the dirty indicator in the editor tab). As part of reviewing the edits, you might depend on automated tasks that are triggered by a file change, such as a build or test task. You can save the individual files or select **Save All** (`kb(chatEditing.saveAllFiles)`) in the working set to save the edits to disk.
177
-
178
-

176
+
With the `setting(chat.editing.autoAcceptDelay)` setting, you can configure a delay after which the suggested edits are automatically accepted. Hover over the editor overlay controls to cancel the auto-accept countdown.
179
177
180
-
When you save a file that contains AI-generated changes, a confirmation dialog is shown. In the dialog, you can check the option to always save files without asking for confirmation. When checked, the Save All control is no longer shown. You can reset the confirmation by using the `setting(chat.editing.alwaysSaveWithGeneratedChanges)` setting.
178
+
When you close VS Code, the status of the pending edits is remembered. When you reopen VS Code, the pending edits are restored and you can still accept or discard the edits.
181
179
182
180
> [!NOTE]
183
-
> Saving the files doesn't mean that you automatically accept the changes. After saving the files, you can still accept or discard the generated edits.
181
+
> In agent mode, edits are automatically saved to disk, regardless if Auto Save (`setting(files.autoSave)`) is enabled. You can still review the edits and choose to discard them if needed.
184
182
185
183
## Undo edits
186
184
@@ -234,6 +232,8 @@ The following list contains the settings related to Copilot Edits. You can confi
234
232
*`setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
235
233
*`setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
236
234
*`setting(github.copilot.chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
235
+
*`setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
236
+
*`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
237
*`setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 15)
238
238
239
239
## Keyboard shortcuts
@@ -256,7 +256,7 @@ The following list contains the default keyboard shortcuts related to Copilot Ed
256
256
257
257
* Multiple simultaneous edit sessions are not supported yet.
258
258
* The use of `@workspace /new` to scaffold a new project is not supported yet in an Edit session. For now, use Copilot Chat for the initial scaffolding.
259
-
* Although `#codebase` is great at finding relevant context for your query, subsequent generated edits are of widely varying quality. Explicitly adding filesto your working set creates better results.
259
+
* Although `#codebase` is great at finding relevant context for your query, subsequent generated edits are of widely varying quality. Experiment with the `setting(github.copilot.chat.edits.codesearch.enabled)`_(preview)_ setting for an improved, agentic experience to find files, or explicitly add files to your working set to create better results.
260
260
* Support for Jupyter notebooks, other custom text formats, and binary file formats is absent or untested.
261
261
* The working set is currently limited to 10 files.
262
262
* Copilot Edits is limited to 7 editing requests per 10 minutes.
Copy file name to clipboardExpand all lines: docs/copilot/copilot-settings.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ The team is continuously working on improving Copilot in VS Code and adding new
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
50
*`setting(github.copilot.chat.agent.enabled)` <iclass="codicon codicon-beaker"></i> - enable or disable agent mode in Copilot Edits (default: `false`)
51
+
*`setting(chat.editing.autoAcceptDelay)` - configure a delay after which suggested edits are automatically accepted, use zero to disable auto-accept (default: 0)
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`)
51
53
*`setting(chat.agent.maxRequests)` - maximum number of requests that Copilot Edits can make in agent mode (default: 15)
0 commit comments