@github/copilot 1.0.30 → 1.0.31
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/app.js +1167 -1167
- package/changelog.json +7 -0
- package/package.json +8 -8
- package/prebuilds/darwin-arm64/computer.node +0 -0
- package/prebuilds/darwin-arm64/keytar.node +0 -0
- package/prebuilds/darwin-arm64/pty.node +0 -0
- package/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/prebuilds/darwin-x64/computer.node +0 -0
- package/prebuilds/darwin-x64/keytar.node +0 -0
- package/prebuilds/darwin-x64/pty.node +0 -0
- package/prebuilds/darwin-x64/spawn-helper +0 -0
- package/prebuilds/win32-arm64/computer.node +0 -0
- package/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/prebuilds/win32-arm64/conpty.node +0 -0
- package/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/prebuilds/win32-arm64/keytar.node +0 -0
- package/prebuilds/win32-arm64/win32.node +0 -0
- package/prebuilds/win32-x64/computer.node +0 -0
- package/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/prebuilds/win32-x64/conpty.node +0 -0
- package/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/prebuilds/win32-x64/keytar.node +0 -0
- package/prebuilds/win32-x64/win32.node +0 -0
- package/ripgrep/bin/darwin-arm64/rg +0 -0
- package/ripgrep/bin/darwin-x64/rg +0 -0
- package/ripgrep/bin/win32-arm64/rg.exe +0 -0
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/sdk/index.js +2 -2
package/changelog.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./changelog-schema.json",
|
|
3
3
|
"unpublished": [],
|
|
4
|
+
"1.0.31": [
|
|
5
|
+
{
|
|
6
|
+
"type": "fixed",
|
|
7
|
+
"description": "Prompt frame no longer causes rendering issues on Windows and Ubuntu terminals",
|
|
8
|
+
"related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/6428"]
|
|
9
|
+
}
|
|
10
|
+
],
|
|
4
11
|
"1.0.30": [
|
|
5
12
|
{
|
|
6
13
|
"type": "added",
|
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": "1.0.
|
|
4
|
+
"version": "1.0.31",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"conpty_console_list_agent.js"
|
|
63
63
|
],
|
|
64
64
|
"buildMetadata": {
|
|
65
|
-
"gitCommit": "
|
|
65
|
+
"gitCommit": "3124efa"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@github/copilot-linux-x64": "1.0.
|
|
69
|
-
"@github/copilot-linux-arm64": "1.0.
|
|
70
|
-
"@github/copilot-darwin-x64": "1.0.
|
|
71
|
-
"@github/copilot-darwin-arm64": "1.0.
|
|
72
|
-
"@github/copilot-win32-x64": "1.0.
|
|
73
|
-
"@github/copilot-win32-arm64": "1.0.
|
|
68
|
+
"@github/copilot-linux-x64": "1.0.31",
|
|
69
|
+
"@github/copilot-linux-arm64": "1.0.31",
|
|
70
|
+
"@github/copilot-darwin-x64": "1.0.31",
|
|
71
|
+
"@github/copilot-darwin-arm64": "1.0.31",
|
|
72
|
+
"@github/copilot-win32-x64": "1.0.31",
|
|
73
|
+
"@github/copilot-win32-arm64": "1.0.31"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/sdk/index.js
CHANGED
|
@@ -1282,7 +1282,7 @@ ${t}
|
|
|
1282
1282
|
</items_to_consolidate>
|
|
1283
1283
|
|
|
1284
1284
|
Please consolidate the memory items.
|
|
1285
|
-
`,$0r=T.object({subject:T.string().describe("The topic to which this memory relates. 1-2 words. Examples: 'naming conventions', 'testing practices', 'documentation', 'logging', 'authentication', 'sanitization', 'error handling'."),fact:T.string().describe("A clear and short description of a fact about the codebase or a convention used in the codebase. Must be less than 200 characters. Examples: 'Use JWT for authentication.', 'Follow PEP 257 docstring conventions.', 'Use single quotes for strings in Python.', 'Use Winston for logging.'"),citations:T.string().describe("The source of this fact, such as a file and line number in the codebase (e.g., 'path/file.go:123'). If the convention is not explicitly stated in the codebase, you can point at several examples that illustrate it, selecting the most diverse set of examples you can find (e.g. from multiple files or contexts). If the fact is based on user input, the citations should be 'User input: ' followed by the contents of the input."),reason:T.string().describe("A clear and detailed explanation of the reason behind storing this fact. Must be at least 2-3 sentences long, and include which future tasks this fact will be useful for and why it is important to remember this fact.")}),gIo=$0r.extend({scope:T.enum(["repository","user"]).describe("The scope of the memory being stored. Use 'repository' for facts about the codebase: conventions, build commands, architecture (default). Use 'user' for personal preferences: coding style preferences, workflow habits, communication preferences.")});eGr=T.object({fact:T.string().min(1).describe("The exact fact text of the memory to vote on. Must match the memory fact exactly as it appears in the prompt."),direction:T.enum(["upvote","downvote"]).describe('Vote direction: "upvote" for useful verified memories, "downvote" for incorrect or outdated memories.'),reason:T.string().min(1).describe("A clear and detailed explanation of the reason for your vote. Must be at least 2-3 sentences long, preferably including supporting evidence. For an 'upvote', include anything you did to verify the accuracy of the memory (e.g. looking up the citations, finding supporting examples of a convention or pattern in the codebase). For a 'downvote', specify why you think the memory is inaccurate or outdated (e.g. if the citation is incorrect, if there is counter-evidence elsewhere, if the user has indicated disagreement with the memory). Wherever possible, include codebase file and line numbers and/or exact quotations from users to support your voting decision.")});sce=class{toolName;toolDescription;isScopeAware;voteToolName;voteToolDescription;memoryStrategy;permissions;storeInstructions;constructor(e){this.memoryStrategy=e.memoryStrategy,this.permissions=e.permissions??{requestRequired:!1},this.storeInstructions=e.storeInstructions,this.toolName=e.name??bE,this.toolDescription=e.description??hIo,this.voteToolName=e.voteToolName??uIo,this.voteToolDescription=e.voteToolDescription??mIo,this.isScopeAware=e.toolDefinitionVersion===dIo}getStoreMemory(){let e=this.isScopeAware?gIo:$0r;return{name:this.toolName,instructions:this.storeInstructions,description:this.toolDescription,input_schema:Wr(e),callback:this.storeMemory.bind(this),shutdown:this.shutdown.bind(this),safeForTelemetry:!0}}getVoteMemory(){return{name:this.voteToolName,description:this.voteToolDescription,input_schema:Wr(eGr),callback:this.voteMemory.bind(this),safeForTelemetry:!0}}async storeMemory(e,r){if(e=im.getInstance().filterSecretsFromObj(e),!lut(e)){let o=this.isScopeAware?"subject, fact, citations, reason, scope":"subject, fact, citations, reason";return{resultType:"failure",textResultForLlm:`Invalid inputs for ${bE} tool. Expected an object with properties: ${o}.`,toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"invalid_inputs"}}}}let n=e;if(this.isScopeAware){let o=e.scope;if(o!=="repository"&&o!=="user")return{resultType:"failure",textResultForLlm:`Invalid memory scope '${String(o)}'. Supported values are 'repository' and 'user'.`,toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"invalid_scope"}}};n={...e,scope:o}}if(!r?.client)return{resultType:"failure",textResultForLlm:"Unable to store memory due to configuration error.",toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"missing_client"}}};if(this.permissions.requestRequired){let o={kind:"memory",action:"store",subject:n.subject,fact:n.fact,citations:n.citations},s=await this.permissions.request({toolCallId:r.toolCallId,...o}),a=Wm(s);if(a)return a}return this.memoryStrategy.storeMemory(n,r.client)}async voteMemory(e,r){if(e=im.getInstance().filterSecretsFromObj(e),!fIo(e))return{resultType:"failure",textResultForLlm:`Invalid inputs for ${this.voteToolName} tool. Expected an object with properties: fact (string), direction ("upvote" or "downvote"), reason (string).`,toolTelemetry:{properties:{operation:"voteMemory",success:"false",failureReason:"invalid_inputs"}}};if(this.permissions.requestRequired){let o={kind:"memory",action:"vote",fact:e.fact,direction:e.direction,reason:e.reason},s=await this.permissions.request({toolCallId:r?.toolCallId,...o}),a=Wm(s);if(a)return a}if(!this.memoryStrategy.voteMemory)return{resultType:"failure",textResultForLlm:"Voting on memories is not supported by the current memory strategy.",toolTelemetry:{properties:{operation:"voteMemory",success:"false",failureReason:"unsupported_strategy"}}};let n=r?.client?.model;return this.memoryStrategy.voteMemory(e,n)}shutdown(){return this.memoryStrategy.shutdown()}},ice=class{constructor(e,r,n,o){this.settings=e;this.logger=r;this.callback=n;this.telemetryEmitter=o}telemetryEvent={kind:"telemetry",telemetry:{event:"memory_tool",properties:{memoryStrategy:"service"},restrictedProperties:{},metrics:{addedMemoriesCount:0,retrievedMemoriesCount:0}}};setRetrievedMemoriesCount(e){this.telemetryEvent.telemetry.metrics.retrievedMemoriesCount=e}get agentName(){return this.settings.clientName??"unspecified"}async storeMemory(e,r){let n=Date.now(),o=e.scope??"repository",s={properties:{operation:"storeMemory",source:"service_api",agent:this.agentName,scope:o},metrics:{},restrictedProperties:{memorySubject:e.subject,memoryFact:e.fact,memoryCitations:e.citations,memoryReason:e.reason}};try{let a=nce(this.settings,"",void 0,o),l=bIo(this.settings,e);this.logger.debug(`Storing ${o} memory with subject: "${e.subject}"`);let c=await uI(a,{method:"PUT",headers:oce(this.settings),body:JSON.stringify(l)},this.logger),u=Date.now()-n;if(!c.ok){let d=await c.text();Yu(this.telemetryEvent,d),this.logger.error(`Failed to store ${o} memory with status ${c.status}: ${d}`);let h="Unable to store memory. You can continue with your task without storing this information.";return c.status===404&&o==="repository"&&(h="Unable to store memory. The repository may not exist or you may not have write access to it. You can continue with your task without storing this information."),{resultType:"failure",textResultForLlm:h,toolTelemetry:{...s,properties:{...s.properties,success:"false",httpStatus:c.status.toString()},metrics:{...s.metrics,durationMs:u},restrictedProperties:{...s.restrictedProperties,errorMessage:d}}}}return this.telemetryEvent.telemetry.metrics.addedMemoriesCount++,this.logger.info(`Memory stored successfully: subject="${e.subject}", durationMs=${u}`),{resultType:"success",textResultForLlm:"Memory stored successfully.",toolTelemetry:{...s,properties:{...s.properties,success:"true",httpStatus:c.status.toString()},metrics:{...s.metrics,durationMs:u},restrictedProperties:{...s.restrictedProperties}}}}catch(a){let l=Date.now()-n,c=M(a);return Yu(this.telemetryEvent,a),this.logger.error(`Failed to store memory: ${c}`),{resultType:"failure",textResultForLlm:"Unable to store memory. You can continue with your task without storing this information.",toolTelemetry:{...s,properties:{...s.properties,success:"false"},metrics:{...s.metrics,durationMs:l},restrictedProperties:{...s.restrictedProperties,errorMessage:c}}}}}async voteMemory(e,r){let n=Date.now(),o={properties:{operation:"voteMemory",source:"service_api",agent:this.agentName},metrics:{},restrictedProperties:{memoryFact:e.fact,voteDirection:e.direction,voteReason:e.reason}};try{let s=nce(this.settings,"vote"),a=CIo(this.settings,e,r);this.logger.debug(`Voting on memory: direction="${e.direction}"`);let l=await uI(s,{method:"POST",headers:oce(this.settings),body:JSON.stringify(a)},this.logger),c=Date.now()-n;if(!l.ok){let u=await l.text();return Yu(this.telemetryEvent,u),this.logger.error(`Failed to vote on memory with status ${l.status}: ${u}`),{resultType:"failure",textResultForLlm:"Unable to vote on memory. You can continue with your task without voting on this memory.",toolTelemetry:{...o,properties:{...o.properties,success:"false",httpStatus:l.status.toString()},metrics:{...o.metrics,durationMs:c},restrictedProperties:{...o.restrictedProperties,errorMessage:u}}}}return this.logger.info(`Vote recorded successfully: direction="${e.direction}", durationMs=${c}`),{resultType:"success",textResultForLlm:"Vote recorded successfully.",toolTelemetry:{...o,properties:{...o.properties,success:"true",httpStatus:l.status.toString()},metrics:{...o.metrics,durationMs:c}}}}catch(s){let a=Date.now()-n,l=M(s);return Yu(this.telemetryEvent,s),this.logger.error(`Failed to vote on memory: ${l}`),{resultType:"failure",textResultForLlm:"Unable to vote on memory. You can continue with your task without voting on this memory.",toolTelemetry:{...o,properties:{...o.properties,success:"false"},metrics:{...o.metrics,durationMs:a},restrictedProperties:{...o.restrictedProperties,errorMessage:l}}}}}async getRepoMemories(){let e=Date.now(),r=0,n=!0,o;try{let s=nce(this.settings,"recent",cIo),a=await uI(s,{method:"GET",headers:oce(this.settings)},this.logger);if(a.status===K0r){this.logger.info("No memories found for this repository."),n=!0;return}if(!a.ok){let u=await a.text();n=!1,o=`HTTP ${a.status}: ${u}`,this.logger.error(`Failed to read memories with status ${a.status}: ${u}`);return}let l=await a.json();return r=l.length,this.telemetryEvent.telemetry.metrics.retrievedMemoriesCount=r,this.logger.info(`Retrieved ${l.length} memories from the Memory API.`),l.length===0?void 0:l.map(u=>{let d=u.citations.length>0?u.citations.join(", "):"<none>";return`**${u.subject}**
|
|
1285
|
+
`,$0r=T.object({subject:T.string().describe("The topic to which this memory relates. 1-2 words. Examples: 'naming conventions', 'testing practices', 'documentation', 'logging', 'authentication', 'sanitization', 'error handling'."),fact:T.string().describe("A clear and short description of a fact about the codebase or a convention used in the codebase. Must be less than 200 characters. Examples: 'Use JWT for authentication.', 'Follow PEP 257 docstring conventions.', 'Use single quotes for strings in Python.', 'Use Winston for logging.'"),citations:T.string().describe(`The source of this fact, such as a file and line number in the codebase (e.g., 'path/file.go:123'). If the convention is not explicitly stated in the codebase, you can point at several examples that illustrate it, selecting the most diverse set of examples you can find (e.g. from multiple files or contexts). If the fact is based on user input or is a user-provided preference, cite the exact user input, in the following format 'User input: <exact quotation>' (e.g., 'User input: "Never rewrite git history"').`),reason:T.string().describe("A clear and detailed explanation of the reason behind storing this fact. Must be at least 2-3 sentences long, and include which future tasks this fact will be useful for and why it is important to remember this fact.")}),gIo=$0r.extend({scope:T.enum(["repository","user"]).describe("The scope of the memory being stored. Use 'repository' for facts about the codebase: conventions, build commands, architecture (default). Use 'user' for personal preferences: coding style preferences, workflow habits, communication preferences.")});eGr=T.object({fact:T.string().min(1).describe("The exact fact text of the memory to vote on. Must match the memory fact exactly as it appears in the prompt."),direction:T.enum(["upvote","downvote"]).describe('Vote direction: "upvote" for useful verified memories, "downvote" for incorrect or outdated memories.'),reason:T.string().min(1).describe("A clear and detailed explanation of the reason for your vote. Must be at least 2-3 sentences long, preferably including supporting evidence. For an 'upvote', include anything you did to verify the accuracy of the memory (e.g. looking up the citations, finding supporting examples of a convention or pattern in the codebase). For a 'downvote', specify why you think the memory is inaccurate or outdated (e.g. if the citation is incorrect, if there is counter-evidence elsewhere, if the user has indicated disagreement with the memory). Wherever possible, include codebase file and line numbers and/or exact quotations from users to support your voting decision.")});sce=class{toolName;toolDescription;isScopeAware;voteToolName;voteToolDescription;memoryStrategy;permissions;storeInstructions;constructor(e){this.memoryStrategy=e.memoryStrategy,this.permissions=e.permissions??{requestRequired:!1},this.storeInstructions=e.storeInstructions,this.toolName=e.name??bE,this.toolDescription=e.description??hIo,this.voteToolName=e.voteToolName??uIo,this.voteToolDescription=e.voteToolDescription??mIo,this.isScopeAware=e.toolDefinitionVersion===dIo}getStoreMemory(){let e=this.isScopeAware?gIo:$0r;return{name:this.toolName,instructions:this.storeInstructions,description:this.toolDescription,input_schema:Wr(e),callback:this.storeMemory.bind(this),shutdown:this.shutdown.bind(this),safeForTelemetry:!0}}getVoteMemory(){return{name:this.voteToolName,description:this.voteToolDescription,input_schema:Wr(eGr),callback:this.voteMemory.bind(this),safeForTelemetry:!0}}async storeMemory(e,r){if(e=im.getInstance().filterSecretsFromObj(e),!lut(e)){let o=this.isScopeAware?"subject, fact, citations, reason, scope":"subject, fact, citations, reason";return{resultType:"failure",textResultForLlm:`Invalid inputs for ${bE} tool. Expected an object with properties: ${o}.`,toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"invalid_inputs"}}}}let n=e;if(this.isScopeAware){let o=e.scope;if(o!=="repository"&&o!=="user")return{resultType:"failure",textResultForLlm:`Invalid memory scope '${String(o)}'. Supported values are 'repository' and 'user'.`,toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"invalid_scope"}}};n={...e,scope:o}}if(!r?.client)return{resultType:"failure",textResultForLlm:"Unable to store memory due to configuration error.",toolTelemetry:{properties:{operation:"storeMemory",success:"false",failureReason:"missing_client"}}};if(this.permissions.requestRequired){let o={kind:"memory",action:"store",subject:n.subject,fact:n.fact,citations:n.citations},s=await this.permissions.request({toolCallId:r.toolCallId,...o}),a=Wm(s);if(a)return a}return this.memoryStrategy.storeMemory(n,r.client)}async voteMemory(e,r){if(e=im.getInstance().filterSecretsFromObj(e),!fIo(e))return{resultType:"failure",textResultForLlm:`Invalid inputs for ${this.voteToolName} tool. Expected an object with properties: fact (string), direction ("upvote" or "downvote"), reason (string).`,toolTelemetry:{properties:{operation:"voteMemory",success:"false",failureReason:"invalid_inputs"}}};if(this.permissions.requestRequired){let o={kind:"memory",action:"vote",fact:e.fact,direction:e.direction,reason:e.reason},s=await this.permissions.request({toolCallId:r?.toolCallId,...o}),a=Wm(s);if(a)return a}if(!this.memoryStrategy.voteMemory)return{resultType:"failure",textResultForLlm:"Voting on memories is not supported by the current memory strategy.",toolTelemetry:{properties:{operation:"voteMemory",success:"false",failureReason:"unsupported_strategy"}}};let n=r?.client?.model;return this.memoryStrategy.voteMemory(e,n)}shutdown(){return this.memoryStrategy.shutdown()}},ice=class{constructor(e,r,n,o){this.settings=e;this.logger=r;this.callback=n;this.telemetryEmitter=o}telemetryEvent={kind:"telemetry",telemetry:{event:"memory_tool",properties:{memoryStrategy:"service"},restrictedProperties:{},metrics:{addedMemoriesCount:0,retrievedMemoriesCount:0}}};setRetrievedMemoriesCount(e){this.telemetryEvent.telemetry.metrics.retrievedMemoriesCount=e}get agentName(){return this.settings.clientName??"unspecified"}async storeMemory(e,r){let n=Date.now(),o=e.scope??"repository",s={properties:{operation:"storeMemory",source:"service_api",agent:this.agentName,scope:o},metrics:{},restrictedProperties:{memorySubject:e.subject,memoryFact:e.fact,memoryCitations:e.citations,memoryReason:e.reason}};try{let a=nce(this.settings,"",void 0,o),l=bIo(this.settings,e);this.logger.debug(`Storing ${o} memory with subject: "${e.subject}"`);let c=await uI(a,{method:"PUT",headers:oce(this.settings),body:JSON.stringify(l)},this.logger),u=Date.now()-n;if(!c.ok){let d=await c.text();Yu(this.telemetryEvent,d),this.logger.error(`Failed to store ${o} memory with status ${c.status}: ${d}`);let h="Unable to store memory. You can continue with your task without storing this information.";return c.status===404&&o==="repository"&&(h="Unable to store memory. The repository may not exist or you may not have write access to it. You can continue with your task without storing this information."),{resultType:"failure",textResultForLlm:h,toolTelemetry:{...s,properties:{...s.properties,success:"false",httpStatus:c.status.toString()},metrics:{...s.metrics,durationMs:u},restrictedProperties:{...s.restrictedProperties,errorMessage:d}}}}return this.telemetryEvent.telemetry.metrics.addedMemoriesCount++,this.logger.info(`Memory stored successfully: subject="${e.subject}", durationMs=${u}`),{resultType:"success",textResultForLlm:"Memory stored successfully.",toolTelemetry:{...s,properties:{...s.properties,success:"true",httpStatus:c.status.toString()},metrics:{...s.metrics,durationMs:u},restrictedProperties:{...s.restrictedProperties}}}}catch(a){let l=Date.now()-n,c=M(a);return Yu(this.telemetryEvent,a),this.logger.error(`Failed to store memory: ${c}`),{resultType:"failure",textResultForLlm:"Unable to store memory. You can continue with your task without storing this information.",toolTelemetry:{...s,properties:{...s.properties,success:"false"},metrics:{...s.metrics,durationMs:l},restrictedProperties:{...s.restrictedProperties,errorMessage:c}}}}}async voteMemory(e,r){let n=Date.now(),o={properties:{operation:"voteMemory",source:"service_api",agent:this.agentName},metrics:{},restrictedProperties:{memoryFact:e.fact,voteDirection:e.direction,voteReason:e.reason}};try{let s=nce(this.settings,"vote"),a=CIo(this.settings,e,r);this.logger.debug(`Voting on memory: direction="${e.direction}"`);let l=await uI(s,{method:"POST",headers:oce(this.settings),body:JSON.stringify(a)},this.logger),c=Date.now()-n;if(!l.ok){let u=await l.text();return Yu(this.telemetryEvent,u),this.logger.error(`Failed to vote on memory with status ${l.status}: ${u}`),{resultType:"failure",textResultForLlm:"Unable to vote on memory. You can continue with your task without voting on this memory.",toolTelemetry:{...o,properties:{...o.properties,success:"false",httpStatus:l.status.toString()},metrics:{...o.metrics,durationMs:c},restrictedProperties:{...o.restrictedProperties,errorMessage:u}}}}return this.logger.info(`Vote recorded successfully: direction="${e.direction}", durationMs=${c}`),{resultType:"success",textResultForLlm:"Vote recorded successfully.",toolTelemetry:{...o,properties:{...o.properties,success:"true",httpStatus:l.status.toString()},metrics:{...o.metrics,durationMs:c}}}}catch(s){let a=Date.now()-n,l=M(s);return Yu(this.telemetryEvent,s),this.logger.error(`Failed to vote on memory: ${l}`),{resultType:"failure",textResultForLlm:"Unable to vote on memory. You can continue with your task without voting on this memory.",toolTelemetry:{...o,properties:{...o.properties,success:"false"},metrics:{...o.metrics,durationMs:a},restrictedProperties:{...o.restrictedProperties,errorMessage:l}}}}}async getRepoMemories(){let e=Date.now(),r=0,n=!0,o;try{let s=nce(this.settings,"recent",cIo),a=await uI(s,{method:"GET",headers:oce(this.settings)},this.logger);if(a.status===K0r){this.logger.info("No memories found for this repository."),n=!0;return}if(!a.ok){let u=await a.text();n=!1,o=`HTTP ${a.status}: ${u}`,this.logger.error(`Failed to read memories with status ${a.status}: ${u}`);return}let l=await a.json();return r=l.length,this.telemetryEvent.telemetry.metrics.retrievedMemoriesCount=r,this.logger.info(`Retrieved ${l.length} memories from the Memory API.`),l.length===0?void 0:l.map(u=>{let d=u.citations.length>0?u.citations.join(", "):"<none>";return`**${u.subject}**
|
|
1286
1286
|
- Fact: ${u.fact}
|
|
1287
1287
|
- Citations: ${d}`}).join(`
|
|
1288
1288
|
|
|
@@ -4097,7 +4097,7 @@ ${l}`}}}let n=await t.workspace.listCheckpoints();if(n.length===0)return{kind:"a
|
|
|
4097
4097
|
${"\u2500".repeat(40)}
|
|
4098
4098
|
${n}`}}:{kind:"add-timeline-entry",entry:{type:"info",text:"No plan exists for this session."}}}if(r==="rename"){if(!t.workspace)return{kind:"add-timeline-entry",entry:{type:"info",text:"Workspace features are not enabled for this session."}};let n=e.slice(1).join(" ").trim();if(n)return n.length>100?{kind:"add-timeline-entry",entry:{type:"error",text:"Session name must be 100 characters or less."}}:(await t.workspace.renameSession(n),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${n}`}});let o=t.session.instance,s=o.getAuthInfo(),a=t.models;if(!s||!a?.length)return{kind:"add-timeline-entry",entry:{type:"error",text:"Unable to generate a session name (auth or models unavailable). Provide a name with /rename <name>"}};let l=o.getEvents(),c=[];for(let h of l)h.type==="user.message"&&!("source"in h.data&&h.data.source)&&h.data.content&&c.push(h.data.content);if(c.length===0)return{kind:"add-timeline-entry",entry:{type:"error",text:"No conversation history to generate a name from. Provide a name with /rename <name>"}};let u=c.slice(-20).join(`
|
|
4099
4099
|
|
|
4100
|
-
`),d;try{d=await _Kr({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?njo(t,e.slice(1)):Rvt(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?ojo(t,e.slice(1)):Rvt(e[0],t.featureFlags.SESSION_CLEANUP)};HKr={name:T_e,aliases:[VJr],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>VKr(t,e)},PKr={name:k_e,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>VKr(t,["rename",...e])}});function vvt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function DKr(){return!!process.env.GITHUB_ACTIONS}function XKr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}var Lvt=A(()=>{"use strict"});function sjo(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function uT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&sjo(n)?(j.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return j.info("Retrying without auth token"),await t({})}}var Svt=A(()=>{"use strict";Ln()});var JKr={};sa(JKr,{MAX_RECENT_RELEASES:()=>cjo,fetchLatestRelease:()=>dT,fetchReleaseByTag:()=>ujo,getUpdateChannel:()=>GB,getVersion:()=>kv,getVersionWithoutUpdateCheck:()=>ijo,isPrerelease:()=>MKr,showVersionWithUpdateCheck:()=>ajo});function kv(){return process.env.COPILOT_CLI_VERSION||"1.0.
|
|
4100
|
+
`),d;try{d=await _Kr({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?njo(t,e.slice(1)):Rvt(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?ojo(t,e.slice(1)):Rvt(e[0],t.featureFlags.SESSION_CLEANUP)};HKr={name:T_e,aliases:[VJr],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>VKr(t,e)},PKr={name:k_e,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>VKr(t,["rename",...e])}});function vvt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function DKr(){return!!process.env.GITHUB_ACTIONS}function XKr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}var Lvt=A(()=>{"use strict"});function sjo(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function uT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&sjo(n)?(j.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return j.info("Retrying without auth token"),await t({})}}var Svt=A(()=>{"use strict";Ln()});var JKr={};sa(JKr,{MAX_RECENT_RELEASES:()=>cjo,fetchLatestRelease:()=>dT,fetchReleaseByTag:()=>ujo,getUpdateChannel:()=>GB,getVersion:()=>kv,getVersionWithoutUpdateCheck:()=>ijo,isPrerelease:()=>MKr,showVersionWithUpdateCheck:()=>ajo});function kv(){return process.env.COPILOT_CLI_VERSION||"1.0.31"}function MKr(){try{let t=(0,$_e.parse)("1.0.31");return t!==null&&t.prerelease.length>0}catch{return!1}}function GB(t,e){return t||(e||MKr()?"prerelease":"stable")}function ijo(){return`GitHub Copilot CLI ${PA().version}.
|
|
4101
4101
|
Run 'copilot update' to check for updates.`}async function ajo(t,e){let r=PA();if(process.stdout.write(`GitHub Copilot CLI ${r.version}
|
|
4102
4102
|
`),Yf())return;let n=GB(t.autoUpdatesChannel,t.staff),o=await dT(n,e);if("error"in o){process.stderr.write(`
|
|
4103
4103
|
Unable to check for updates: ${String(o.error)}
|