Skip to content

Commit 89c010a

Browse files
authored
Merge pull request #7723 from ntrogh/ntrogh-195-edits
Merge 1.95 release branch into main (also fixes video in release notes)
2 parents e1def28 + 5f4d7ad commit 89c010a

28 files changed

+403
-12
lines changed

build/sitemap.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@
360360
<changefreq>weekly</changefreq>
361361
<priority>0.8</priority>
362362
</url>
363+
<url>
364+
<loc>https://code.visualstudio.com/docs/copilot/copilot-edits</loc>
365+
<changefreq>weekly</changefreq>
366+
<priority>0.8</priority>
367+
</url>
363368
<url>
364369
<loc>https://code.visualstudio.com/docs/copilot/prompt-crafting</loc>
365370
<changefreq>weekly</changefreq>
@@ -370,6 +375,11 @@
370375
<changefreq>weekly</changefreq>
371376
<priority>0.8</priority>
372377
</url>
378+
<url>
379+
<loc>https://code.visualstudio.com/docs/copilot/copilot-customization</loc>
380+
<changefreq>weekly</changefreq>
381+
<priority>0.8</priority>
382+
</url>
373383
<url>
374384
<loc>https://code.visualstudio.com/docs/copilot/copilot-settings</loc>
375385
<changefreq>weekly</changefreq>

docs/copilot/copilot-edits.md

Lines changed: 203 additions & 0 deletions
Large diffs are not rendered by default.

docs/copilot/copilot-settings.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ The team is continuously working on improving Copilot in VS Code and adding new
3939
* `setting(chat.editor.lineHeight)`: Line height in pixels in chat codeblocks.
4040
* `setting(chat.editor.wordWrap)`: Toggle line wrapping in chat codeblocks.
4141

42+
## Edits settings
43+
44+
* `setting(github.copilot.chat.edits.enabled)` _(Preview)_ - enable or disable Copilot Edits
45+
* `setting(chat.editing.confirmEditRequestRemoval)` - ask for confirmation before undoing an edit (default: `true`)
46+
* `setting(chat.editing.confirmEditRequestRetry)` - ask for confirmation before performing a redo of the last edit (default: `true`)
47+
* `setting(chat.editing.alwaysSaveWithGeneratedChanges)` - automatically save generated changes from Copilot Edits to disk (default: `false`)
48+
4249
## Inline Chat settings
4350

4451
* `setting(inlineChat.acceptedOrDiscardBeforeSave)`: Controls whether pending Inline Chat sessions in an editor prevent saving the file.
@@ -54,6 +61,7 @@ The team is continuously working on improving Copilot in VS Code and adding new
5461
* `setting(github.copilot.chat.codeGeneration.instructions)` <i class="codicon codicon-beaker"></i>: A set of instructions that will be added to Copilot requests that generate code.
5562
* `setting(github.copilot.chat.codeGeneration.useInstructionFiles)` _(Preview)_: Controls whether code instructions from `.github/copilot-instructions.md` are added to Copilot requests.
5663
* `setting(github.copilot.chat.testGeneration.instructions)` <i class="codicon codicon-beaker"></i>: A set of instructions that will be added to Copilot requests that generate tests.
64+
* `setting(github.copilot.chat.reviewSelection.instructions)` _(Preview)_: A set of instructions that will be added to Copilot requests for reviewing the current editor selection.
5765

5866
## Debugging settings
5967

docs/copilot/copilot-vscode-features.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Use natural language to chat with GitHub Copilot and get help with coding tasks.
2323
| Action | Description |
2424
|--------|-------------|
2525
| `kb(workbench.action.chat.open)` | Open the **Chat view** and start a chat conversation with Copilot by using natural language. |
26+
| `kb(workbench.action.chat.openEditSession)` | Open the **Copilot Edits view** and start a code editing session across multiple files. |
2627
| `kb(workbench.action.quickchat.toggle)` | Open **Quick Chat** and ask a quick question to Copilot. |
2728
| `kb(inlinechat.start)` | Start **Inline Chat** to send a chat request to Copilot directly from the editor. Use natural language or use `/` commands to give instructions to Copilot. |
2829
| <i class="codicon codicon-mention"></i> | Type `@` in chat or select <i class="codicon codicon-mention"></i> to view the list of *chat participants*, which are domain experts that can help you in a specific area. Extensions can also contribute additional participants.<br/>Example: `@workspace how is auth implemented?` |
@@ -38,6 +39,27 @@ Use natural language to chat with GitHub Copilot and get help with coding tasks.
3839
> - Be specific, keep it simple, and ask follow-up questions to get the best results.
3940
> - Provide context by attaching files, symbols, or selections to your chat prompt.
4041
42+
## Code editing session (Preview)
43+
44+
Use Copilot Edits to start a code editing session where you can iterate quickly on AI-generated code edits that are applied directly across multiple files in your workspace.
45+
46+
| Action | Description |
47+
|--------|-------------|
48+
| `kb(workbench.action.chat.openEditSession)` | Open the **Copilot Edits view** and start a code editing session across multiple files. |
49+
| <i class="codicon codicon-plus"></i> | Start a new edit session. |
50+
| `Accept` | Accept all current edits. |
51+
| `Discard` | Discard all current edits. |
52+
| <i class="codicon codicon-diff-multiple"></i> | View all edits in a multi-file diff editor. |
53+
| <i class="codicon codicon-discard"></i> | Undo the last edit. |
54+
| <i class="codicon codicon-redo"></i> | Redo the last edit. |
55+
| `Add Files...` | Attach files to working set. |
56+
57+
> **Tips**
58+
>
59+
> - Add all files for which you want to get edits to the working set.
60+
> - Be specific and precise about the changes you want Copilot Edits to make.
61+
> - If you have a larger task, decompose it in smaller tasks and iterate often.
62+
4163
## Generate code from chat
4264

