@github/copilot-language-server 1.365.0 → 1.366.0

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.
Files changed (2) hide show
  1. package/dist/main.js +1 -1
  2. package/package.json +7 -7
package/dist/main.js CHANGED
@@ -458,7 +458,7 @@ ${r}+- `:"";return e+this.description+i}}},Zu=class{constructor(e,r,n,i){this.la
458
458
  (using_declaration)
459
459
  (alias_declaration)
460
460
  (static_assert_declaration)
461
- ] @statement`}};var UC=class{constructor(e,r,n){this.languageId=e;this.prefix=r;this.completion=n}static{s(this,"BlockTrimmer")}static isSupported(e){return Zu.isSupported(e)}static isTrimmedByDefault(e){return Zu.isTrimmedByDefault(e)}async withParsedStatementTree(e){var n=[];try{let r=vfe(n,Zu.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length));await r.build();return await e(r)}catch(i){var o=i,a=!0}finally{xfe(n,o,a)}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};var IY=class extends UC{constructor(r,n,i,o=3,a=7){super(r,n,i);this.lineLimit=o;this.lookAhead=a;let c=[...this.completion.matchAll(/\n/g)],l=this.lineLimit+this.lookAhead;c.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=c[this.lineLimit-1].index),c.length>=l&&l>0&&(this.lookAheadOffset=c[l-1].index)}static{s(this,"TerseBlockTrimmer")}async getCompletionTrimOffset(){return await this.withParsedStatementTree(r=>{let n=r.statementAt(this.stmtStartPos()),i=this.getContainingBlockOffset(n);return i=this.trimAtFirstBlankLine(i),n&&(i=this.trimAtStatementChange(n,i)),this.limitOffset&&this.lookAheadOffset&&(i===void 0||i>this.lookAheadOffset)?this.limitOffset:i})}stmtStartPos(){let r=this.completion.match(/\S/);return r&&r.index!==void 0?this.prefix.length+r.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(r){let n=[...this.trimmedCompletion(r).matchAll(/\r?\n\s*\r?\n/g)];for(;n.length>0&&(r===void 0||r>n[0].index);){let i=n.shift();if(this.completion.substring(0,i.index).trim()!=="")return i.index}return r}trimAtStatementChange(r,n){let i=this.prefix.length,o=this.prefix.length+(n??this.completion.length);if(r.node.endIndex>i&&this.isCompoundStatement(r))return r.nextSibling&&r.node.endIndex<o?this.asCompletionOffset(r.node.endIndex):n;let a=r,c=r.nextSibling;for(;c&&c.node.endIndex<=o&&!this.hasNonStatementContentAfter(a)&&!this.isCompoundStatement(c);)a=c,c=c.nextSibling;return c&&a.node.endIndex>i&&a.node.endIndex<o?this.asCompletionOffset(a.node.endIndex):n}};async function wje(t,e){var c=[];try{let r=t.getText();let n=t.offsetAt(e);let i=vfe(c,Zu.create(t.detectedLanguageId,r,0,r.length));await i.build();let o=i.statementAt(n);if(!o)return"non-block";if(!o.isCompoundStatementType&&o.children.length===0)return o.parent&&!o.nextSibling&&o.node.endPosition.row<=e.line?"block-end":o.parent?"mid-block":"non-block";if(o.children.length===0)return"empty-block";let a=o.children[o.children.length-1];if(n<a.node.startIndex)return"mid-block";return"block-end"}catch(l){var u=l,f=!0}finally{xfe(c,u,f)}}s(wje,"getBlockPositionType");d();function qqt(t){return t.HTTPS_PROXY||t.https_proxy||t.HTTP_PROXY||t.http_proxy}s(qqt,"getProxyFromEnvironment");function Hqt(t){return t.NODE_TLS_REJECT_UNAUTHORIZED!=="0"}s(Hqt,"getRejectUnauthorizedFromEnvironment");var Sje=x.Object({proxy:x.Optional(x.String()),proxyStrictSSL:x.Optional(x.Boolean()),proxyAuthorization:x.Optional(x.String()),proxyKerberosServicePrincipal:x.Optional(x.String())});function _je(t){let e=qqt(t),r=DO({proxy:e,proxyStrictSSL:Hqt(t)}),n=t.GH_COPILOT_KERBEROS_SERVICE_PRINCIPAL??t.GITHUB_COPILOT_KERBEROS_SERVICE_PRINCIPAL??t.AGENT_KERBEROS_SERVICE_PRINCIPAL;return n&&(r.proxyKerberosServicePrincipal=n),r}s(_je,"getHttpSettingsFromEnvironment");function DO(t){if(!t.proxy)return{...t,proxy:""};try{let{protocol:e,host:r,username:n,password:i,pathname:o,search:a,hash:c}=new URL(t.proxy);return{...t,proxy:`${e}//${r}${o}${a}${c}`,proxyAuthorization:t.proxyAuthorization||$qt(n,i)}}catch{return{...t,proxy:""}}}s(DO,"normalizeHttpSettings");function $qt(t,e){return!t||!e?"":`${decodeURIComponent(t)}:${decodeURIComponent(e)}`}s($qt,"getAuth");var kCe={};Ta(kCe,{activationEvents:()=>lHt,badges:()=>cHt,browser:()=>uHt,bugs:()=>eHt,build:()=>zqt,buildType:()=>Kqt,categories:()=>sHt,contributes:()=>PCe,default:()=>AHt,dependencies:()=>hHt,description:()=>Gqt,devDependencies:()=>mHt,displayName:()=>jqt,enabledApiProposals:()=>fHt,engines:()=>oHt,extensionPack:()=>iHt,homepage:()=>Xqt,icon:()=>rHt,keywords:()=>aHt,license:()=>Zqt,main:()=>dHt,name:()=>Wqt,overrides:()=>gHt,preview:()=>Jqt,pricing:()=>nHt,publisher:()=>Yqt,qna:()=>tHt,scripts:()=>pHt,version:()=>Vqt});var Wqt="copilot",jqt="GitHub Copilot",Gqt="Your AI pair programmer",Vqt="1.365.0",zqt="1773",Kqt="prod",Yqt="GitHub",Jqt=!1,Xqt="https://github.com/features/copilot?editor=vscode",Zqt="https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features",eHt={url:"https://github.com/microsoft/vscode/issues"},tHt="https://github.com/github-community/community/discussions/categories/copilot",rHt="assets/Copilot-App-Icon.png",nHt="Trial",iHt=["GitHub.copilot-chat","GitHub.copilot"],oHt={vscode:"^1.98.0",node:">=20.0.0",npm:">=9.0.0"},sHt=["AI","Chat","Programming Languages","Machine Learning"],aHt=["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin","co-pilot"],cHt=[{url:"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange",href:"https://github.com/github-copilot/signup?editor=vscode",description:"Sign up for GitHub Copilot"},{url:"https://img.shields.io/github/stars/github/copilot-docs?style=social",href:"https://github.com/github/copilot-docs",description:"Star Copilot on GitHub"},{url:"https://img.shields.io/youtube/channel/views/UC7c3Kb6jYCRj4JOHHZTxKsQ?style=social",href:"https://www.youtube.com/@GitHub/search?query=copilot",description:"Check out GitHub on Youtube"},{url:"https://img.shields.io/twitter/follow/github?style=social",href:"https://twitter.com/github",description:"Follow GitHub on Twitter"}],lHt=["onStartupFinished"],uHt="./dist/web",dHt="./dist/extension",fHt=["inlineCompletionsAdditions"],PCe={commands:[{command:"github.copilot.toggleStatusMenu",title:"Open Status Menu",category:"GitHub Copilot"},{command:"github.copilot.signIn",title:"Sign In",category:"GitHub Copilot",enablement:"!github.copilot.activated"},{command:"github.copilot.acceptCursorPanelSolution",title:"Accept Panel Suggestion at the Cursor",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.previousPanelSolution",title:"Navigate to the Previous Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.nextPanelSolution",title:"Navigate to the Next Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.generate",title:"Open Completions Panel",enablement:"github.copilot.activated && !isWeb",category:"GitHub Copilot"},{command:"github.copilot.generateComparison",title:"Open Comparison Panel",enablement:"github.copilot.activated && !isWeb && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.acceptCursorComparisonPanelSolution",title:"Accept Comparison Panel Suggestion at the Cursor",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.previousComparisonPanelSolution",title:"Navigate to the Previous Comparison Panel Suggestion",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.nextComparisonPanelSolution",title:"Navigate to the Next Comparison Panel Suggestion",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.completions.disable",title:"Disable Completions",enablement:"github.copilot.activated && config.editor.inlineSuggest.enabled && github.copilot.completions.enabled",category:"GitHub Copilot"},{command:"github.copilot.completions.enable",title:"Enable Completions",enablement:"github.copilot.activated && !(config.editor.inlineSuggest.enabled && github.copilot.completions.enabled)",category:"GitHub Copilot"},{command:"github.copilot.completions.toggle",title:"Toggle (Enable/Disable) Completions",enablement:"github.copilot.activated",category:"GitHub Copilot"},{command:"github.copilot.sendFeedback",title:"Send Feedback",category:"GitHub Copilot"},{command:"github.copilot.collectDiagnostics",title:"Collect Diagnostics",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.openLogs",title:"Open Logs",category:"GitHub Copilot"},{command:"github.copilot.openModelPicker",title:"Change Completions Model",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.sendCompletionFeedback",title:"Send Copilot Completion Feedback",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github-copilot-completions-debugger-view.refresh",title:"Refresh",icon:"$(refresh)"}],keybindings:[{command:"github.copilot.acceptCursorPanelSolution",key:"ctrl+/",mac:"ctrl+/",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.previousPanelSolution",key:"alt+[",mac:"alt+[",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.nextPanelSolution",key:"alt+]",mac:"alt+]",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.acceptCursorComparisonPanelSolution",key:"ctrl+shift+/",mac:"ctrl+shift+/",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"github.copilot.previousComparisonPanelSolution",key:"alt+shift+[",mac:"alt+shift+[",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"github.copilot.nextComparisonPanelSolution",key:"alt+shift+]",mac:"alt+shift+]",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"editor.action.inlineSuggest.trigger",key:"alt+\\",when:"editorTextFocus && !editorHasSelection && !inlineSuggestionsVisible"}],configuration:[{title:"GitHub Copilot",properties:{"github.copilot.selectedCompletionModel":{type:"string",default:"",markdownDescription:'The currently selected completion model ID. To select from a list of available models, use the __"Change Completions Model"__ command or open the model picker (from the Copilot menu in the VS Code title bar, select __"Configure Code Completions"__ then __"Change Completions Model"__. The value must be a valid model ID. An empty value indicates that the default model will be used.'},"github.copilot.advanced":{type:"object",title:"Advanced Settings",properties:{authProvider:{type:"string",enum:["github","github-enterprise"],enumDescriptions:["GitHub.com","GitHub Enterprise"],default:"github",description:"The GitHub identity to use for Copilot"},authPermissions:{type:"string",enum:["default","minimal"],markdownEnumDescriptions:["Default (recommended) - The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.","Minimal - The minimal permissions required for Copilot functionality."],default:"default",markdownDescription:"Controls what kind of permissions are asked for when signing in to Copilot. The options are\n* `default` - (strongly recommended) The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.\n* `minimal` - The minimal permissions are the least that Copilot needs to function. Some features may behave slower or not at all."},useLanguageServer:{type:"boolean",default:!1,description:"Experimental: Use language server"},"debug.overrideEngine":{type:"string",default:"",description:"Override engine name"},"debug.overrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy full URL"},"debug.testOverrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy URL when running tests"},"debug.overrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API full URL"},"debug.testOverrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API URL when running tests"},"debug.filterLogCategories":{type:"array",default:[],deprecationMessage:"Set overrideLogLevels.* to ERROR to filter out unwanted categories.",description:"Show only log categories listed in this setting. If an array is empty, show all loggers"}}},"github.copilot.enable":{type:"object",scope:"window",default:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},additionalProperties:{type:"boolean"},markdownDescription:"Enable or disable auto triggering of Copilot completions for specified [languages](https://code.visualstudio.com/docs/languages/identifiers). You can still trigger suggestions manually using `Alt + \\`"}}}],configurationDefaults:{"editor.tokenColorCustomizations":{"[*Light*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#000"}}]},"[*Dark*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#fff"}}]}}},languages:[{id:"code-referencing"}],grammars:[{language:"code-referencing",scopeName:"text.ref",path:"./syntaxes/ref.tmGrammar.json"}],iconFonts:[{id:"copilot-font",src:[{path:"assets/copilot.woff",format:"woff"}]}],viewsContainers:{activitybar:[{id:"github-copilot-completions-debugger-panel",title:"Debugger",icon:"$(bug)",when:"config.github.copilot.internal.showWorkspaceContextDebugger && config.github.copilot.internal.useWorkspaceContextCoordinator"}]},views:{"github-copilot-completions-debugger-panel":[{id:"github-copilot-completions-debugger-view",name:"Debugger",when:"config.github.copilot.internal.showWorkspaceContextDebugger && config.github.copilot.internal.useWorkspaceContextCoordinator",icon:"$(bug)"}]},menus:{"view/title":[{command:"github-copilot-completions-debugger-view.refresh",when:"view == github-copilot-completions-debugger-view",group:"navigation"}]}},pHt={build:"tsx esbuild.ts",clean:"./script/build/clean.sh",compress:"tsx ./script/compressTokenizer.ts","forbid-sources-content:extension":"node script/forbid-sources-content.js --extension",generate_languages:"tsx script/generateLanguages.ts && prettier --write lib/src/language/generatedLanguages.ts",get_token:"tsx script/deviceFlow.ts --save-as-test-token",lint:'run-p --aggregate-output "lint:*"',"lint:deps":"depcruise -c .dependency-cruiser.js .","lint:eslint":"eslint -f visualstudio --quiet --cache .","lint:prettier":"prettier --check . 2>&1","lint:types":"tsc --noEmit && tsc --noEmit -p extension/src/copilotPanel/webview",prebuild:"npm install",pretest:"npm run build","pretest:headless":"npm run build","pretest:extension":"npm run build","pretest:lsp-client":"npm run build","pretest:lib-e2e":"npm run build",prewatch:"npm run build","prewatch:esbuild":"npm run build",start:"npm run watch",test:'npm-run-all "test:extension --ignore-scripts" "test:headless --ignore-scripts" lint',"test:headless":'npm-run-all test:lib test:agent "test:lib-e2e --ignore-scripts" test:prompt "test:lsp-client --ignore-scripts" lint',"test:agent":'mocha "agent/src/**/*.test.{ts,tsx}"',"test:extension":"tsx extension/test/runTest.ts","test:lib":'mocha "lib/src/**/*.test.{ts,tsx}"',"test:lib-e2e":'mocha "lib/e2e/src/**/*.test.{ts,tsx}" --exclude "lib/e2e/src/prompt/**/*.test.ts"',"test:lib-e2e-no-ci":'mocha "lib/e2e/no-ci/**/*.test.{ts,tsx}"',"test:lib-prompt-e2e":'mocha "lib/e2e/src/prompt/prompt.test.ts"',"test:lib-prompt-e2e-perf":"INCLUDE_PERFORMANCE=true npm run test:lib-prompt-e2e","test:lsp-client":'mocha "lsp-client/test/*.test.{ts,tsx}"',"test:prompt":'mocha "prompt/test/**/*.test.{ts,tsx}"',"test:prepare-msbench":"tsx script/setupMsbench.ts","test:run-msbench":"tsx lsp-client/test/msbench/agent/index.ts","vscode-dts":"vscode-dts dev && mv vscode.proposed.*.ts extension/src","vscode:prepublish":'run-s "build --ignore-scripts" forbid-sources-content:extension',"vscode:uninstall":"node dist/extensionUninstalled.js",vsix:"vsce package --allow-missing-repository",watch:'run-p "watch:esbuild --ignore-scripts" "watch:types -- --preserveWatchOutput"',"watch:esbuild":"tsx esbuild.ts --watch","watch:types":"tsc --noEmit --watch"},mHt={"@azure/identity":"^4.11.0","@azure/keyvault-secrets":"^4.10.0","@datadog/datadog-ci":"^3.17.0","@github/prettier-config":"0.0.6","@limegrass/eslint-plugin-import-alias":"^1.5.1","@parcel/watcher":"^2.5.1","@types/benchmark":"^2.1.5","@types/crypto-js":"^4.2.2","@types/diff":"^8.0.0","@types/git-url-parse":"^16.0.0","@types/js-yaml":"^4.0.6","@types/kerberos":"^1.1.2","@types/mocha":"^10.0.10","@types/node":"~20.16.0","@types/semver":"^7.7.0","@types/sinon":"^17.0.4","@types/uuid":"^10.0.0","@types/vscode":"1.98.0","@types/yargs":"^17.0.24","@vscode/test-electron":"^2.5.2","@vscode/vsce":"^3.6.0","@yao-pkg/pkg":"^6.6.0",benchmark:"^2.1.4",boxen:"^8.0.1",chalk:"^5.4.1","dependency-cruiser":"^17.0.1",electron:"^28.1.4",esbuild:"^0.25.8","esbuild-plugin-copy":"^2.1.1",eslint:"^9.32.0","eslint-formatter-visualstudio":"^8.40.0","eslint-plugin-mocha":"^10.5.0",glob:"^11.0.3",globals:"^16.3.0","js-yaml":"^4.1.0",mocha:"^11.2.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",prettier:"^3.5.3","prettier-plugin-organize-imports":"^4.2.0",proxy:"^2.1.1","simple-git":"^3.28.0",sinon:"^20.0.0","ts-dedent":"^2.2.0",tsx:"^4.19.4",typescript:"^5.9.2","typescript-eslint":"^8.39.1","vscode-dts":"^0.3.3"},hHt={"@adobe/helix-fetch":"github:devm33/helix-fetch#2a08fa939591a0e14f34f611adcc3ed767579e9a","@anthropic-ai/sdk":"^0.56.0","@github/memoize":"1.1.5","@microsoft/1ds-post-js":"^4.3.9","@microsoft/applicationinsights-web-basic":"^3.3.6","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.17.0","@sinclair/typebox":"^0.34.33","@types/vscode-webview":"^1.57.4","@vscode/codicons":"^0.0.39","@vscode/prompt-tsx":"0.4.0-alpha.1","@vscode/webview-ui-toolkit":"^1.3.1","await-lock":"^2.2.2","crypto-js":"^4.2.0",diff:"^8.0.2",dldr:"^0.0.10",events:"^3.3.0","get-stream":"^6.0.1","git-url-parse":"^16.0.3",kerberos:"^2.2.0","mac-ca":"^3.1.3",microjob:"^0.7.0",minimatch:"^9.0.3",open:"^10.2.0","os-browserify":"^0.3.0","path-browserify":"^1.0.1",semver:"^7.7.1",shiki:"~1.15.0","source-map-support":"^0.5.21",sqlite3:"^5.1.7",uuid:"^11.1.0","vscode-languageclient":"^9.0.0","vscode-languageserver":"^9.0.0","vscode-languageserver-protocol":"^3.17","vscode-languageserver-textdocument":"~1.0.11","vscode-uri":"^3.1.0","web-tree-sitter":"^0.20.8","windows-ca-certs":"^0.2.2",yargs:"^17.7.2"},gHt={fsevents:"<0",bindings:"npm:bundled-bindings@^1.5.0"},AHt={name:Wqt,displayName:jqt,description:Gqt,version:Vqt,build:zqt,buildType:Kqt,publisher:Yqt,preview:Jqt,homepage:Xqt,license:Zqt,bugs:eHt,qna:tHt,icon:rHt,pricing:nHt,extensionPack:iHt,engines:oHt,categories:sHt,keywords:aHt,badges:cHt,activationEvents:lHt,browser:uHt,main:dHt,enabledApiProposals:fHt,contributes:PCe,scripts:pHt,devDependencies:mHt,dependencies:hHt,overrides:gHt};var Ht={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",FetchStrategy:"fetchStrategy",ToolConfirmAutoApprove:"agent.toolConfirmAutoApprove",MaxToolCallingLoop:"agent.maxToolCallingLoop",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugOverrideLogLevels:"advanced.debug.overrideLogLevels",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",DebugUseElectronFetcher:"advanced.debug.useElectronFetcher",DebugUseEditorFetcher:"advanced.debug.useEditorFetcher",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",TrimCompletionsAggressively:"internal.trimCompletionsAggressively",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",ShowWorkspaceContextDebugger:"internal.showWorkspaceContextDebugger",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",NESXTab:"internal.useXTab",UseSplitContextPrompt:"internal.useSplitContextPrompt",UseCompletionsComparisonPanel:"internal.useCompletionsComparisonPanel",ComparisonPanelModelIds:"internal.comparisonPanelModelIds",ComparisonPanelRandomizedMode:"internal.comparisonPanelRandomizedMode"};function Rje(t){return["server","parsingandserver"].includes(t)}s(Rje,"shouldDoServerTrimming");var bA=class{static{s(this,"BlockModeConfig")}},UB=class extends bA{static{s(this,"ConfigBlockModeConfig")}forLanguage(e,r,n){let i=e.get(Mt).overrideBlockMode(n);if(i)return DCe(i,r);let o=e.get(Mt).enableProgressiveReveal(n);return(zi(e,Ht.AlwaysRequestMultiline)??o)||UC.isTrimmedByDefault(r)?DCe("moremultiline",r):r=="ruby"?"parsing":U0(r)?"parsingandserver":"server"}};function yHt(t){return["parsing","parsingandserver","moremultiline"].includes(t)}s(yHt,"blockModeRequiresTreeSitter");function DCe(t,e){return t==="moremultiline"&&Zu.isSupported(e)?t:yHt(t)&&!U0(e)?"server":t}s(DCe,"toApplicableBlockMode");var Mc=class{static{s(this,"ConfigProvider")}requireReady(){return Promise.resolve()}},qB=class extends Mc{constructor(){super(...arguments);this.onDidChangeCopilotSettings=s(()=>({dispose:s(()=>{},"dispose")}),"onDidChangeCopilotSettings");this.onDidChangeHttpSettings=this.onDidChangeCopilotSettings}static{s(this,"DefaultsOnlyConfigProvider")}getConfig(r){return vHt(r)}getOptionalConfig(r){return xHt(r)}dumpForTelemetry(){return{}}getHttpSettings(){return{proxy:""}}},uR=class extends Mc{constructor(r,n){super();this.baseConfigProvider=r;this.overrides=n;this.copilotEmitter=new Ss;this.onDidChangeCopilotSettings=this.copilotEmitter.event;this.didChangeHttpSettingsEmitter=new Ss;this.onDidChangeHttpSettings=this.didChangeHttpSettingsEmitter.event;this.httpSettings=this.baseConfigProvider.getHttpSettings()}static{s(this,"InMemoryConfigProvider")}getOptionalOverride(r){return this.overrides.get(r)}getConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getConfig(r)}getOptionalConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getOptionalConfig(r)}setConfig(r,n){this.setCopilotSettings({[r]:n})}setCopilotSettings(r){for(let[n,i]of Object.entries(r))i!==void 0?this.overrides.set(n,i):this.overrides.delete(n);this.copilotEmitter.fire(this)}getHttpSettings(){return this.httpSettings}setHttpSettings(r){let n=DO(r);this.httpSettings=n,this.didChangeHttpSettingsEmitter.fire(this.getHttpSettings())}dumpForTelemetry(){let r=this.baseConfigProvider.dumpForTelemetry();for(let n of[Ht.ShowEditorCompletions,Ht.EnableAutoCompletions,Ht.DelayCompletions,Ht.FilterCompletions]){let i=this.overrides.get(n);i!==void 0&&(r[n]=JSON.stringify(i))}return r}};function CHt(t){return t?.type==="object"&&"properties"in t}s(CHt,"isContributesObject");function kje(t,e){let r=t,n=[];for(let i of e.split(".")){let o=[...n,i].join(".");r&&typeof r=="object"&&o in r?(r=r[o],n.length=0):n.push(i)}if(!(r===void 0||n.length>0))return r}s(kje,"getConfigKeyRecursively");function vHt(t){if(QB.has(t))return QB.get(t);throw new Error(`Missing config default value: ${L9}.${t}`)}s(vHt,"getConfigDefaultForKey");function xHt(t){return QB.get(t)}s(xHt,"getOptionalConfigDefaultForKey");var QB=new Map([[Ht.DebugOverrideCppHeadersEnableSwitch,!1],[Ht.RelatedFilesVSCodeCSharp,!1],[Ht.RelatedFilesVSCodeTypeScript,!1],[Ht.RelatedFilesVSCode,!1],[Ht.IncludeNeighboringFiles,!1],[Ht.ExcludeRelatedFiles,!1],[Ht.ContextProviders,[]],[Ht.DebugUseEditorFetcher,null],[Ht.DebugUseElectronFetcher,null],[Ht.DebugOverrideLogLevels,{}],[Ht.DebugSnippyOverrideUrl,""],[Ht.FetchStrategy,"auto"],[Ht.ToolConfirmAutoApprove,!1],[Ht.MaxToolCallingLoop,25],[Ht.UseSubsetMatching,null],[Ht.ContextProviderTimeBudget,void 0],[Ht.DebugOverrideCapiUrl,""],[Ht.DebugTestOverrideCapiUrl,""],[Ht.DebugOverrideProxyUrl,""],[Ht.DebugTestOverrideProxyUrl,""],[Ht.DebugOverrideEngine,""],[Ht.AlwaysRequestMultiline,void 0],[Ht.ModelAlwaysTerminatesSingleline,void 0],[Ht.TrimCompletionsAggressively,void 0],[Ht.CompletionsDebounce,void 0],[Ht.NESXTab,void 0],[Ht.UseWorkspaceContextCoordinator,void 0],[Ht.ShowWorkspaceContextDebugger,!1],[Ht.CompletionsDelay,void 0],[Ht.UseSplitContextPrompt,void 0],[Ht.UseCompletionsComparisonPanel,!1],[Ht.ComparisonPanelModelIds,["gpt-4o-copilot","chat-v6"]],[Ht.ComparisonPanelRandomizedMode,!1],[Ht.ShowEditorCompletions,void 0],[Ht.EnableAutoCompletions,void 0],[Ht.DelayCompletions,void 0],[Ht.FilterCompletions,void 0]]);for(let t of Object.values(Ht)){let e=PCe.configuration[0],r=[],n=`${L9}.${t}`.split(".");for(;n.length>0;){r.push(n.shift());let i=e.properties[r.join(".")];if(CHt(i))r.length=0,e=i;else if(n.length==0&&i?.default!==void 0){if(QB.has(t))throw new Error(`Duplicate config default value ${L9}.${t}`);QB.set(t,i.default)}}if(!QB.has(t))throw new Error(`Missing config default value ${L9}.${t}`)}function zi(t,e){return t.get(Mc).getConfig(e)}s(zi,"getConfig");function rFe(t){return t.get(Mc).dumpForTelemetry()}s(rFe,"dumpForTelemetry");var To=class{constructor(){this.packageJson=kCe}static{s(this,"BuildInfo")}isPreRelease(){return this.getBuildType()==="nightly"}isProduction(){return this.getBuildType()!=="dev"}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getDisplayVersion(){return this.getBuildType()==="dev"?`${this.getVersion()}-dev`:this.getVersion()}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}};function Jfe(t){return t.get(To).isProduction()}s(Jfe,"isProduction");function gFe(t){return t.get(To).getBuildType()==="dev"}s(gFe,"isDevBuild");function AC(t){return t.get(To).getBuildType()}s(AC,"getBuildType");function nFe(t){return t.get(To).getBuild()}s(nFe,"getBuild");function s2(t){return t.get(To).getVersion()}s(s2,"getVersion");var Ls=class{constructor(e,r,n="none",i="desktop"){this.sessionId=e;this.machineId=r;this.remoteName=n;this.uiKind=i}static{s(this,"EditorSession")}};function oC({name:t,version:e}){return`${t}/${e}`}s(oC,"formatNameAndVersion");var dn=class{static{s(this,"EditorAndPluginInfo")}getCopilotIntegrationId(){}},NB="2025-05-01";function p0(t){let e=t.get(dn);return{"Editor-Version":oC(e.getEditorInfo()),"Editor-Plugin-Version":oC(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":s2(t)}}s(p0,"editorVersionHeaders");var w0="Iv1.b507a08c87ecfe98",Pje="350ee525b5da0e4a54c6e8e043edc1b99cc02f19",iu=class{static{s(this,"GitHubAppInfo")}findAppIdToAuthenticate(){return this.githubAppId??w0}};var Or=class{static{s(this,"Fetcher")}getImplementation(){return this}};function Cx(t,e,r,n,i,o,a,c,l,u){let f={...c,Authorization:`Bearer ${r}`,...p0(t)};u===void 0&&(f["Openai-Organization"]="github-copilot",f["X-Request-Id"]=i,f["VScode-SessionId"]=t.get(Ls).sessionId,f["VScode-MachineId"]=t.get(Ls).machineId,f["X-GitHub-Api-Version"]=NB),n&&(f["OpenAI-Intent"]=n);let p={method:"POST",headers:f,json:o,timeout:l},m=t.get(Or);if(a){let g=new AbortController;a.onCancellationRequested(()=>{Bt(t,"networking.cancelRequest",Vr.createAndMarkAsIssued({headerRequestId:i})),g.abort()}),p.signal=g.signal}return m.fetch(e,p).catch(g=>{if(EHt(g))return Bt(t,"networking.disconnectAll"),m.disconnectAll().then(()=>m.fetch(e,p));throw g})}s(Cx,"postRequest");function EHt(t){return t instanceof Error?t.message=="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code=="ECONNRESET"||t.code=="ETIMEDOUT"||t.code=="ERR_HTTP2_INVALID_SESSION":!1:!1}s(EHt,"isInterruptedNetworkError");var bHt=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function IHt(t){return bHt.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}s(IHt,"isOomError");function vx(t,e,r,n=un){if(!Td(e)){if(e instanceof Error){let i=e;IHt(i)?t.get(qo).setWarning("Out of memory"):i.code==="EMFILE"||i.code==="ENFILE"?t.get(qo).setWarning("Too many open files"):i.code==="CopilotPromptLoadFailure"?t.get(qo).setWarning("Corrupted Copilot installation"):`${i.code}`.startsWith("CopilotPromptWorkerExit")?t.get(qo).setWarning("Worker unexpectedly exited"):i.syscall==="uv_cwd"&&i.code==="ENOENT"&&t.get(qo).setWarning("Current working directory does not exist")}n.exception(t,e,r)}}s(vx,"handleException");function Dje(t){process.addListener("uncaughtException",r=>{vx(t,r,"uncaughtException")});let e=!1;process.addListener("unhandledRejection",r=>{if(!e)try{e=!0,vx(t,r,"unhandledRejection")}finally{e=!1}})}s(Dje,"registerDefaultHandlers");async function Bje(t){try{await cR}catch(e){vx(t,e,"initializeTokenizers")}}s(Bje,"waitForTokenizers");d();var IT=require("fs"),Nje=require("os"),Mje=Be(require("path")),HB=require("process");var yi=class{static{s(this,"PersistenceManager")}},BCe=class extends yi{constructor(r){super();this.directory=r}static{s(this,"FilePersistenceManager")}async read(r,n){try{return(await this.readJsonObject(r))[n]}catch{return}}async update(r,n,i){await IT.promises.mkdir(this.directory,{recursive:!0,mode:448});let o=`${this.directory}/${r}.json`,a;try{a=await BO.acquire(o);let c=await this.readJsonObject(r);c[n]=i,await IT.promises.writeFile(o,JSON.stringify(c)+`
461
+ ] @statement`}};var UC=class{constructor(e,r,n){this.languageId=e;this.prefix=r;this.completion=n}static{s(this,"BlockTrimmer")}static isSupported(e){return Zu.isSupported(e)}static isTrimmedByDefault(e){return Zu.isTrimmedByDefault(e)}async withParsedStatementTree(e){var n=[];try{let r=vfe(n,Zu.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length));await r.build();return await e(r)}catch(i){var o=i,a=!0}finally{xfe(n,o,a)}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};var IY=class extends UC{constructor(r,n,i,o=3,a=7){super(r,n,i);this.lineLimit=o;this.lookAhead=a;let c=[...this.completion.matchAll(/\n/g)],l=this.lineLimit+this.lookAhead;c.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=c[this.lineLimit-1].index),c.length>=l&&l>0&&(this.lookAheadOffset=c[l-1].index)}static{s(this,"TerseBlockTrimmer")}async getCompletionTrimOffset(){return await this.withParsedStatementTree(r=>{let n=r.statementAt(this.stmtStartPos()),i=this.getContainingBlockOffset(n);return i=this.trimAtFirstBlankLine(i),n&&(i=this.trimAtStatementChange(n,i)),this.limitOffset&&this.lookAheadOffset&&(i===void 0||i>this.lookAheadOffset)?this.limitOffset:i})}stmtStartPos(){let r=this.completion.match(/\S/);return r&&r.index!==void 0?this.prefix.length+r.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(r){let n=[...this.trimmedCompletion(r).matchAll(/\r?\n\s*\r?\n/g)];for(;n.length>0&&(r===void 0||r>n[0].index);){let i=n.shift();if(this.completion.substring(0,i.index).trim()!=="")return i.index}return r}trimAtStatementChange(r,n){let i=this.prefix.length,o=this.prefix.length+(n??this.completion.length);if(r.node.endIndex>i&&this.isCompoundStatement(r))return r.nextSibling&&r.node.endIndex<o?this.asCompletionOffset(r.node.endIndex):n;let a=r,c=r.nextSibling;for(;c&&c.node.endIndex<=o&&!this.hasNonStatementContentAfter(a)&&!this.isCompoundStatement(c);)a=c,c=c.nextSibling;return c&&a.node.endIndex>i&&a.node.endIndex<o?this.asCompletionOffset(a.node.endIndex):n}};async function wje(t,e){var c=[];try{let r=t.getText();let n=t.offsetAt(e);let i=vfe(c,Zu.create(t.detectedLanguageId,r,0,r.length));await i.build();let o=i.statementAt(n);if(!o)return"non-block";if(!o.isCompoundStatementType&&o.children.length===0)return o.parent&&!o.nextSibling&&o.node.endPosition.row<=e.line?"block-end":o.parent?"mid-block":"non-block";if(o.children.length===0)return"empty-block";let a=o.children[o.children.length-1];if(n<a.node.startIndex)return"mid-block";return"block-end"}catch(l){var u=l,f=!0}finally{xfe(c,u,f)}}s(wje,"getBlockPositionType");d();function qqt(t){return t.HTTPS_PROXY||t.https_proxy||t.HTTP_PROXY||t.http_proxy}s(qqt,"getProxyFromEnvironment");function Hqt(t){return t.NODE_TLS_REJECT_UNAUTHORIZED!=="0"}s(Hqt,"getRejectUnauthorizedFromEnvironment");var Sje=x.Object({proxy:x.Optional(x.String()),proxyStrictSSL:x.Optional(x.Boolean()),proxyAuthorization:x.Optional(x.String()),proxyKerberosServicePrincipal:x.Optional(x.String())});function _je(t){let e=qqt(t),r=DO({proxy:e,proxyStrictSSL:Hqt(t)}),n=t.GH_COPILOT_KERBEROS_SERVICE_PRINCIPAL??t.GITHUB_COPILOT_KERBEROS_SERVICE_PRINCIPAL??t.AGENT_KERBEROS_SERVICE_PRINCIPAL;return n&&(r.proxyKerberosServicePrincipal=n),r}s(_je,"getHttpSettingsFromEnvironment");function DO(t){if(!t.proxy)return{...t,proxy:""};try{let{protocol:e,host:r,username:n,password:i,pathname:o,search:a,hash:c}=new URL(t.proxy);return{...t,proxy:`${e}//${r}${o}${a}${c}`,proxyAuthorization:t.proxyAuthorization||$qt(n,i)}}catch{return{...t,proxy:""}}}s(DO,"normalizeHttpSettings");function $qt(t,e){return!t||!e?"":`${decodeURIComponent(t)}:${decodeURIComponent(e)}`}s($qt,"getAuth");var kCe={};Ta(kCe,{activationEvents:()=>lHt,badges:()=>cHt,browser:()=>uHt,bugs:()=>eHt,build:()=>zqt,buildType:()=>Kqt,categories:()=>sHt,contributes:()=>PCe,default:()=>AHt,dependencies:()=>hHt,description:()=>Gqt,devDependencies:()=>mHt,displayName:()=>jqt,enabledApiProposals:()=>fHt,engines:()=>oHt,extensionPack:()=>iHt,homepage:()=>Xqt,icon:()=>rHt,keywords:()=>aHt,license:()=>Zqt,main:()=>dHt,name:()=>Wqt,overrides:()=>gHt,preview:()=>Jqt,pricing:()=>nHt,publisher:()=>Yqt,qna:()=>tHt,scripts:()=>pHt,version:()=>Vqt});var Wqt="copilot",jqt="GitHub Copilot",Gqt="Your AI pair programmer",Vqt="1.366.0",zqt="1774",Kqt="prod",Yqt="GitHub",Jqt=!1,Xqt="https://github.com/features/copilot?editor=vscode",Zqt="https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features",eHt={url:"https://github.com/microsoft/vscode/issues"},tHt="https://github.com/github-community/community/discussions/categories/copilot",rHt="assets/Copilot-App-Icon.png",nHt="Trial",iHt=["GitHub.copilot-chat","GitHub.copilot"],oHt={vscode:"^1.98.0",node:">=20.0.0",npm:">=9.0.0"},sHt=["AI","Chat","Programming Languages","Machine Learning"],aHt=["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin","co-pilot"],cHt=[{url:"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange",href:"https://github.com/github-copilot/signup?editor=vscode",description:"Sign up for GitHub Copilot"},{url:"https://img.shields.io/github/stars/github/copilot-docs?style=social",href:"https://github.com/github/copilot-docs",description:"Star Copilot on GitHub"},{url:"https://img.shields.io/youtube/channel/views/UC7c3Kb6jYCRj4JOHHZTxKsQ?style=social",href:"https://www.youtube.com/@GitHub/search?query=copilot",description:"Check out GitHub on Youtube"},{url:"https://img.shields.io/twitter/follow/github?style=social",href:"https://twitter.com/github",description:"Follow GitHub on Twitter"}],lHt=["onStartupFinished"],uHt="./dist/web",dHt="./dist/extension",fHt=["inlineCompletionsAdditions"],PCe={commands:[{command:"github.copilot.toggleStatusMenu",title:"Open Status Menu",category:"GitHub Copilot"},{command:"github.copilot.signIn",title:"Sign In",category:"GitHub Copilot",enablement:"!github.copilot.activated"},{command:"github.copilot.acceptCursorPanelSolution",title:"Accept Panel Suggestion at the Cursor",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.previousPanelSolution",title:"Navigate to the Previous Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.nextPanelSolution",title:"Navigate to the Next Panel Suggestion",enablement:"github.copilot.panelVisible",category:"GitHub Copilot"},{command:"github.copilot.generate",title:"Open Completions Panel",enablement:"github.copilot.activated && !isWeb",category:"GitHub Copilot"},{command:"github.copilot.generateComparison",title:"Open Comparison Panel",enablement:"github.copilot.activated && !isWeb && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.acceptCursorComparisonPanelSolution",title:"Accept Comparison Panel Suggestion at the Cursor",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.previousComparisonPanelSolution",title:"Navigate to the Previous Comparison Panel Suggestion",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.nextComparisonPanelSolution",title:"Navigate to the Next Comparison Panel Suggestion",enablement:"github.copilot.comparisonPanelVisible && github.copilot.comparisonPanelEnabled",category:"GitHub Copilot"},{command:"github.copilot.completions.disable",title:"Disable Completions",enablement:"github.copilot.activated && config.editor.inlineSuggest.enabled && github.copilot.completions.enabled",category:"GitHub Copilot"},{command:"github.copilot.completions.enable",title:"Enable Completions",enablement:"github.copilot.activated && !(config.editor.inlineSuggest.enabled && github.copilot.completions.enabled)",category:"GitHub Copilot"},{command:"github.copilot.completions.toggle",title:"Toggle (Enable/Disable) Completions",enablement:"github.copilot.activated",category:"GitHub Copilot"},{command:"github.copilot.sendFeedback",title:"Send Feedback",category:"GitHub Copilot"},{command:"github.copilot.collectDiagnostics",title:"Collect Diagnostics",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.openLogs",title:"Open Logs",category:"GitHub Copilot"},{command:"github.copilot.openModelPicker",title:"Change Completions Model",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github.copilot.sendCompletionFeedback",title:"Send Copilot Completion Feedback",category:"GitHub Copilot",enablement:"!isWeb"},{command:"github-copilot-completions-debugger-view.refresh",title:"Refresh",icon:"$(refresh)"}],keybindings:[{command:"github.copilot.acceptCursorPanelSolution",key:"ctrl+/",mac:"ctrl+/",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.previousPanelSolution",key:"alt+[",mac:"alt+[",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.nextPanelSolution",key:"alt+]",mac:"alt+]",when:"activeWebviewPanelId == 'GitHub Copilot Suggestions'"},{command:"github.copilot.acceptCursorComparisonPanelSolution",key:"ctrl+shift+/",mac:"ctrl+shift+/",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"github.copilot.previousComparisonPanelSolution",key:"alt+shift+[",mac:"alt+shift+[",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"github.copilot.nextComparisonPanelSolution",key:"alt+shift+]",mac:"alt+shift+]",when:"activeWebviewPanelId == 'GitHub Copilot Comparison' && github.copilot.comparisonPanelEnabled"},{command:"editor.action.inlineSuggest.trigger",key:"alt+\\",when:"editorTextFocus && !editorHasSelection && !inlineSuggestionsVisible"}],configuration:[{title:"GitHub Copilot",properties:{"github.copilot.selectedCompletionModel":{type:"string",default:"",markdownDescription:'The currently selected completion model ID. To select from a list of available models, use the __"Change Completions Model"__ command or open the model picker (from the Copilot menu in the VS Code title bar, select __"Configure Code Completions"__ then __"Change Completions Model"__. The value must be a valid model ID. An empty value indicates that the default model will be used.'},"github.copilot.advanced":{type:"object",title:"Advanced Settings",properties:{authProvider:{type:"string",enum:["github","github-enterprise"],enumDescriptions:["GitHub.com","GitHub Enterprise"],default:"github",description:"The GitHub identity to use for Copilot"},authPermissions:{type:"string",enum:["default","minimal"],markdownEnumDescriptions:["Default (recommended) - The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.","Minimal - The minimal permissions required for Copilot functionality."],default:"default",markdownDescription:"Controls what kind of permissions are asked for when signing in to Copilot. The options are\n* `default` - (strongly recommended) The default permissions enable the best that Copilot has to offer including, but not limited to, faster repo indexing and the power of the `@github` agent.\n* `minimal` - The minimal permissions are the least that Copilot needs to function. Some features may behave slower or not at all."},useLanguageServer:{type:"boolean",default:!1,description:"Experimental: Use language server"},"debug.overrideEngine":{type:"string",default:"",description:"Override engine name"},"debug.overrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy full URL"},"debug.testOverrideProxyUrl":{type:"string",default:"",description:"Override GitHub authentication proxy URL when running tests"},"debug.overrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API full URL"},"debug.testOverrideCapiUrl":{type:"string",default:"",description:"Override GitHub Copilot API URL when running tests"},"debug.filterLogCategories":{type:"array",default:[],deprecationMessage:"Set overrideLogLevels.* to ERROR to filter out unwanted categories.",description:"Show only log categories listed in this setting. If an array is empty, show all loggers"}}},"github.copilot.enable":{type:"object",scope:"window",default:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},additionalProperties:{type:"boolean"},markdownDescription:"Enable or disable auto triggering of Copilot completions for specified [languages](https://code.visualstudio.com/docs/languages/identifiers). You can still trigger suggestions manually using `Alt + \\`"}}}],configurationDefaults:{"editor.tokenColorCustomizations":{"[*Light*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#000"}}]},"[*Dark*]":{textMateRules:[{scope:"ref.matchtext",settings:{foreground:"#fff"}}]}}},languages:[{id:"code-referencing"}],grammars:[{language:"code-referencing",scopeName:"text.ref",path:"./syntaxes/ref.tmGrammar.json"}],iconFonts:[{id:"copilot-font",src:[{path:"assets/copilot.woff",format:"woff"}]}],viewsContainers:{activitybar:[{id:"github-copilot-completions-debugger-panel",title:"Debugger",icon:"$(bug)",when:"config.github.copilot.internal.showWorkspaceContextDebugger && config.github.copilot.internal.useWorkspaceContextCoordinator"}]},views:{"github-copilot-completions-debugger-panel":[{id:"github-copilot-completions-debugger-view",name:"Debugger",when:"config.github.copilot.internal.showWorkspaceContextDebugger && config.github.copilot.internal.useWorkspaceContextCoordinator",icon:"$(bug)"}]},menus:{"view/title":[{command:"github-copilot-completions-debugger-view.refresh",when:"view == github-copilot-completions-debugger-view",group:"navigation"}]}},pHt={build:"tsx esbuild.ts",clean:"./script/build/clean.sh",compress:"tsx ./script/compressTokenizer.ts","forbid-sources-content:extension":"node script/forbid-sources-content.js --extension",generate_languages:"tsx script/generateLanguages.ts && prettier --write lib/src/language/generatedLanguages.ts",get_token:"tsx script/deviceFlow.ts --save-as-test-token",lint:'run-p --aggregate-output "lint:*"',"lint:deps":"depcruise -c .dependency-cruiser.js .","lint:eslint":"eslint -f visualstudio --quiet --cache .","lint:prettier":"prettier --check . 2>&1","lint:types":"tsc --noEmit && tsc --noEmit -p extension/src/copilotPanel/webview",prebuild:"npm install",pretest:"npm run build","pretest:headless":"npm run build","pretest:extension":"npm run build","pretest:lsp-client":"npm run build","pretest:lib-e2e":"npm run build",prewatch:"npm run build","prewatch:esbuild":"npm run build",start:"npm run watch",test:'npm-run-all "test:extension --ignore-scripts" "test:headless --ignore-scripts" lint',"test:headless":'npm-run-all test:lib test:agent "test:lib-e2e --ignore-scripts" test:prompt "test:lsp-client --ignore-scripts" lint',"test:agent":'mocha "agent/src/**/*.test.{ts,tsx}"',"test:extension":"tsx extension/test/runTest.ts","test:lib":'mocha "lib/src/**/*.test.{ts,tsx}"',"test:lib-e2e":'mocha "lib/e2e/src/**/*.test.{ts,tsx}" --exclude "lib/e2e/src/prompt/**/*.test.ts"',"test:lib-e2e-no-ci":'mocha "lib/e2e/no-ci/**/*.test.{ts,tsx}"',"test:lib-prompt-e2e":'mocha "lib/e2e/src/prompt/prompt.test.ts"',"test:lib-prompt-e2e-perf":"INCLUDE_PERFORMANCE=true npm run test:lib-prompt-e2e","test:lsp-client":'mocha "lsp-client/test/*.test.{ts,tsx}"',"test:prompt":'mocha "prompt/test/**/*.test.{ts,tsx}"',"test:prepare-msbench":"tsx script/setupMsbench.ts","test:run-msbench":"tsx lsp-client/test/msbench/agent/index.ts","vscode-dts":"vscode-dts dev && mv vscode.proposed.*.ts extension/src","vscode:prepublish":'run-s "build --ignore-scripts" forbid-sources-content:extension',"vscode:uninstall":"node dist/extensionUninstalled.js",vsix:"vsce package --allow-missing-repository",watch:'run-p "watch:esbuild --ignore-scripts" "watch:types -- --preserveWatchOutput"',"watch:esbuild":"tsx esbuild.ts --watch","watch:types":"tsc --noEmit --watch"},mHt={"@azure/identity":"^4.11.0","@azure/keyvault-secrets":"^4.10.0","@datadog/datadog-ci":"^3.17.0","@github/prettier-config":"0.0.6","@limegrass/eslint-plugin-import-alias":"^1.5.1","@parcel/watcher":"^2.5.1","@types/benchmark":"^2.1.5","@types/crypto-js":"^4.2.2","@types/diff":"^8.0.0","@types/git-url-parse":"^16.0.0","@types/js-yaml":"^4.0.6","@types/kerberos":"^1.1.2","@types/mocha":"^10.0.10","@types/node":"~20.16.0","@types/semver":"^7.7.0","@types/sinon":"^17.0.4","@types/uuid":"^10.0.0","@types/vscode":"1.98.0","@types/yargs":"^17.0.24","@vscode/test-electron":"^2.5.2","@vscode/vsce":"^3.6.0","@yao-pkg/pkg":"^6.6.0",benchmark:"^2.1.4",boxen:"^8.0.1",chalk:"^5.4.1","dependency-cruiser":"^17.0.1",electron:"^28.1.4",esbuild:"^0.25.8","esbuild-plugin-copy":"^2.1.1",eslint:"^9.32.0","eslint-formatter-visualstudio":"^8.40.0","eslint-plugin-mocha":"^10.5.0",glob:"^11.0.3",globals:"^16.3.0","js-yaml":"^4.1.0",mocha:"^11.2.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",prettier:"^3.5.3","prettier-plugin-organize-imports":"^4.2.0",proxy:"^2.1.1","simple-git":"^3.28.0",sinon:"^20.0.0","ts-dedent":"^2.2.0",tsx:"^4.19.4",typescript:"^5.9.2","typescript-eslint":"^8.39.1","vscode-dts":"^0.3.3"},hHt={"@adobe/helix-fetch":"github:devm33/helix-fetch#2a08fa939591a0e14f34f611adcc3ed767579e9a","@anthropic-ai/sdk":"^0.56.0","@github/memoize":"1.1.5","@microsoft/1ds-post-js":"^4.3.9","@microsoft/applicationinsights-web-basic":"^3.3.6","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.17.0","@sinclair/typebox":"^0.34.33","@types/vscode-webview":"^1.57.4","@vscode/codicons":"^0.0.39","@vscode/prompt-tsx":"0.4.0-alpha.1","@vscode/webview-ui-toolkit":"^1.3.1","await-lock":"^2.2.2","crypto-js":"^4.2.0",diff:"^8.0.2",dldr:"^0.0.10",events:"^3.3.0","get-stream":"^6.0.1","git-url-parse":"^16.0.3",kerberos:"^2.2.0","mac-ca":"^3.1.3",microjob:"^0.7.0",minimatch:"^9.0.3",open:"^10.2.0","os-browserify":"^0.3.0","path-browserify":"^1.0.1",semver:"^7.7.1",shiki:"~1.15.0","source-map-support":"^0.5.21",sqlite3:"^5.1.7",uuid:"^11.1.0","vscode-languageclient":"^9.0.0","vscode-languageserver":"^9.0.0","vscode-languageserver-protocol":"^3.17","vscode-languageserver-textdocument":"~1.0.11","vscode-uri":"^3.1.0","web-tree-sitter":"^0.20.8","windows-ca-certs":"^0.2.2",yargs:"^17.7.2"},gHt={fsevents:"<0",bindings:"npm:bundled-bindings@^1.5.0"},AHt={name:Wqt,displayName:jqt,description:Gqt,version:Vqt,build:zqt,buildType:Kqt,publisher:Yqt,preview:Jqt,homepage:Xqt,license:Zqt,bugs:eHt,qna:tHt,icon:rHt,pricing:nHt,extensionPack:iHt,engines:oHt,categories:sHt,keywords:aHt,badges:cHt,activationEvents:lHt,browser:uHt,main:dHt,enabledApiProposals:fHt,contributes:PCe,scripts:pHt,devDependencies:mHt,dependencies:hHt,overrides:gHt};var Ht={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",FetchStrategy:"fetchStrategy",ToolConfirmAutoApprove:"agent.toolConfirmAutoApprove",MaxToolCallingLoop:"agent.maxToolCallingLoop",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugOverrideLogLevels:"advanced.debug.overrideLogLevels",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",DebugUseElectronFetcher:"advanced.debug.useElectronFetcher",DebugUseEditorFetcher:"advanced.debug.useEditorFetcher",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",TrimCompletionsAggressively:"internal.trimCompletionsAggressively",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",ShowWorkspaceContextDebugger:"internal.showWorkspaceContextDebugger",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",NESXTab:"internal.useXTab",UseSplitContextPrompt:"internal.useSplitContextPrompt",UseCompletionsComparisonPanel:"internal.useCompletionsComparisonPanel",ComparisonPanelModelIds:"internal.comparisonPanelModelIds",ComparisonPanelRandomizedMode:"internal.comparisonPanelRandomizedMode"};function Rje(t){return["server","parsingandserver"].includes(t)}s(Rje,"shouldDoServerTrimming");var bA=class{static{s(this,"BlockModeConfig")}},UB=class extends bA{static{s(this,"ConfigBlockModeConfig")}forLanguage(e,r,n){let i=e.get(Mt).overrideBlockMode(n);if(i)return DCe(i,r);let o=e.get(Mt).enableProgressiveReveal(n);return(zi(e,Ht.AlwaysRequestMultiline)??o)||UC.isTrimmedByDefault(r)?DCe("moremultiline",r):r=="ruby"?"parsing":U0(r)?"parsingandserver":"server"}};function yHt(t){return["parsing","parsingandserver","moremultiline"].includes(t)}s(yHt,"blockModeRequiresTreeSitter");function DCe(t,e){return t==="moremultiline"&&Zu.isSupported(e)?t:yHt(t)&&!U0(e)?"server":t}s(DCe,"toApplicableBlockMode");var Mc=class{static{s(this,"ConfigProvider")}requireReady(){return Promise.resolve()}},qB=class extends Mc{constructor(){super(...arguments);this.onDidChangeCopilotSettings=s(()=>({dispose:s(()=>{},"dispose")}),"onDidChangeCopilotSettings");this.onDidChangeHttpSettings=this.onDidChangeCopilotSettings}static{s(this,"DefaultsOnlyConfigProvider")}getConfig(r){return vHt(r)}getOptionalConfig(r){return xHt(r)}dumpForTelemetry(){return{}}getHttpSettings(){return{proxy:""}}},uR=class extends Mc{constructor(r,n){super();this.baseConfigProvider=r;this.overrides=n;this.copilotEmitter=new Ss;this.onDidChangeCopilotSettings=this.copilotEmitter.event;this.didChangeHttpSettingsEmitter=new Ss;this.onDidChangeHttpSettings=this.didChangeHttpSettingsEmitter.event;this.httpSettings=this.baseConfigProvider.getHttpSettings()}static{s(this,"InMemoryConfigProvider")}getOptionalOverride(r){return this.overrides.get(r)}getConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getConfig(r)}getOptionalConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getOptionalConfig(r)}setConfig(r,n){this.setCopilotSettings({[r]:n})}setCopilotSettings(r){for(let[n,i]of Object.entries(r))i!==void 0?this.overrides.set(n,i):this.overrides.delete(n);this.copilotEmitter.fire(this)}getHttpSettings(){return this.httpSettings}setHttpSettings(r){let n=DO(r);this.httpSettings=n,this.didChangeHttpSettingsEmitter.fire(this.getHttpSettings())}dumpForTelemetry(){let r=this.baseConfigProvider.dumpForTelemetry();for(let n of[Ht.ShowEditorCompletions,Ht.EnableAutoCompletions,Ht.DelayCompletions,Ht.FilterCompletions]){let i=this.overrides.get(n);i!==void 0&&(r[n]=JSON.stringify(i))}return r}};function CHt(t){return t?.type==="object"&&"properties"in t}s(CHt,"isContributesObject");function kje(t,e){let r=t,n=[];for(let i of e.split(".")){let o=[...n,i].join(".");r&&typeof r=="object"&&o in r?(r=r[o],n.length=0):n.push(i)}if(!(r===void 0||n.length>0))return r}s(kje,"getConfigKeyRecursively");function vHt(t){if(QB.has(t))return QB.get(t);throw new Error(`Missing config default value: ${L9}.${t}`)}s(vHt,"getConfigDefaultForKey");function xHt(t){return QB.get(t)}s(xHt,"getOptionalConfigDefaultForKey");var QB=new Map([[Ht.DebugOverrideCppHeadersEnableSwitch,!1],[Ht.RelatedFilesVSCodeCSharp,!1],[Ht.RelatedFilesVSCodeTypeScript,!1],[Ht.RelatedFilesVSCode,!1],[Ht.IncludeNeighboringFiles,!1],[Ht.ExcludeRelatedFiles,!1],[Ht.ContextProviders,[]],[Ht.DebugUseEditorFetcher,null],[Ht.DebugUseElectronFetcher,null],[Ht.DebugOverrideLogLevels,{}],[Ht.DebugSnippyOverrideUrl,""],[Ht.FetchStrategy,"auto"],[Ht.ToolConfirmAutoApprove,!1],[Ht.MaxToolCallingLoop,25],[Ht.UseSubsetMatching,null],[Ht.ContextProviderTimeBudget,void 0],[Ht.DebugOverrideCapiUrl,""],[Ht.DebugTestOverrideCapiUrl,""],[Ht.DebugOverrideProxyUrl,""],[Ht.DebugTestOverrideProxyUrl,""],[Ht.DebugOverrideEngine,""],[Ht.AlwaysRequestMultiline,void 0],[Ht.ModelAlwaysTerminatesSingleline,void 0],[Ht.TrimCompletionsAggressively,void 0],[Ht.CompletionsDebounce,void 0],[Ht.NESXTab,void 0],[Ht.UseWorkspaceContextCoordinator,void 0],[Ht.ShowWorkspaceContextDebugger,!1],[Ht.CompletionsDelay,void 0],[Ht.UseSplitContextPrompt,void 0],[Ht.UseCompletionsComparisonPanel,!1],[Ht.ComparisonPanelModelIds,["gpt-4o-copilot","chat-v6"]],[Ht.ComparisonPanelRandomizedMode,!1],[Ht.ShowEditorCompletions,void 0],[Ht.EnableAutoCompletions,void 0],[Ht.DelayCompletions,void 0],[Ht.FilterCompletions,void 0]]);for(let t of Object.values(Ht)){let e=PCe.configuration[0],r=[],n=`${L9}.${t}`.split(".");for(;n.length>0;){r.push(n.shift());let i=e.properties[r.join(".")];if(CHt(i))r.length=0,e=i;else if(n.length==0&&i?.default!==void 0){if(QB.has(t))throw new Error(`Duplicate config default value ${L9}.${t}`);QB.set(t,i.default)}}if(!QB.has(t))throw new Error(`Missing config default value ${L9}.${t}`)}function zi(t,e){return t.get(Mc).getConfig(e)}s(zi,"getConfig");function rFe(t){return t.get(Mc).dumpForTelemetry()}s(rFe,"dumpForTelemetry");var To=class{constructor(){this.packageJson=kCe}static{s(this,"BuildInfo")}isPreRelease(){return this.getBuildType()==="nightly"}isProduction(){return this.getBuildType()!=="dev"}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getDisplayVersion(){return this.getBuildType()==="dev"?`${this.getVersion()}-dev`:this.getVersion()}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}};function Jfe(t){return t.get(To).isProduction()}s(Jfe,"isProduction");function gFe(t){return t.get(To).getBuildType()==="dev"}s(gFe,"isDevBuild");function AC(t){return t.get(To).getBuildType()}s(AC,"getBuildType");function nFe(t){return t.get(To).getBuild()}s(nFe,"getBuild");function s2(t){return t.get(To).getVersion()}s(s2,"getVersion");var Ls=class{constructor(e,r,n="none",i="desktop"){this.sessionId=e;this.machineId=r;this.remoteName=n;this.uiKind=i}static{s(this,"EditorSession")}};function oC({name:t,version:e}){return`${t}/${e}`}s(oC,"formatNameAndVersion");var dn=class{static{s(this,"EditorAndPluginInfo")}getCopilotIntegrationId(){}},NB="2025-05-01";function p0(t){let e=t.get(dn);return{"Editor-Version":oC(e.getEditorInfo()),"Editor-Plugin-Version":oC(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":s2(t)}}s(p0,"editorVersionHeaders");var w0="Iv1.b507a08c87ecfe98",Pje="350ee525b5da0e4a54c6e8e043edc1b99cc02f19",iu=class{static{s(this,"GitHubAppInfo")}findAppIdToAuthenticate(){return this.githubAppId??w0}};var Or=class{static{s(this,"Fetcher")}getImplementation(){return this}};function Cx(t,e,r,n,i,o,a,c,l,u){let f={...c,Authorization:`Bearer ${r}`,...p0(t)};u===void 0&&(f["Openai-Organization"]="github-copilot",f["X-Request-Id"]=i,f["VScode-SessionId"]=t.get(Ls).sessionId,f["VScode-MachineId"]=t.get(Ls).machineId,f["X-GitHub-Api-Version"]=NB),n&&(f["OpenAI-Intent"]=n);let p={method:"POST",headers:f,json:o,timeout:l},m=t.get(Or);if(a){let g=new AbortController;a.onCancellationRequested(()=>{Bt(t,"networking.cancelRequest",Vr.createAndMarkAsIssued({headerRequestId:i})),g.abort()}),p.signal=g.signal}return m.fetch(e,p).catch(g=>{if(EHt(g))return Bt(t,"networking.disconnectAll"),m.disconnectAll().then(()=>m.fetch(e,p));throw g})}s(Cx,"postRequest");function EHt(t){return t instanceof Error?t.message=="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code=="ECONNRESET"||t.code=="ETIMEDOUT"||t.code=="ERR_HTTP2_INVALID_SESSION":!1:!1}s(EHt,"isInterruptedNetworkError");var bHt=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function IHt(t){return bHt.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}s(IHt,"isOomError");function vx(t,e,r,n=un){if(!Td(e)){if(e instanceof Error){let i=e;IHt(i)?t.get(qo).setWarning("Out of memory"):i.code==="EMFILE"||i.code==="ENFILE"?t.get(qo).setWarning("Too many open files"):i.code==="CopilotPromptLoadFailure"?t.get(qo).setWarning("Corrupted Copilot installation"):`${i.code}`.startsWith("CopilotPromptWorkerExit")?t.get(qo).setWarning("Worker unexpectedly exited"):i.syscall==="uv_cwd"&&i.code==="ENOENT"&&t.get(qo).setWarning("Current working directory does not exist")}n.exception(t,e,r)}}s(vx,"handleException");function Dje(t){process.addListener("uncaughtException",r=>{vx(t,r,"uncaughtException")});let e=!1;process.addListener("unhandledRejection",r=>{if(!e)try{e=!0,vx(t,r,"unhandledRejection")}finally{e=!1}})}s(Dje,"registerDefaultHandlers");async function Bje(t){try{await cR}catch(e){vx(t,e,"initializeTokenizers")}}s(Bje,"waitForTokenizers");d();var IT=require("fs"),Nje=require("os"),Mje=Be(require("path")),HB=require("process");var yi=class{static{s(this,"PersistenceManager")}},BCe=class extends yi{constructor(r){super();this.directory=r}static{s(this,"FilePersistenceManager")}async read(r,n){try{return(await this.readJsonObject(r))[n]}catch{return}}async update(r,n,i){await IT.promises.mkdir(this.directory,{recursive:!0,mode:448});let o=`${this.directory}/${r}.json`,a;try{a=await BO.acquire(o);let c=await this.readJsonObject(r);c[n]=i,await IT.promises.writeFile(o,JSON.stringify(c)+`
462
462
  `,{encoding:"utf8"})}finally{a&&await a()}}async delete(r,n){let i=`${this.directory}/${r}.json`,o;try{o=await BO.acquire(i);let a=await this.readJsonObject(r);delete a[n];let c=JSON.stringify(a)+`
