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-customization.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ You can specify custom instructions for specific purposes:
20
20
21
21
***Test-generation instructions** - provide context specific for generating tests. For example, you can specify that all generated tests should use a specific testing framework. You can specify test-generation instructions in settings, or in a Markdown file in your workspace.
22
22
23
+
***Code review instructions** - provide context specific for reviewing the current editor selection. For example, you can specify that the reviewer should look for a specific type of error in the code. You can specify review-selection instructions in settings, or in a Markdown file in your workspace.
24
+
25
+
***Commit message generation instructions** - provide context specific for generating commit messages. You can specify commit-message-generation instructions in settings, or in a Markdown file in your workspace.
26
+
23
27
Custom instructions consist of natural language instructions and should be short, self-contained statements that add context or relevant information to supplement chat questions.
24
28
25
29
## Define code-generation custom instructions
@@ -107,6 +111,18 @@ Always add code comments.
107
111
Always use React functional components.
108
112
```
109
113
114
+
## Define code review custom instructions
115
+
116
+
You can use Copilot to review a selection of code in the editor. You can define custom instructions to help Copilot take into account specific code review criteria that are relevant to your project and development workflow.
117
+
118
+
To configure custom code review instructions, use the `setting(github.copilot.chat.reviewSelection.instructions)` setting. You can define custom instructions at the User or Workspace level.
In the Source Control view, you can use Copilot to generate a commit message for the pending code changes. You can define custom instructions to help Copilot generate a commit message that takes into account specific formatting and structure that are specific to your project and development workflow.
123
+
124
+
To configure custom commit message generation instructions, use the `setting(github.copilot.chat.commitMessageGeneration.instructions)` setting. You can define custom instructions at the User or Workspace level.
125
+
110
126
## Tips for defining custom instructions
111
127
112
128
* Keep your instructions short and self-contained. Each instruction should be a single, simple statement. If you need to provide multiple pieces of information, use multiple instructions.
@@ -117,9 +133,11 @@ Always use React functional components.
117
133
118
134
## Settings
119
135
120
-
*`setting(github.copilot.chat.codeGeneration.instructions)` <iclass="codicon codicon-beaker"></i>: A set of instructions that are added to Copilot requests that generate code.
121
-
*`setting(github.copilot.chat.codeGeneration.useInstructionFiles)` <iclass="codicon codicon-beaker"></i>: Controls whether code instructions from `.github/copilot-instructions.md` are added to Copilot requests.
122
-
*`setting(github.copilot.chat.testGeneration.instructions)` <iclass="codicon codicon-beaker"></i>: A set of instructions that are added to Copilot requests that generate tests.
136
+
*`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.
137
+
*`setting(github.copilot.chat.codeGeneration.useInstructionFiles)`_(Preview)_: Controls whether code instructions from `.github/copilot-instructions.md` are added to Copilot requests.
138
+
*`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.
139
+
*`setting(github.copilot.chat.reviewSelection.instructions)`_(Preview)_: A set of instructions that will be added to Copilot requests for reviewing the current editor selection.
140
+
*`setting(github.copilot.chat.commitMessageGeneration.instructions)` <iclass="codicon codicon-beaker"></i>: A set of instructions that will be added to Copilot requests that generate commit messages.
0 commit comments