4365
Copilot can generate code blocks in response to your chat prompts. Quickly apply the generated code in your project or insert it in a new file. For example, ask Copilot to optimize an algorithm in your code.
@@ -100,19 +122,29 @@ As you're coding in the editor, you can use Copilot to generate code completions
100122
101123
## Customize AI code generation
102124

103-
Copilot can generate code based on your chat prompt. You can customize the generated code by providing instructions to Copilot. For example, you can ask that generated code always uses a specific coding style, such as private variables should always be prefixed with an underscore.
125+
Copilot can generate responses that match the coding style, tools, and developer workflow of your team or project, provided it has the right context. You can provide custom instructions to help Copilot adjust to your preferences, so that you don't have to provide these details every time you make a Copilot request. These custom instructions are automatically added to your requests. Get more information about [customizing Copilot in VS Code](/docs/copilot/copilot-customization.md).
104126

105127
| Action | Description |
106128
|--------|-------------|
107-
| Code-generation instructions <i class="codicon codicon-beaker"></i> | Define instructions for code generation with GitHub Copilot in settings or import from a file. You can define language-specific instructions. [Get more information](https://code.visualstudio.com/updates/v1_93#_code-generation-instructions). |
108-
| Shared instructions <i class="codicon codicon-beaker"></i> | Define shared instructions for code generation in a `.gitHub/copilot-instructions.md` file in your workspace. These common instructions supplement your own personal code generation instructions. |
109-
| Test-generation instructions <i class="codicon codicon-beaker"></i> | Define instructions for test generation with GitHub Copilot in settings or import from a file. You can define language-specific instructions. [Get more information](https://code.visualstudio.com/updates/v1_94#_custom-instructions-experimental). |
129+
| File-based instructions _(Preview)_ | Define shared instructions for code generation in a `.gitHub/copilot-instructions.md` file in your workspace. These common instructions supplement your own personal code-generation instructions. |
130+
| Code-review instructions _(Preview)_ | Define instructions for using Copilot to review an editor selection in settings or import from a file. You can define language-specific instructions. |
131+
| Code-generation instructions <i class="codicon codicon-beaker"></i> | Define instructions for code generation with GitHub Copilot in settings or import from a file. You can define language-specific instructions. |
132+
| Test-generation instructions <i class="codicon codicon-beaker"></i> | Define instructions for test generation with GitHub Copilot in settings or import from a file. You can define language-specific instructions. |
110133

111134
> **Tips**
112135
>
113136
> - Define language-specific instructions to get more accurate generated code for each language.
114137
> - Store your instructions in a file to easily share them with your team and across projects.
115138
139+
## Review code (Preview)
140+
141+
Copilot can do a quick review pass of a code block or perform a review of uncommitted changes in your workspace. Review feedback shows up as comments in the editor, where you can apply the suggestions.
142+
143+
| Action | Description |
144+
|--------|-------------|
145+
| **Review and Comment** _(Preview)_ | Select a block of code, and select **Copilot** > **Review and Comment** from the editor context menu for quick review pass. |
146+
| **Copilot Code Review** | Select the **Copilot Code Review** button in the Source Control view for a deeper review of all uncommitted changes. Join the [waitlist](https://gh.io/copilot-code-review-waitlist). |
147+
116148
## Generate tests
117149

118150
Copilot can generate tests for functions and methods in your codebase. Get more information about [slash commands in Chat](/docs/copilot/copilot-chat.md#slash-commands).
@@ -121,6 +153,7 @@ Copilot can generate tests for functions and methods in your codebase. Get more
121153
|--------|-------------|
122154
| `/tests` | Generate tests for all or only the selected methods and functions in the editor. The generated tests are appended in an existing tests file or a new tests file is created. |
123155
| `/setupTests` | Get help setting up a testing framework for your code. Get recommendation for a relevant testing framework, steps to set up and configure it, and suggestions for VS Code testing extensions. |
156+
| `/fixTestFailure` | Ask Copilot for suggestions on how to fix failing tests. |
124157
| Test coverage <i class="codicon codicon-beaker"></i> | Generate tests for functions and methods that are not yet covered by tests. [Get more information](https://code.visualstudio.com/updates/v1_93#_generate-tests-based-on-test-coverage-experimental). |
125158

126159
> **Tips**
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:be1a03a2a2869d65132321621ade57eb0e1671c8486b19aa8bb81b64a14d2773
3+
size 2477068
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)