463
463
  `;c===`{}
464
464
  `?await IT.promises.rm(i):await IT.promises.writeFile(i,c,{encoding:"utf8"})}catch{}finally{o&&await o()}}async deleteSetting(r){let n=`${this.directory}/${r}.json`,i;try{i=await BO.acquire(n),await IT.promises.rm(n)}catch{}finally{i&&await i()}}async listSettings(){try{return(await IT.promises.readdir(this.directory)).filter(n=>n.endsWith(".json")).map(n=>n.slice(0,-5))}catch{return[]}}async listKeys(r){return Object.keys(await this.readJsonObject(r))}async readJsonObject(r){let n=`${this.directory}/${r}.json`;try{let i=await IT.promises.readFile(n,{encoding:"utf8"});return JSON.parse(i)}catch{return{}}}},BO=class{static{s(this,"LockManager")}static{this.locks=new Map}static{this.DEFAULT_TIMEOUT_MS=1e4}static async acquire(e){await this.getLock(e);let r,n=new Promise(i=>{r=i});return this.locks.set(e,n),()=>Promise.resolve().then(()=>{r&&(r(),r=void 0,this.locks.get(e)===n&&this.locks.delete(e))})}static async getLock(e){let r=Date.now();for(;Date.now()-r<this.DEFAULT_TIMEOUT_MS;){let n=this.locks.get(e);if(!n)return;let i=this.DEFAULT_TIMEOUT_MS-(Date.now()-r);if(i<=0)return;let o=new Promise((a,c)=>{setTimeout(()=>{c(new Error("timeout"))},i)});try{await Promise.race([n,o])}catch{return}}}};function NCe(){return HB.env.XDG_CONFIG_HOME&&Mje.isAbsolute(HB.env.XDG_CONFIG_HOME)?HB.env.XDG_CONFIG_HOME+"/github-copilot":(0,Nje.platform)()==="win32"?HB.env.USERPROFILE+"\\AppData\\Local\\github-copilot":HB.env.HOME+"/.config/github-copilot"}s(NCe,"getXdgConfigPath");function Lje(){return new BCe(NCe())}s(Lje,"makeXdgPersistenceManager");d();d();d();var xx={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}};d();d();var Fje=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"],Oje={".php":[".blade"]},dR=Object.keys(xx).flatMap(t=>xx[t].extensions);var MCe=Be(require("node:path"));var WB=class{constructor(e,r,n){this.languageId=e;this.isGuess=r;this.fileExtension=n}static{s(this,"Language")}},NO=class{static{s(this,"LanguageDetection")}},LCe=new Map,$B=new Map;for(let[t,{extensions:e,filenames:r}]of Object.entries(xx)){for(let n of e)LCe.set(n,[...LCe.get(n)??[],t]);for(let n of r??[])$B.set(n,[...$B.get(n)??[],t])}var FCe=class extends NO{static{s(this,"FilenameAndExensionLanguageDetection")}detectLanguage(e){let r=Pi(e.uri),n=MCe.extname(r).toLowerCase(),i=this.extensionWithoutTemplateLanguage(r,n),o=this.detectLanguageId(r,i),a=this.computeFullyQualifiedExtension(n,i);return o?new WB(o.languageId,o.isGuess,a):new WB(e.languageId,!0,a)}extensionWithoutTemplateLanguage(e,r){if(Fje.includes(r)){let n=e.substring(0,e.lastIndexOf(".")),i=MCe.extname(n).toLowerCase();if(i.length>0&&dR.includes(i)&&this.isExtensionValidForTemplateLanguage(r,i))return i}return r}isExtensionValidForTemplateLanguage(e,r){let n=Oje[e];return!n||n.includes(r)}detectLanguageId(e,r){if($B.has(e))return{languageId:$B.get(e)[0],isGuess:!1};let n=LCe.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;e.includes(".");)if(e=e.replace(/\.[^.]*$/,""),$B.has(e))return{languageId:$B.get(e)[0],isGuess:!1}}computeFullyQualifiedExtension(e,r){return e!==r?r+e:e}},OCe=class extends NO{constructor(r){super();this.delegate=r}static{s(this,"GroupingLanguageDetection")}detectLanguage(r){let n=this.delegate.detectLanguage(r),i=n.languageId;return i==="c"||i==="cpp"?new WB("cpp",n.isGuess,n.fileExtension):n}},QCe=class extends NO{constructor(r){super();this.delegate=r}static{s(this,"ClientProvidedLanguageDetection")}detectLanguage(r){return r.uri.startsWith("untitled:")||r.uri.startsWith("vscode-notebook-cell:")?new WB(r.languageId,!0,""):this.delegate.detectLanguage(r)}},THt=new OCe(new QCe(new FCe));function TT({uri:t,languageId:e}){let r=THt.detectLanguage({uri:t,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?e:r.languageId}s(TT,"detectLanguage");d();d();d();d();function Ex(t){if(t.isCancellationRequested)throw new TY}s(Ex,"throwIfCancellationRequested");function SY(t){return t instanceof TY?!0:t instanceof Error&&t.name===UCe&&t.message===UCe}s(SY,"isCancellationError");var TY=class extends Error{static{s(this,"CancellationError")}constructor(){super(UCe),this.name=this.message}},UCe="Canceled",wY=class{constructor(){this.items=[]}static{s(this,"Stack")}push(e){this.items.push(e)}pop(){return this.items.pop()}peek(){return this.items[this.items.length-1]}tryPeek(){return this.items.length>0}toArray(){return this.items}};function fR(t){switch(t){case 0:case 2:case 7:case 8:case 11:case 12:case 13:case 14:return!0;default:return!1}}s(fR,"isTypeDefinition");var Hs=class t{static{s(this,"TextRange")}static{this.empty=new t(0,0)}constructor(e,r){this.start=e,this.length=r}static fromBounds(e,r){return new t(e,r-e)}get end(){return this.start+this.length}contains(e){return this.start<=e&&this.end>=e}containsRange(e){return this.start<=e.start&&this.end>=e.end}equals(e){return this.start===e.start&&this.length===e.length}getText(e){return e.slice(this.start,this.end)}getTextWithIndentation(e,r){let n=[],i=this.start;for(i=Uje(e,e.length,i),Qje(n,r);i<this.end;)e[i]!=="\r"&&e[i]!==`
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/github/copilot-language-server-release.git"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "1.365.0",
14
+ "version": "1.366.0",
15
15
  "bin": {
16
16
  "copilot-language-server": "../dist/language-server.js"
17
17
  },
@@ -32,12 +32,12 @@
32
32
  "vscode-languageserver-protocol": "^3.17.5"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@github/copilot-language-server-win32-x64": "1.365.0",
36
- "@github/copilot-language-server-linux-x64": "1.365.0",
37
- "@github/copilot-language-server-linux-arm64": "1.365.0",
38
- "@github/copilot-language-server-darwin-x64": "1.365.0",
39
- "@github/copilot-language-server-darwin-arm64": "1.365.0"
35
+ "@github/copilot-language-server-win32-x64": "1.366.0",
36
+ "@github/copilot-language-server-linux-x64": "1.366.0",
37
+ "@github/copilot-language-server-linux-arm64": "1.366.0",
38
+ "@github/copilot-language-server-darwin-x64": "1.366.0",
39
+ "@github/copilot-language-server-darwin-arm64": "1.366.0"
40
40
  },
41
41
  "buildType": "prod",
42
- "build": "1773"
42
+ "build": "1774"
43
43
  }