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-settings.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,13 @@ The team is continuously working on improving Copilot in VS Code and adding new
39
39
*`setting(chat.editor.lineHeight)`: Line height in pixels in chat codeblocks.
40
40
*`setting(chat.editor.wordWrap)`: Toggle line wrapping in chat codeblocks.
41
41
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
+
42
49
## Inline Chat settings
43
50
44
51
*`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
54
61
*`setting(github.copilot.chat.codeGeneration.instructions)` <iclass="codicon codicon-beaker"></i>: A set of instructions that will be added to Copilot requests that generate code.
55
62
*`setting(github.copilot.chat.codeGeneration.useInstructionFiles)`_(Preview)_: Controls whether code instructions from `.github/copilot-instructions.md` are added to Copilot requests.
56
63
*`setting(github.copilot.chat.testGeneration.instructions)` <iclass="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.
Copy file name to clipboardExpand all lines: docs/copilot/copilot-vscode-features.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ Use natural language to chat with GitHub Copilot and get help with coding tasks.
23
23
| Action | Description |
24
24
|--------|-------------|
25
25
|`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. |
26
27
|`kb(workbench.action.quickchat.toggle)`| Open **Quick Chat** and ask a quick question to Copilot. |
27
28
|`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. |
28
29
| <iclass="codicon codicon-mention"></i> | Type `@` in chat or select <iclass="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.
38
39
> - Be specific, keep it simple, and ask follow-up questions to get the best results.
39
40
> - Provide context by attaching files, symbols, or selections to your chat prompt.
40
41
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
+
| <iclass="codicon codicon-plus"></i> | Start a new edit session. |
50
+
|`Accept`| Accept all current edits. |
51
+
|`Discard`| Discard all current edits. |
52
+
| <iclass="codicon codicon-diff-multiple"></i> | View all edits in a multi-file diff editor. |
53
+
| <iclass="codicon codicon-discard"></i> | Undo the last edit. |
54
+
| <iclass="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
+
41
63
## Generate code from chat
42
64
43
65
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
100
122
101
123
## Customize AI code generation
102
124
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).
104
126
105
127
| Action | Description |
106
128
|--------|-------------|
107
-
| Code-generation instructions <iclass="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 <iclass="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 <iclass="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 <iclass="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 <iclass="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. |
110
133
111
134
> **Tips**
112
135
>
113
136
> - Define language-specific instructions to get more accurate generated code for each language.
114
137
> - Store your instructions in a file to easily share them with your team and across projects.
115
138
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
+
116
148
## Generate tests
117
149
118
150
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
121
153
|--------|-------------|
122
154
|`/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. |
123
155
|`/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. |
124
157
| Test coverage <iclass="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). |
0 commit comments