var g=class{async fetch(t,e){let r={method:e.method||"GET",headers:e.headers,signal:e.signal};e.json?(r.body=JSON.stringify(e.json),r.headers={"Content-Type":"application/json",...r.headers}):e.body&&(r.body=e.body);let i,s;e.timeout&&!e.signal&&(s=new AbortController,r.signal=s.signal,i=setTimeout(()=>{s.abort()},e.timeout));try{let n=await fetch(t,r);return i&&clearTimeout(i),n}catch(n){throw i&&clearTimeout(i),n}}async fetchWithPagination(t,e){let r=[],i=e.pageSize??20,s=e.startPage??1,n=!1;do{let a=e.buildUrl(t,i,s),p=await this.fetch(a,e);if(!p.ok)return r;let l=await p.json(),u=e.getItemsFromResponse(l);r.push(...u),n=u.length===i,s++}while(n);return r}createWebSocket(t,e){return{webSocket:new WebSocket(t)}}};var d=class d{constructor(){this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com";this._originTrackerUrl="https://origin-tracker.githubusercontent.com";this._dotcomAPIUrl=this._getDotComAPIUrl(),this._proxyBaseUrl=this._getProxyUrl(void 0),this._capiBaseUrl=this._getCAPIUrl(void 0)}updateDomains(t,e){let r=this._dotcomAPIUrl,i=this._capiBaseUrl,s=this._telemetryBaseUrl,n=this._proxyBaseUrl;return this._enterpriseUrlConfig!==e&&(this._enterpriseUrlConfig=e,this._dotcomAPIUrl=this._getDotComAPIUrl()),t?(this._proxyBaseUrl=this._getProxyUrl(t),this._capiBaseUrl=this._getCAPIUrl(t),this._telemetryBaseUrl=t.endpoints.telemetry||"https://copilot-telemetry.githubusercontent.com",t.endpoints["origin-tracker"]&&(this._originTrackerUrl=t.endpoints["origin-tracker"])):(this._capiBaseUrl="https://api.githubcopilot.com",this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com"),{dotcomUrlChanged:r!==this._dotcomAPIUrl,capiUrlChanged:i!==this._capiBaseUrl,telemetryUrlChanged:s!==this._telemetryBaseUrl,proxyUrlChanged:n!==this._proxyBaseUrl}}_getDotComAPIUrl(){if(this._enterpriseUrlConfig)try{let t=new URL(this._enterpriseUrlConfig);return`${t.protocol}//api.${t.hostname}${t.port?":"+t.port:""}`}catch(t){return console.warn("Failed to parse enterprise URL config:",this._enterpriseUrlConfig,t),"https://api.github.com"}return"https://api.github.com"}_getCAPIUrl(t){return t&&t.endpoints.api||"https://api.githubcopilot.com"}_getProxyUrl(t){return t&&t.endpoints.proxy||d.DEFAULT_PROXY_BASE_URL}get proxyBaseURL(){return this._proxyBaseUrl}get capiBaseURL(){return this._capiBaseUrl}get capiChatURL(){return`${this._capiBaseUrl}/chat/completions`}get capiResponsesURL(){return`${this._capiBaseUrl}/responses`}get capiMessagesURL(){return`${this._capiBaseUrl}/v1/messages`}get capiEmbeddingsURL(){return`${this._capiBaseUrl}/embeddings`}get capiModelsURL(){return`${this._capiBaseUrl}/models`}get capiAutoModelURL(){return`${this.capiModelsURL}/session`}get capiModelRouterURL(){return`${this.capiAutoModelURL}/intent`}get embeddingsModelURL(){return`${this.embeddingsURL}/models`}get chunksURL(){return`${this.dotComAPIURL}/chunks`}get embeddingsURL(){return`${this.dotComAPIURL}/embeddings`}get embeddingsCodeSearchURL(){return`${this.dotComAPIURL}/embeddings/code/search`}get telemetryURL(){return`${this._telemetryBaseUrl}/telemetry`}get remoteAgentsURL(){return`${this._capiBaseUrl}/agents`}get listSkillsURL(){return`${this._capiBaseUrl}/skills`}get searchSkillURL(){return`${this._capiBaseUrl}/search`}get contentExclusionURL(){return`${this._dotcomAPIUrl}/copilot_internal/content_exclusion`}get copilotUserInfoURL(){return`${this._dotcomAPIUrl}/copilot_internal/user`}get tokenURL(){return this._dotcomAPIUrl+"/copilot_internal/v2/token"}get tokenNoAuthURL(){return`${this._dotcomAPIUrl}/copilot_internal/v2/nltoken`}get dotComAPIURL(){return this._dotcomAPIUrl}get originTrackerURL(){return this._originTrackerUrl}get chatAttachmentUploadURL(){return"https://uploads.github.com/copilot/chat/attachments"}get copilotAgentSessionsURL(){return`${this._capiBaseUrl}/agents/sessions`}get copilotAgentJobsURL(){return`${this._capiBaseUrl}/agents/swe`}get CCAModelsURL(){return`${this._capiBaseUrl}/agents/swe/models`}get copilotCustomAgentsURL(){return`${this._capiBaseUrl}/agents/swe/custom-agents`}get copilotAgentMemoryURL(){return`${this._capiBaseUrl}/agents/swe/internal/memory/v0`}};d.DEFAULT_PROXY_BASE_URL="https://copilot-proxy.githubusercontent.com",d.CAPI_MODEL_LAB_URL="https://api-model-lab.githubcopilot.com";var c=d;var S=`The \u201C@vscode/copilot-api\u201D npm Module Terms and Conditions ("Terms") are a legal agreement between you (either as an individual or on behalf of an entity) and GitHub, Inc. regarding your use of \u201C@vscode/copilot-api\u201D npm library and associated documentation (collectively, the "Software"). By using the Software, you accept these Terms. Please read all of these Terms; in many cases, provisions set forth later in the Terms limit and qualify provisions set forth earlier in the Terms. If you do not accept these Terms, do not download, install, use, or copy the Software.

IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.

1. INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software only with the Visual Studio Code or Code-OSS and successor Microsoft products and services for use with GitHub Copilot. The use with Code-OSS is allowed for development purposes only. No other use is permitted. 

2. TERMS FOR SPECIFIC COMPONENTS. The software may include third party components with separate legal notices or governed by other agreements, as may be described in the notices file(s) accompanying the software.

3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. GitHub reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not: 
  a) work around any technical limitations in the software;
  b) reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software except, and only to the extent required by third party licensing terms governing the use of certain open source components that may be included in the software;
  c) remove, minimize, block or modify any notices of GitHub or its suppliers in the software; 
  d) use the Software to create or propagate malware, or in any other way that is prohibited by law; 
  e) share, publish, rent or lease the software, except in combining the software with GitHub applications; or 
  f) provide the software as a stand-alone offering or combined with any of your applications for others to use, or transfer the software or this agreement to any third party, except in combining the software with GitHub applications. 

4. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use.

5. SUPPORT SERVICES. Because this software is "as is," we may not provide support services for it.

6. FEEDBACK.  If you give feedback about the software to GitHub, you give to GitHub the right to use, share, and commercialize your feedback in any way and for any purpose, without payment to you. You agree that you will not give feedback that is subject to any license that would require GitHub to license its software or documentation to third parties if we included your feedback in them.

7. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for this Software and support services. These Terms may only be modified by a written amendment signed by an authorized representative of GitHub, or by the posting by GitHub of a revised version.

8. APPLICABLE LAW. If you acquired the software in the United States, California law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its laws apply.

9. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with GitHub, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
a. Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.

b. Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.

c. Germany and Austria.
(i)	Warranty. The properly licensed software will perform substantially as described in any GitHub materials that accompany the software. However, GitHub gives no contractual guarantee in relation to the licensed software.
(ii)	Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, GitHub is liable according to the statutory law.
Subject to the foregoing clause (ii), GitHub will only be liable for slight negligence if GitHub is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, GitHub will not be liable for slight negligence.

10. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED "AS-IS." YOU BEAR THE RISK OF USING IT. GITHUB GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, GITHUB EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

11. LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM GITHUB AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $50.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.

This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.

It also applies even if GitHub knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.`,f=`I have read and agree to the following license terms:

${S}
`;var _=(o=>(o.CopilotToken="CopilotToken",o.CopilotNLToken="CopilotNLToken",o.ChatCompletions="ChatCompletions",o.ChatResponses="ChatResponses",o.ChatMessages="ChatMessages",o.ProxyCompletions="ProxyCompletions",o.ProxyChatCompletions="ProxyChatCompletions",o.RemoteAgent="RemoteAgent",o.RemoteAgentChat="RemoteAgentChat",o.CodeReviewAgent="CodeReviewAgent",o.CAPIEmbeddings="CAPIEmbeddings",o.DotcomEmbeddings="DotcomEmbeddings",o.EmbeddingsModels="EmbeddingsModels",o.Models="Models",o.AutoModels="AutoModels",o.Chunks="Chunks",o.EmbeddingsCodeSearch="EmbeddingsCodeSearch",o.ListSkills="ListSkills",o.SearchSkill="SearchSkill",o.ContentExclusion="ContentExclusion",o.Telemetry="Telemetry",o.CopilotUserInfo="CopilotUserInfo",o.ModelPolicy="ModelPolicy",o.ListModel="ListModel",o.SnippyMatch="SnippyMatch",o.SnippyFilesForMatch="SnippyFlesForMatch",o.CodingGuidelines="CodingGuidelines",o.EmbeddingsIndex="EmbedingsIndex",o.ChatAttachmentUpload="ChatAttachmentUpload",o.CopilotSessionLogs="CopilotSessionLogs",o.CopilotSessionDetails="CopilotSessionDetails",o.CopilotSessions="CopilotSessions",o.CopilotAgentJob="CopilotAgentJob",o.CCAModelsList="CCAModelsList",o.CopilotCustomAgents="CopilotCustomAgents",o.CopilotCustomAgentsDetail="CopilotCustomAgentsDetail",o.OrgCustomInstructions="OrgCustomInstructions",o.CopilotAgentMemory="CopilotAgentMemory",o.CopilotAgentJobEnabled="CopilotAgentJobEnabled",o.ModelRouter="ModelRouter",o))(_||{});async function y(h){if(!h)return;let t=await crypto.subtle.importKey("raw",new TextEncoder().encode(h),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),e=Math.floor(Date.now()/1e3).toString(),i=new TextEncoder().encode(e),s=await crypto.subtle.sign("HMAC",t,i),a=Array.from(new Uint8Array(s)).map(p=>p.toString(16).padStart(2,"0")).join("");return`${e}.${a}`}function C(h){return new Set(["ChatCompletions","ChatResponses","ChatMessages","CAPIEmbeddings","Models","RemoteAgent","CodeReviewAgent","RemoteAgentChat","ListSkills","SearchSkill","ModelPolicy","ListModel","AutoModels","CopilotSessionLogs","CopilotSessionDetails","CopilotSessions","CopilotAgentJob","CCAModelsList","CopilotCustomAgents","CopilotAgentMemory","ModelRouter"]).has(h)}var m=class{constructor(t,e,r,i,s){this._extensionInfo=t;this._integrationId=s;this._licenseCheckSucceeded=!1;if(e&&e===f&&(this._licenseCheckSucceeded=!0),this._domainService=new c,this._fetcherService=r??new g,this._hmacSecret=i,this._integrationId==="vscode-chat"||this._integrationId==="code-oss")throw new Error(`Integration ID ${this._integrationId} is reserved and cannot be used.`)}updateDomains(t,e){return t&&t.sku&&(this._copilotSku=t.sku),this._domainService.updateDomains(t,e)}async makeRequest(t,e){let{type:r}=e;await this._mixinHeaders(t,e);let i={...t,callSite:t.callSite??r};switch(r){case"CopilotToken":return this._fetcherService.fetch(this._domainService.tokenURL,i);case"CopilotNLToken":return this._fetcherService.fetch(this._domainService.tokenNoAuthURL,i);case"ProxyCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/v1/engines/gpt-4o-copilot/completions`,i);case"ProxyChatCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/chat/completions`,i);case"RemoteAgent":return this._fetcherService.fetch(this._domainService.remoteAgentsURL,i);case"CodeReviewAgent":return this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/github-code-review`,i);case"CAPIEmbeddings":return this._fetcherService.fetch(this._domainService.capiEmbeddingsURL,i);case"DotcomEmbeddings":return this._fetcherService.fetch(this._domainService.embeddingsURL,i);case"EmbeddingsModels":return this._fetcherService.fetch(this._domainService.embeddingsModelURL,i);case"Chunks":return this._fetcherService.fetch(this._domainService.chunksURL,i);case"EmbeddingsCodeSearch":return this._fetcherService.fetch(this._domainService.embeddingsCodeSearchURL,i);case"ListSkills":return this._fetcherService.fetch(this._domainService.listSkillsURL,i);case"Telemetry":return this._fetcherService.fetch(this._domainService.telemetryURL,i);case"CopilotUserInfo":return this._fetcherService.fetch(this._domainService.copilotUserInfoURL,i);case"SnippyMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/Match`,i);case"SnippyFlesForMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/FilesForMatch`,i);case"EmbedingsIndex":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for EmbeddingsIndex request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/embeddings_index`,i);case"CodingGuidelines":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for CodingGuidelines request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/coding_guidelines`,i);case"AutoModels":return this._fetcherService.fetch(this._domainService.capiAutoModelURL,i);case"ModelRouter":return this._fetcherService.fetch(this._domainService.capiModelRouterURL,i);case"Models":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${c.CAPI_MODEL_LAB_URL}/models`,i):this._fetcherService.fetch(this._domainService.capiModelsURL,i);case"ChatCompletions":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${c.CAPI_MODEL_LAB_URL}/chat/completions`,i):this._fetcherService.fetch(this._domainService.capiChatURL,i);case"ChatResponses":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${c.CAPI_MODEL_LAB_URL}/responses`,i):this._fetcherService.fetch(this._domainService.capiResponsesURL,i);case"ChatMessages":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${c.CAPI_MODEL_LAB_URL}/v1/messages`,i):this._fetcherService.fetch(this._domainService.capiMessagesURL,i);case"ContentExclusion":if(!("repos"in e))throw new Error("Repos are required for ContentExclusion request");return this._fetcherService.fetch(this._prepareContentExclusionUrl(e.repos),i);case"RemoteAgentChat":return"slug"in e&&e.slug?this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/${e.slug}?chat`,i):this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/chat`,i);case"SearchSkill":if(!("slug"in e))throw new Error("Skill slug is required for SearchSkill request");return this._fetcherService.fetch(`${this._domainService.searchSkillURL}/${e.slug}`,i);case"ModelPolicy":if(!("modelId"in e))throw new Error("Model ID is required for ModelPolicy request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}/policy`,i);case"ListModel":if(!("modelId"in e))throw new Error("Model ID is required for ListModel request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}`,i);case"ChatAttachmentUpload":if(!("uploadName"in e)||!("mimeType"in e))throw new Error("uploadName and mimeType are required for ChatAttachmentUpload request");return this._fetcherService.fetch(`${this._domainService.chatAttachmentUploadURL}?name=${e.uploadName}&content_type=${e.mimeType}`,i);case"CopilotSessionLogs":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionLogs request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}/logs`,i);case"CopilotSessionDetails":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionDetails request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}`,i);case"CopilotSessions":let s={...i,getItemsFromResponse:n=>{let a=n;return a&&Array.isArray(a.sessions)?a.sessions:[]},buildUrl:(n,a,p)=>{let l=new URL(n);return l.searchParams.set("page_size",a.toString()),l.searchParams.set("page_number",p.toString()),"resourceState"in e&&e.resourceState&&l.searchParams.set("resource_state",e.resourceState),"nwo"in e&&e.nwo&&l.searchParams.set("repo_nwo",e.nwo),l.toString()}};return"prId"in e&&e.prId?this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/resource/pull/${e.prId}`,i):this._fetcherService.fetchWithPagination(this._domainService.copilotAgentSessionsURL,s);case"CopilotAgentJob":if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJob request");if("jobId"in e&&e.jobId){let n="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${n}/jobs/${e.owner}/${e.repo}/${e.jobId}`,i)}if("sessionId"in e&&e.sessionId){let n="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${n}/jobs/${e.owner}/${e.repo}/session/${e.sessionId}`,i)}if("payload"in e&&e.payload){let n="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${n}/jobs/${e.owner}/${e.repo}`,i)}throw new Error("jobId or sessionId is required for CopilotAgentJob request");case"CCAModelsList":return this._fetcherService.fetch(this._domainService.CCAModelsURL,i);case"CopilotCustomAgents":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotCustomAgents request");let n=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}`);return"target"in e&&e.target&&n.searchParams.set("target",e.target),"exclude_invalid_config"in e&&e.exclude_invalid_config!==void 0&&n.searchParams.set("exclude_invalid_config",e.exclude_invalid_config.toString()),"dedupe"in e&&e.dedupe!==void 0&&n.searchParams.set("dedupe",e.dedupe.toString()),"include_sources"in e&&e.include_sources&&n.searchParams.set("include_sources",e.include_sources.join(",")),this._fetcherService.fetch(n.toString(),i)}case"CopilotCustomAgentsDetail":{if(!("owner"in e)||!("repo"in e)||!("customAgentName"in e))throw new Error("owner, repo and customAgentName are required for CopilotCustomAgents request");let n=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}/${e.customAgentName}`);return"version"in e&&e.version&&n.searchParams.set("version",e.version),this._fetcherService.fetch(n.toString(),i)}case"OrgCustomInstructions":if(!("orgLogin"in e))throw new Error("orgLogin is required for OrgCustomInstructions request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/copilot_internal/org_custom_instructions/${e.orgLogin}`,i);case"CopilotAgentMemory":{if(!("repo"in e))throw new Error("repo is required for CopilotAgentMemory request");let n="action"in e?e.action:"",a=`${this._domainService.copilotAgentMemoryURL}/${e.repo}`;return n&&(a+=`/${n}`,n==="recent"&&"limit"in e&&e.limit!==void 0&&(a+=`?limit=${e.limit}`)),this._fetcherService.fetch(a,i)}case"CopilotAgentJobEnabled":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJobEnabled request");return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/v1/jobs/${e.owner}/${e.repo}/enabled`,i)}default:throw new Error(`Unsupported request type: ${r}`)}}async createResponsesWebSocket(t){return await this._mixinHeaders(t,{type:"ChatResponses"}),this._fetcherService.createWebSocket(this._domainService.capiResponsesURL,t)}_prepareContentExclusionUrl(t){let e=t.join(","),r=new URL(this._domainService.contentExclusionURL);return t.length!==0&&r.searchParams.set("repos",e),r.searchParams.set("scope","repo"),r.toString()}async _mixinHeaders(t,e){if(!C(e.type))return;let r=t.headers||{};r["X-GitHub-Api-Version"]="2026-01-09",r["VScode-SessionId"]=this._extensionInfo.sessionId,r["VScode-MachineId"]=this._extensionInfo.machineId,r["Editor-Device-Id"]=this._extensionInfo.deviceId,r["Editor-Plugin-Version"]=`copilot-chat/${this._extensionInfo.version}`,r["Editor-Version"]=`vscode/${this._extensionInfo.vscodeVersion}`;let i="";t.suppressIntegrationId||(i="code-oss",this._integrationId&&this._hmacSecret?i=this._integrationId:this._copilotSku==="no_auth_limited_copilot"?i="vscode-nl":this._licenseCheckSucceeded&&this._extensionInfo.buildType==="prod"?i="vscode-chat":this._extensionInfo.buildType==="dev"&&this._hmacSecret&&(i="vscode-chat-dev"),r["Copilot-Integration-Id"]=i),i==="vscode-chat-dev"&&(r["Request-Hmac"]=await y(this._hmacSecret)),t.headers=r}get copilotTelemetryURL(){return this._domainService.telemetryURL}get dotcomAPIURL(){return this._domainService.dotComAPIURL}get capiPingURL(){return`${this._domainService.capiBaseURL}/_ping`}get proxyBaseURL(){return this._domainService.proxyBaseURL}get originTrackerURL(){return this._domainService.originTrackerURL}get snippyMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/Match"}get snippyFilesForMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/FilesForMatch"}};export{m as CAPIClient,_ as RequestType};//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-824c4c46a288b839f13b24022655329c2aeb9f81/node_modules-@vscode-copilot-api-dist-index.js.map
