Skip to content

Commit 8ccc4eb

Browse files
committed
Prompt and instruction files release notes, first cut
1 parent 3cfda70 commit 8ccc4eb

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

release-notes/v1_100.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,56 @@ We've implemented support for OpenAI's apply patch editing format when using GPT
136136

137137
If a file edit in agent mode introduces new errors, agent mode can now detect them and automatically propose a followup edit. You can disable this behavior with `setting(github.copilot.chat.agent.autoFix)`.
138138

139+
### Prompt and instruction files
140+
141+
We now distinguish between 'instructions' and 'prompt' files, each with their own file suffix and features. The purpose of the separation is to align with the existing custom instructions feature, clarify the purposes and make the UI more intuitive.
142+
143+
**Instruction files** (aka custom instructions, rule files) provide context to a request, typically describing code guidelines or specifying which framework to use.
144+
145+
Instruction files use the `.instructions.md` file suffix. They can be located in your user data folder or in the workspace. The `setting(chat.instructionsFilesLocations)` setting lists the folder where instruction file are searched for.
146+
147+
Instructions files can be added manually or automatically to chat requests.
148+
- To add them manually, use the `Add Context ` button in the chat view and select `Instructions...`. Alternativly use the `Chat: Attach Instructions File...` command from the command palette. Then select the instructions file to attach.
149+
- To have them added automatically, add the `applyTo` header to the instructions file. If a chat request contains a file that matches the given pattern, the instructions file will also be attached.
150+
````md
151+
---
152+
applyTo: '**/*.ts'
153+
---
154+
Place curly braces on separate lines for multi-line blocks:
155+
if (condition)
156+
{
157+
doSomething();
158+
}
159+
else
160+
{
161+
doSomethingElse();
162+
}
163+
````
164+
165+
166+
**Prompt files** describe a complete chat request, including the user query, mode and tools to use.
167+
168+
Prompt files use the `.prompt.md` file suffix. They can be located in your user data folder or in the workspace. The `setting(chat.promptFilesLocations)` setting lists the folder where prompt file are searched for.
169+
170+
171+
To run a prompt file, you can
172+
- type `/` in the chat input field and select your prompt
173+
- open the prompt file in an editor and press the 'Play' button in the editor tool bar
174+
- use the 'Chat: Run Prompt File...' command from the command palette
175+
176+
Use the following headers to specify how the prompt is run:
177+
- `mode` to select whether the prompt is invoked in `ask`, `edit` or `agent` mode
178+
- If the mode is `agent`, use `tools` to select the tools that are available for the prompt.
179+
180+
```md
181+
---
182+
mode: 'agent'
183+
tools: ['getCurrentMilestone', 'getReleaseFeatures', 'file_search', 'semantic_search', 'read_file', 'insert_edit_into_file', 'create_file', 'replace_string_in_file', 'fetch_webpage', 'vscode_search_extensions_internal']
184+
---
185+
Generate release notes for the features I worked in the current release and update them in the release notes file. Use [release notes writing instructions file](.github/instructions/release-notes-writing.instructions.md) as a guide.
186+
```
187+
188+
139189
## Accessibility
140190

141191
### Merge editor improvements

0 commit comments

Comments
 (0)