@github/copilot 0.0.335-17 → 0.0.335-19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +32 -28
- package/package.json +2 -2
- package/sdk/index.js +239 -235
- package/sdk/index.js.map +2 -2
package/index.js
CHANGED
|
@@ -1034,25 +1034,25 @@ Changes made did not work, plan out how to approach the changes differently.
|
|
|
1034
1034
|
2. Reason out what part of the changes should be kept and what should be reverted based on issue being fixed.
|
|
1035
1035
|
3. Calculate if too much deletion is happening, for each file and undo any that are too large.
|
|
1036
1036
|
4. Create a new plan on what to do differently.
|
|
1037
|
-
</think_tool_example_2>`,lAl=(t={},e={},l={},I,n)=>{let
|
|
1037
|
+
</think_tool_example_2>`,lAl=(t={},e={},l={},I,n,r)=>{let a=l.shellConfig||DZ.bash,o=`
|
|
1038
1038
|
You have access to several tools. Below are additional guidelines on how to use some of them effectively:
|
|
1039
1039
|
<tools>
|
|
1040
|
-
<${
|
|
1041
|
-
${
|
|
1040
|
+
<${a.shellToolName}>
|
|
1041
|
+
${a.shellToolName} is your primary tool for running commands.
|
|
1042
1042
|
Pay attention to following when using it:
|
|
1043
1043
|
* Give long-running commands adequate time to succeed when using \`async=false\` via the \`timeout\` parameter.
|
|
1044
1044
|
* Use with \`async=false\` when:
|
|
1045
1045
|
* Running long-running commands that require more than 2 minutes to complete, such as building the code, running tests, or linting that may take 5 to 10 minutes to complete.
|
|
1046
|
-
* If the command times out, ${
|
|
1046
|
+
* If the command times out, ${a.readShellToolName} with the same \`sessionId\` again to wait for the command to complete.
|
|
1047
1047
|
* Use with \`async=true\` when:
|
|
1048
1048
|
* Working with interactive tools and daemons; particularly for tasks that require multiple steps or iterations, or when it helps you avoid temporary files, scripts, or input redirection.
|
|
1049
1049
|
* For interactive tools:
|
|
1050
|
-
* First, use ${
|
|
1051
|
-
* Then, use ${
|
|
1050
|
+
* First, use ${a.shellToolName} with \`async=true\` to run the command
|
|
1051
|
+
* Then, use ${a.writeShellToolName} to write input. Input can send be text, {up}, {down}, {left}, {right}, {enter}, and {backspace}.
|
|
1052
1052
|
* You can use both text and keyboard input in the same input to maximize for efficiency. E.g. input \`my text{enter}\` to send text and then press enter.
|
|
1053
1053
|
* Use command chains to run multiple dependent commands in a single call sequentially.
|
|
1054
1054
|
* ALWAYS disable pagers (e.g., \`git --no-pager\`, \`less -F\`, or pipe to \`| cat\`) to avoid unintended timeouts.
|
|
1055
|
-
</${
|
|
1055
|
+
</${a.shellToolName}>
|
|
1056
1056
|
${e.search?nAl:""}${n&&ks(n,nde)?`
|
|
1057
1057
|
<${Ww}>
|
|
1058
1058
|
${Ww} is your tool for getting automated code reviews for your changes.
|
|
@@ -1086,33 +1086,33 @@ ${t.toolInstructions??""}
|
|
|
1086
1086
|
|
|
1087
1087
|
Here are some examples of suggested tool calls. Follow them in tone and style.
|
|
1088
1088
|
<examples>
|
|
1089
|
-
<examples_for_${
|
|
1089
|
+
<examples_for_${a.shellToolName}_longrunning_commands>
|
|
1090
1090
|
* command: \`npm run build\`, timeout: 200, async: false
|
|
1091
1091
|
* command: \`dotnet restore\`, timeout: 300, async: false
|
|
1092
1092
|
* command: \`npm run test\`, timeout: 200, async: false
|
|
1093
1093
|
* command: \`npm run pytest\`, timeout: 300, async: false
|
|
1094
|
-
</examples_for_${
|
|
1095
|
-
<examples_for_${
|
|
1094
|
+
</examples_for_${a.shellToolName}_longrunning_commands>
|
|
1095
|
+
<examples_for_${a.shellToolName}_async_commands>
|
|
1096
1096
|
* Exercising a command line or server application.
|
|
1097
1097
|
* Debugging a code change that is not working as expected, with a command line debugger like GDB.
|
|
1098
1098
|
* Running a diagnostics server, such as \`npm run dev\`, \`tsc --watch\` or \`dotnet watch\`, to continuously build and test code changes.
|
|
1099
|
-
* Utilizing interactive features of the ${
|
|
1099
|
+
* Utilizing interactive features of the ${a.displayName} shell, python REPL, mysql shell, or other interactive tools.
|
|
1100
1100
|
* Installing and running a language server (e.g. for TypeScript) to help you navigate, understand, diagnose problems with, and edit code. Use the language server instead of command line build when possible.
|
|
1101
|
-
</examples_for_${
|
|
1102
|
-
<examples_for_${
|
|
1101
|
+
</examples_for_${a.shellToolName}_async_commands>
|
|
1102
|
+
<examples_for_${a.shellToolName}_interactive_commands>
|
|
1103
1103
|
* Do a maven install that requires a user confirmation to proceed:
|
|
1104
|
-
* Step 1: ${
|
|
1105
|
-
* Step 2: ${
|
|
1104
|
+
* Step 1: ${a.shellToolName} command: \`mvn install\`, async: true, sessionId: "maven-install"
|
|
1105
|
+
* Step 2: ${a.writeShellToolName} input: \`y\`, sessionId: "maven-install", delay: 30
|
|
1106
1106
|
* Use keyboard navigation to select an option in a command line tool:
|
|
1107
|
-
* Step 1: ${
|
|
1108
|
-
* Step 2: ${
|
|
1109
|
-
</examples_for_${
|
|
1110
|
-
<examples_for_${
|
|
1107
|
+
* Step 1: ${a.shellToolName} command to start the interactive tool, with async: true and sessionId: "interactive-tool"
|
|
1108
|
+
* Step 2: ${a.writeShellToolName} input: \`{down}{down}{down}{enter}\`, sessionId: "interactive-tool"
|
|
1109
|
+
</examples_for_${a.shellToolName}_interactive_commands>
|
|
1110
|
+
<examples_for_${a.shellToolName}_command_chains>
|
|
1111
1111
|
* \`npm run build && npm run test\` to build the code and then run tests.
|
|
1112
1112
|
* \`git --no-pager status && git --no-pager diff\` to check the status of the repository and then see the changes made.
|
|
1113
1113
|
* \`git checkout <file> && git diff <file>\` to revert changes to a file and then see the changes made.
|
|
1114
1114
|
* \`git --no-pager show <commit1> -- file1.text && git --no-pager show <commit2> -- file2.txt\` to see the changes made to two files in two different commits.
|
|
1115
|
-
</examples_for_${
|
|
1115
|
+
</examples_for_${a.shellToolName}_command_chains>
|
|
1116
1116
|
<examples_for_custom_agents>
|
|
1117
1117
|
* A custom agent described as an expert in Python code editing exists -- use it to make Python code changes. Do not view or validate the changes.
|
|
1118
1118
|
* A custom agent named "merge_conflict_resolver" exists -- use it to resolve merge conflicts. Do not view or validate the changes.
|
|
@@ -1124,16 +1124,20 @@ ${IAl(l)}
|
|
|
1124
1124
|
</examples>
|
|
1125
1125
|
|
|
1126
1126
|
Your thinking should be thorough, so it's fine if it's very long.
|
|
1127
|
-
`;return I&&(
|
|
1127
|
+
`;return I&&(o+=`
|
|
1128
1128
|
|
|
1129
1129
|
Custom instructions from user's \`${I.sourcePath}\`:
|
|
1130
1130
|
${I.content}
|
|
1131
|
-
`,I.additionalInstructions&&(
|
|
1131
|
+
`,I.additionalInstructions&&(o+=`
|
|
1132
1132
|
Additional instructions from user's \`${I.additionalInstructions.sourcePath}\`:
|
|
1133
1133
|
${I.additionalInstructions.content}
|
|
1134
|
-
`)),
|
|
1134
|
+
`)),r&&(o+=`
|
|
1135
|
+
|
|
1136
|
+
Organization custom instructions:
|
|
1137
|
+
${r}
|
|
1138
|
+
`),o+=e.parallel_tool_calls?`<tool_calling>
|
|
1135
1139
|
${Dit()}
|
|
1136
|
-
</tool_calling>`:"",
|
|
1140
|
+
</tool_calling>`:"",o};var zit=async(t,e,l,I={},n={},r={},a,o)=>{let s=await mHe(t,!0),d=_it.type(),G=t===""?"":bee(t),u=(await Promise.all(["git","curl","gh"].map(async W=>await Uit(W)!==null?W:null))).filter(W=>W!==null).join(", ");return`
|
|
1137
1141
|
You are the GitHub Copilot CLI, a terminal assistant built by GitHub.
|
|
1138
1142
|
You are an interactive CLI tool that helps users with software engineering tasks.
|
|
1139
1143
|
|
|
@@ -1169,10 +1173,10 @@ Version number: ${e}
|
|
|
1169
1173
|
<environment_context>
|
|
1170
1174
|
You are working in the following environment. You do not need to make additional tool calls to verify this.
|
|
1171
1175
|
* Current working directory: ${l}
|
|
1172
|
-
* Git repository root: ${
|
|
1173
|
-
* Operating System: ${
|
|
1176
|
+
* Git repository root: ${G!==""?G:"Not a git repository"}
|
|
1177
|
+
* Operating System: ${d}
|
|
1174
1178
|
|
|
1175
|
-
You can assume you have internet access, and can use locally installed tools, including ${
|
|
1179
|
+
You can assume you have internet access, and can use locally installed tools, including ${u} and other command-line utilities.
|
|
1176
1180
|
</environment_context>
|
|
1177
1181
|
|
|
1178
1182
|
Your job is to perform the task the user requested. If changes are needed, make the **smallest possible changes** to files in the environment to correctly address the user's request. Your changes should be surgical and precise.
|
|
@@ -1242,7 +1246,7 @@ There is an important exception: lists are appropriate when the user specificall
|
|
|
1242
1246
|
When in doubt, choose prose over bullets. NEVER output a series of overly short bullet points.
|
|
1243
1247
|
</avoid_excessive_markdown_and_bullet_points>
|
|
1244
1248
|
|
|
1245
|
-
${lAl(I,n,r,a)}`.trim()};var Mit=t=>`Here is the url of a screenshot: ${t}. You can use it to include in the PR description if it is suitable for the task.`,Dit=()=>`You have the capability to call multiple tools in a single response. For maximum efficiency, whenever you need to perform multiple independent operations, ALWAYS call tools simultaneously whenever the actions can be done in parallel rather than sequentially.
|
|
1249
|
+
${lAl(I,n,r,s,a,o)}`.trim()};var Mit=t=>`Here is the url of a screenshot: ${t}. You can use it to include in the PR description if it is suitable for the task.`,Dit=()=>`You have the capability to call multiple tools in a single response. For maximum efficiency, whenever you need to perform multiple independent operations, ALWAYS call tools simultaneously whenever the actions can be done in parallel rather than sequentially.
|
|
1246
1250
|
Especially when exploring repository, searching, reading files, viewing directories, validating changes, reporting progress or replying to comments. For Example you can read 3 different files parallelly, or report progress and edit different files in parallel. Always report progress in parallel with other tool calls that follow it as it does not depend on the result of those calls.
|
|
1247
1251
|
However, if some tool calls depend on previous calls to inform dependent values like the parameters, do NOT call these tools in parallel and instead call them sequentially.`,IAl=(t={})=>t.splitEditingTools?`<str_replace>
|
|
1248
1252
|
You can use the **str_replace** tool to batch edits to the same file in a single response. The tool will apply edits in sequential order, removing the risk of a reader/writer conflict.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@github/copilot",
|
|
3
3
|
"description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.",
|
|
4
|
-
"version": "0.0.335-
|
|
4
|
+
"version": "0.0.335-19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"sdk/**/*"
|
|
34
34
|
],
|
|
35
35
|
"buildMetadata": {
|
|
36
|
-
"gitCommit": "
|
|
36
|
+
"gitCommit": "b921a52"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"node-pty": "npm:@devm33/node-pty@^1.0.8",
|