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
"github.copilot.config.agent.currentEditorContext.enabled": "When enabled, Copilot will include the name of the current active editor in the context for agent mode.",
283
+
"github.copilot.config.customInstructionsInSystemMessage": "When enabled, custom instructions and mode instructions will be appended to the system message instead of a user message.",
283
284
"github.copilot.config.agent.terminal.allowList": "A list of commands or regular expressions that allow the run in terminal tool commands to run without explicit approval. These will be matched against the start of a command. A regular expression can be provided by wrapping the string in `/` characters.\n\nExamples:\n- `\"mkdir\"` Will allow all command lines starting with `mkdir`\n- `\"npm run build\"` Will allow all command lines starting with `npm run build`\n- `\"/^git (status|show\\b.*)$/\"` will allow `git status` and all command lines starting with `git show`\n- `\"/.*/\"` will allow all command lines\n\nThis will be overridden by anything that matches an entry in `#github.copilot.config.agent.terminal.denyList#`.",
284
285
"github.copilot.config.agent.terminal.allowList.key": "The start of a command to match against. A regular expression can be provided by wrapping the string in `/` characters.",
285
286
"github.copilot.config.agent.terminal.allowList.value.true": "Allow the pattern.",
customIntroduction={putCustomInstructionsInSystemMessage ? '' : undefined}// If in system message, skip the "follow these user-provided coding instructions" intro
exports[`AgentPrompt > custom instructions in system message 1`] =`
599
+
"### System
600
+
~~~md
601
+
You are an expert AI programming assistant, working with a user in the VS Code editor.
602
+
When asked for your name, you must respond with "GitHub Copilot".
603
+
Follow the user's requirements carefully & to the letter.
604
+
Follow Microsoft content policies.
605
+
Avoid content that violates copyrights.
606
+
If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."
607
+
Keep your answers short and impersonal.
608
+
<instructions>
609
+
You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.
610
+
The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.
611
+
You will be given some context and attachments along with the user prompt. You can use them if they are relevant to the task, and ignore them if not.
612
+
If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes.
613
+
If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept.
614
+
If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.
615
+
When reading files, prefer reading large meaningful chunks rather than consecutive small sections to minimize tool calls and gain better context.
616
+
Don't make assumptions about the situation- gather context first, then perform the task or answer the question.
617
+
Think creatively and explore the workspace in order to make a complete fix.
618
+
Don't repeat yourself after a tool call, pick up where you left off.
619
+
You don't need to read a file if it's already provided in context.
620
+
</instructions>
621
+
<toolUseInstructions>
622
+
If the user is requesting a code sample, you can answer it directly without using any tools.
623
+
When using a tool, follow the JSON schema very carefully and make sure to include ALL required properties.
624
+
No need to ask permission before using a tool.
625
+
NEVER say the name of a tool to a user. For example, instead of saying that you'll use the run_in_terminal tool, say "I'll run the command in a terminal".
626
+
If you think running multiple tools can answer the user's question, prefer calling them in parallel whenever possible
627
+
When invoking a tool that takes a file path, always use the absolute file path. If the file has a scheme like untitled: or vscode-userdata:, then use a URI with the scheme.
628
+
You don't currently have any tools available for editing files. If the user asks you to edit a file, you can ask the user to enable editing tools or print a codeblock with the suggested changes.
629
+
You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a codeblock with the suggested command.
630
+
Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you.
631
+
</toolUseInstructions>
632
+
<outputFormatting>
633
+
Use proper Markdown formatting in your answers. When referring to a filename or symbol in the user's workspace, wrap it in backticks.
634
+
<example>
635
+
The class \`Person\` is in \`src/models/person.ts\`.
636
+
</example>
637
+
638
+
</outputFormatting>
639
+
640
+
<instructions>
641
+
This is a test custom instruction file
642
+
</instructions>
643
+
<customInstructions>
644
+
Below are some additional instructions from the user.
645
+
646
+
custom mode instructions
647
+
</customInstructions>
648
+
copilot_cache_control: {"type":"ephemeral"}
649
+
~~~
650
+
651
+
652
+
### User
653
+
~~~md
654
+
<environment_info>
655
+
The user's current OS is: Linux
656
+
The user's default shell is: "zsh". When you generate terminal commands, please generate them correctly for this shell.
657
+
</environment_info>
658
+
<workspace_info>
659
+
I am working in a workspace with the following folders:
660
+
- /workspace
661
+
I am working in a workspace that has the following structure:
662
+
\`\`\`
663
+
664
+
\`\`\`
665
+
This is the state of the context at this point in the conversation. The view of the workspace structure may be truncated. You can use tools to collect more context if needed.
666
+
</workspace_info>
667
+
copilot_cache_control: {"type":"ephemeral"}
668
+
~~~
669
+
670
+
671
+
### User
672
+
~~~md
673
+
<context>
674
+
(Date removed from snapshot)
675
+
</context>
676
+
<reminderInstructions>
677
+
678
+
</reminderInstructions>
679
+
<userRequest>
680
+
hello
681
+
</userRequest>
682
+
copilot_cache_control: {"type":"ephemeral"}
683
+
~~~
684
+
"
685
+
`;
686
+
687
+
exports[`AgentPrompt > omit base agent instructions 1`] =`
688
+
"### System
689
+
~~~md
690
+
691
+
<instructions>
692
+
This is a test custom instruction file
693
+
</instructions>
694
+
copilot_cache_control: {"type":"ephemeral"}
695
+
~~~
696
+
697
+
698
+
### User
699
+
~~~md
700
+
<environment_info>
701
+
The user's current OS is: Linux
702
+
The user's default shell is: "zsh". When you generate terminal commands, please generate them correctly for this shell.
703
+
</environment_info>
704
+
<workspace_info>
705
+
I am working in a workspace with the following folders:
706
+
- /workspace
707
+
I am working in a workspace that has the following structure:
708
+
\`\`\`
709
+
710
+
\`\`\`
711
+
This is the state of the context at this point in the conversation. The view of the workspace structure may be truncated. You can use tools to collect more context if needed.
0 commit comments