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/ide/copilot-chat-context.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,20 @@ To configure custom instructions:
52
52
53
53
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.
54
54
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
+
55
69
## <aname="slash-commands"></a>Use slash commands in Copilot Chat for common tasks
56
70
57
71
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
116
130
Reference output logs in chat in one of the following ways:
117
131
118
132
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.
120
134
1. Ask Copilot directly, for example, *Check my output logs and help me fix this error*.
121
135
1. Right-click in the **Output Window** and select **Explain with Copilot** to attach it.
0 commit comments