Skip to content

Commit 1a833e6

Browse files
committed
Add prompt files
1 parent aeca9ad commit 1a833e6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

docs/ide/copilot-chat-context.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ To configure custom instructions:
5252

5353
Custom instructions are not visible in the Chat view or inline chat. However, when used by Copilot, the`.github/copilot-instructions.md` file is listed in the References list of a response.
5454

55+
## Use prompt files
56+
57+
You can now create reusable prompt files in your repository to run or share your frequently used prompts.
58+
59+
To create a prompt file:
60+
1. Write your prompts as you normally would in the prompt box, using `#` references to include specific information from your solution, such as methods, classes, and files. You can even reference other prompt files for shared instructions.
61+
1. Copy the prompt into a markdown file, and save it with the `.prompt.md` extension in the `.github/prompts` folder at the root of your repository.
62+
63+
To use a prompt file:
64+
1. Type `#prompt:` in chat input to reference any prompt files from your `.github/prompts` folder, or click the ➕ icon in the chat input to add it as context.
65+
1. Add any extra details, or simply enter the prompt as is.
66+
67+
:::image type="content" source="media/vs-2022/copilot-chat-context/prompt-files.png" alt-text="Screenshot of using prompt files in GitHub Copilot Chat.":::
68+
5569
## <a name="slash-commands"></a>Use slash commands in Copilot Chat for common tasks
5670

5771
Slash commands in Copilot Chat help you set the intent quickly for common development tasks. By using specific slash commands to form your question, you can get better answers without having to write out long questions.
@@ -116,7 +130,7 @@ You can now use the output window as context in chat to ask questions and get he
116130
Reference output logs in chat in one of the following ways:
117131

118132
1. Use *#output* to reference it directly in chat.
119-
1. Select the `+` icon in the chat input and add `Output logs` as context.
133+
1. Select the icon in the chat input and add `Output logs` as context.
120134
1. Ask Copilot directly, for example, *Check my output logs and help me fix this error*.
121135
1. Right-click in the **Output Window** and select **Explain with Copilot** to attach it.
122136

22.4 KB
Loading

0 commit comments

Comments
 (0)