download
raw
17.7 kB
"use strict";var Ae=Object.create;var ne=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var Le=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of be(t))!ve.call(e,r)&&r!==n&&ne(e,r,{get:()=>t[r],enumerable:!(i=xe(t,r))||i.enumerable});return e};var Pe=(e,t,n)=>(n=e!=null?Ae(we(e)):{},Le(t||!e||!e.__esModule?ne(n,"default",{value:e,enumerable:!0}):n,e));var E=require("child_process"),ge=Pe(require("readline"));function Y(){return globalThis._VSCODE_NLS_LANGUAGE}var rt=Y()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;var T="en",U=!1,j=!1,G=!1,Ie=!1,ye=!1,ie=!1,Se=!1,_e=!1,Ee=!1,Ne=!1,F,H=T,re=T,ke,P,$=globalThis,A;typeof $.vscode<"u"&&typeof $.vscode.process<"u"?A=$.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(A=process);var oe=typeof A?.versions?.electron=="string",Re=oe&&A?.type==="renderer";if(typeof A=="object"){U=A.platform==="win32",j=A.platform==="darwin",G=A.platform==="linux",Ie=G&&!!A.env.SNAP&&!!A.env.SNAP_REVISION,Se=oe,Ee=!!A.env.CI||!!A.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!A.env.GITHUB_WORKSPACE,F=T,H=T;let e=A.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);F=t.userLocale,re=t.osLocale,H=t.resolvedLanguage||T,ke=t.languagePack?.translationsConfigFile}catch{}ye=!0}else typeof navigator=="object"&&!Re?(P=navigator.userAgent,U=P.indexOf("Windows")>=0,j=P.indexOf("Macintosh")>=0,_e=(P.indexOf("Macintosh")>=0||P.indexOf("iPad")>=0||P.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=P.indexOf("Linux")>=0,Ne=P?.indexOf("Mobi")>=0,ie=!0,H=Y()||T,F=navigator.language.toLowerCase(),re=F):console.error("Unable to resolve platform.");var Z=0;j?Z=1:U?Z=3:G&&(Z=2);var se=U,le=j;var Oe=ie&&typeof $.importScripts=="function",it=Oe?$.origin:void 0;var L=P,_=H,We;(i=>{function e(){return _}i.value=e;function t(){return _.length===2?_==="en":_.length>=3?_[0]==="e"&&_[1]==="n"&&_[2]==="-":!1}i.isDefaultVariant=t;function n(){return _==="en"}i.isDefault=n})(We||={});var Te=typeof $.postMessage=="function"&&!$.importScripts,ot=(()=>{if(Te){let e=[];$.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let i=0,r=e.length;i<r;i++){let s=e[i];if(s.id===n.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return n=>{let i=++t;e.push({id:i,callback:n}),$.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})();var De=!!(L&&L.indexOf("Chrome")>=0),st=!!(L&&L.indexOf("Firefox")>=0),lt=!!(!De&&L&&L.indexOf("Safari")>=0),at=!!(L&&L.indexOf("Edg/")>=0),ct=!!(L&&L.indexOf("Android")>=0);var k,J=globalThis.vscode;if(typeof J<"u"&&typeof J.process<"u"){let e=J.process;k={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?k={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:k={get platform(){return se?"win32":le?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var z=k.cwd,ae=k.env,ce=k.platform,gt=k.arch;var Me=65,Fe=97,Ge=90,He=122,R=46,C=47,x=92,I=58,Ue=63,V=class extends Error{constructor(t,n,i){let r;typeof n=="string"&&n.indexOf("not ")===0?(r="must not be",n=n.replace(/^not /,"")):r="must be";let s=t.indexOf(".")!==-1?"property":"argument",l=`The "${t}" ${s} ${r} of type ${n}`;l+=`. Received type ${typeof i}`,super(l),this.code="ERR_INVALID_ARG_TYPE"}};function je(e,t){if(e===null||typeof e!="object")throw new V(t,"Object",e)}function h(e,t){if(typeof e!="string")throw new V(t,"string",e)}var b=ce==="win32";function d(e){return e===C||e===x}function X(e){return e===C}function y(e){return e>=Me&&e<=Ge||e>=Fe&&e<=He}function B(e,t,n,i){let r="",s=0,l=-1,o=0,a=0;for(let c=0;c<=e.length;++c){if(c<e.length)a=e.charCodeAt(c);else{if(i(a))break;a=C}if(i(a)){if(!(l===c-1||o===1))if(o===2){if(r.length<2||s!==2||r.charCodeAt(r.length-1)!==R||r.charCodeAt(r.length-2)!==R){if(r.length>2){let g=r.lastIndexOf(n);g===-1?(r="",s=0):(r=r.slice(0,g),s=r.length-1-r.lastIndexOf(n)),l=c,o=0;continue}else if(r.length!==0){r="",s=0,l=c,o=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(l+1,c)}`:r=e.slice(l+1,c),s=c-l-1;l=c,o=0}else a===R&&o!==-1?++o:o=-1}return r}function Ve(e){return e?`${e[0]==="."?"":"."}${e}`:""}function fe(e,t){je(t,"pathObject");let n=t.dir||t.root,i=t.base||`${t.name||""}${Ve(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}var m={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],h(s,`paths[${r}]`),s.length===0)continue}else t.length===0?s=z():(s=ae[`=${t}`]||z(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===x)&&(s=`${t}\\`));let l=s.length,o=0,a="",c=!1,g=s.charCodeAt(0);if(l===1)d(g)&&(o=1,c=!0);else if(d(g))if(c=!0,d(s.charCodeAt(1))){let f=2,u=f;for(;f<l&&!d(s.charCodeAt(f));)f++;if(f<l&&f!==u){let W=s.slice(u,f);for(u=f;f<l&&d(s.charCodeAt(f));)f++;if(f<l&&f!==u){for(u=f;f<l&&!d(s.charCodeAt(f));)f++;(f===l||f!==u)&&(a=`\\\\${W}\\${s.slice(u,f)}`,o=f)}}}else o=1;else y(g)&&s.charCodeAt(1)===I&&(a=s.slice(0,2),o=2,l>2&&d(s.charCodeAt(2))&&(c=!0,o=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(i){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,i=c,c&&t.length>0)break}return n=B(n,!i,"\\",d),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){h(e,"path");let t=e.length;if(t===0)return".";let n=0,i,r=!1,s=e.charCodeAt(0);if(t===1)return X(s)?"\\":e;if(d(s))if(r=!0,d(e.charCodeAt(1))){let o=2,a=o;for(;o<t&&!d(e.charCodeAt(o));)o++;if(o<t&&o!==a){let c=e.slice(a,o);for(a=o;o<t&&d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&!d(e.charCodeAt(o));)o++;if(o===t)return`\\\\${c}\\${e.slice(a)}\\`;o!==a&&(i=`\\\\${c}\\${e.slice(a,o)}`,n=o)}}}else n=1;else y(s)&&e.charCodeAt(1)===I&&(i=e.slice(0,2),n=2,t>2&&d(e.charCodeAt(2))&&(r=!0,n=3));let l=n<t?B(e.slice(n),!r,"\\",d):"";if(l.length===0&&!r&&(l="."),l.length>0&&d(e.charCodeAt(t-1))&&(l+="\\"),!r&&i===void 0&&e.includes(":")){if(l.length>=2&&y(l.charCodeAt(0))&&l.charCodeAt(1)===I)return`.\\${l}`;let o=e.indexOf(":");do if(o===t-1||d(e.charCodeAt(o+1)))return`.\\${l}`;while((o=e.indexOf(":",o+1))!==-1)}return i===void 0?r?`\\${l}`:l:r?`${i}\\${l}`:`${i}${l}`},isAbsolute(e){h(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return d(n)||t>2&&y(n)&&e.charCodeAt(1)===I&&d(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s<e.length;++s){let l=e[s];h(l,"path"),l.length>0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let i=!0,r=0;if(typeof n=="string"&&d(n.charCodeAt(0))){++r;let s=n.length;s>1&&d(n.charCodeAt(1))&&(++r,s>2&&(d(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r<t.length&&d(t.charCodeAt(r));)r++;r>=2&&(t=`\\${t.slice(r)}`)}return m.normalize(t)},relative(e,t){if(h(e,"from"),h(t,"to"),e===t)return"";let n=m.resolve(e),i=m.resolve(t);if(n===i||(e=n.toLowerCase(),t=i.toLowerCase(),e===t))return"";if(n.length!==e.length||i.length!==t.length){let S=n.split("\\"),N=i.split("\\");S[S.length-1]===""&&S.pop(),N[N.length-1]===""&&N.pop();let D=S.length,Q=N.length,M=D<Q?D:Q,w;for(w=0;w<M&&S[w].toLowerCase()===N[w].toLowerCase();w++);return w===0?i:w===M?Q>M?N.slice(w).join("\\"):D>M?"..\\".repeat(D-1-w)+"..":"":"..\\".repeat(D-w)+N.slice(w).join("\\")}let r=0;for(;r<e.length&&e.charCodeAt(r)===x;)r++;let s=e.length;for(;s-1>r&&e.charCodeAt(s-1)===x;)s--;let l=s-r,o=0;for(;o<t.length&&t.charCodeAt(o)===x;)o++;let a=t.length;for(;a-1>o&&t.charCodeAt(a-1)===x;)a--;let c=a-o,g=l<c?l:c,f=-1,u=0;for(;u<g;u++){let S=e.charCodeAt(r+u);if(S!==t.charCodeAt(o+u))break;S===x&&(f=u)}if(u!==g){if(f===-1)return i}else{if(c>g){if(t.charCodeAt(o+u)===x)return i.slice(o+u+1);if(u===2)return i.slice(o+u)}l>g&&(e.charCodeAt(r+u)===x?f=u:u===2&&(f=3)),f===-1&&(f=0)}let W="";for(u=r+f+1;u<=s;++u)(u===s||e.charCodeAt(u)===x)&&(W+=W.length===0?"..":"\\..");return o+=f,W.length>0?`${W}${i.slice(o,a)}`:(i.charCodeAt(o)===x&&++o,i.slice(o,a))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=m.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===x){if(t.charCodeAt(1)===x){let n=t.charCodeAt(2);if(n!==Ue&&n!==R)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===I&&t.charCodeAt(2)===x)return`\\\\?\\${t}`;return t},dirname(e){h(e,"path");let t=e.length;if(t===0)return".";let n=-1,i=0,r=e.charCodeAt(0);if(t===1)return d(r)?e:".";if(d(r)){if(n=i=1,d(e.charCodeAt(1))){let o=2,a=o;for(;o<t&&!d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&!d(e.charCodeAt(o));)o++;if(o===t)return e;o!==a&&(n=i=o+1)}}}}else y(r)&&e.charCodeAt(1)===I&&(n=t>2&&d(e.charCodeAt(2))?3:2,i=n);let s=-1,l=!0;for(let o=t-1;o>=i;--o)if(d(e.charCodeAt(o))){if(!l){s=o;break}}else l=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,r=!0,s;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===I&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,o=-1;for(s=e.length-1;s>=n;--s){let a=e.charCodeAt(s);if(d(a)){if(!r){n=s+1;break}}else o===-1&&(r=!1,o=s+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=s):(l=-1,i=o))}return n===i?i=o:i===-1&&(i=e.length),e.slice(n,i)}for(s=e.length-1;s>=n;--s)if(d(e.charCodeAt(s))){if(!r){n=s+1;break}}else i===-1&&(r=!1,i=s+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,l=0;e.length>=2&&e.charCodeAt(1)===I&&y(e.charCodeAt(0))&&(t=i=2);for(let o=e.length-1;o>=t;--o){let a=e.charCodeAt(o);if(d(a)){if(!s){i=o+1;break}continue}r===-1&&(s=!1,r=o+1),a===R?n===-1?n=o:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===i+1?"":e.slice(n,r)},format:fe.bind(null,"\\"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,i=0,r=e.charCodeAt(0);if(n===1)return d(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(d(r)){if(i=1,d(e.charCodeAt(1))){let f=2,u=f;for(;f<n&&!d(e.charCodeAt(f));)f++;if(f<n&&f!==u){for(u=f;f<n&&d(e.charCodeAt(f));)f++;if(f<n&&f!==u){for(u=f;f<n&&!d(e.charCodeAt(f));)f++;f===n?i=f:f!==u&&(i=f+1)}}}}else if(y(r)&&e.charCodeAt(1)===I){if(n<=2)return t.root=t.dir=e,t;if(i=2,d(e.charCodeAt(2))){if(n===3)return t.root=t.dir=e,t;i=3}}i>0&&(t.root=e.slice(0,i));let s=-1,l=i,o=-1,a=!0,c=e.length-1,g=0;for(;c>=i;--c){if(r=e.charCodeAt(c),d(r)){if(!a){l=c+1;break}continue}o===-1&&(a=!1,o=c+1),r===R?s===-1?s=c:g!==1&&(g=1):s!==-1&&(g=-1)}return o!==-1&&(s===-1||g===0||g===1&&s===o-1&&s===l+1?t.base=t.name=e.slice(l,o):(t.name=e.slice(l,s),t.base=e.slice(l,o),t.ext=e.slice(s,o))),l>0&&l!==i?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Be=(()=>{if(b){let e=/\\/g;return()=>{let t=z().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>z()})(),p={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=0&&!n;i--){let r=e[i];h(r,`paths[${i}]`),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===C)}if(!n){let i=Be();t=`${i}/${t}`,n=i.charCodeAt(0)===C}return t=B(t,!n,"/",X),n?`/${t}`:t.length>0?t:"."},normalize(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===C,n=e.charCodeAt(e.length-1)===C;return e=B(e,!t,"/",X),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return h(e,"path"),e.length>0&&e.charCodeAt(0)===C},join(...e){if(e.length===0)return".";let t=[];for(let n=0;n<e.length;++n){let i=e[n];h(i,"path"),i.length>0&&t.push(i)}return t.length===0?".":p.normalize(t.join("/"))},relative(e,t){if(h(e,"from"),h(t,"to"),e===t||(e=p.resolve(e),t=p.resolve(t),e===t))return"";let n=1,i=e.length,r=i-n,s=1,l=t.length-s,o=r<l?r:l,a=-1,c=0;for(;c<o;c++){let f=e.charCodeAt(n+c);if(f!==t.charCodeAt(s+c))break;f===C&&(a=c)}if(c===o)if(l>o){if(t.charCodeAt(s+c)===C)return t.slice(s+c+1);if(c===0)return t.slice(s+c)}else r>o&&(e.charCodeAt(n+c)===C?a=c:c===0&&(a=0));let g="";for(c=n+a+1;c<=i;++c)(c===i||e.charCodeAt(c)===C)&&(g+=g.length===0?"..":"/..");return`${g}${t.slice(s+a)}`},toNamespacedPath(e){return e},dirname(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===C,n=-1,i=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===C){if(!i){n=r;break}}else i=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,r=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){let a=e.charCodeAt(s);if(a===C){if(!r){n=s+1;break}}else o===-1&&(r=!1,o=s+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=s):(l=-1,i=o))}return n===i?i=o:i===-1&&(i=e.length),e.slice(n,i)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===C){if(!r){n=s+1;break}}else i===-1&&(r=!1,i=s+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let l=e.length-1;l>=0;--l){let o=e[l];if(o==="/"){if(!r){n=l+1;break}continue}i===-1&&(r=!1,i=l+1),o==="."?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===n+1?"":e.slice(t,i)},format:fe.bind(null,"/"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===C,i;n?(t.root="/",i=1):i=0;let r=-1,s=0,l=-1,o=!0,a=e.length-1,c=0;for(;a>=i;--a){let g=e.charCodeAt(a);if(g===C){if(!o){s=a+1;break}continue}l===-1&&(o=!1,l=a+1),g===R?r===-1?r=a:c!==1&&(c=1):r!==-1&&(c=-1)}if(l!==-1){let g=s===0&&n?1:s;r===-1||c===0||c===1&&r===l-1&&r===s+1?t.base=t.name=e.slice(g,l):(t.name=e.slice(g,r),t.base=e.slice(g,l),t.ext=e.slice(r,l))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};p.win32=m.win32=m;p.posix=m.posix=p;var ht=b?m.normalize:p.normalize,mt=b?m.isAbsolute:p.isAbsolute,pt=b?m.join:p.join,Ct=b?m.resolve:p.resolve,At=b?m.relative:p.relative,xt=b?m.dirname:p.dirname,bt=b?m.basename:p.basename,wt=b?m.extname:p.extname,vt=b?m.format:p.format,Lt=b?m.parse:p.parse,Pt=b?m.toNamespacedPath:p.toNamespacedPath,$t=b?m.sep:p.sep,ee=b?m.delimiter:p.delimiter;var de="0.0.394",qe="@github/copilot",O={...process.env,PATH:(process.env.PATH||"").replaceAll(`${__dirname}${ee}`,"").replaceAll(`${ee}${__dirname}`,"")},he=ge.createInterface({input:process.stdin,output:process.stdout});function q(e){process.stdout.write(e+`
`)}function v(e){process.stderr.write(e+`
`)}function me(e){return new Promise(t=>{he.question(`${e} ['y/N'] `,n=>{t(n.toLowerCase()[0]==="y")})})}function ue(e){let t=e.replace(/^v/,"").split(".");return[0,1,2].map(n=>parseInt((t[n]||"0").replace(/[^0-9].*$/,""),10)||0)}function Qe(e,t){let n=ue(e),i=ue(t);for(let r=0;r<3;r++){if(n[r]>i[r])return!0;if(n[r]<i[r])return!1}return!0}function Ye(){let e=(0,E.spawnSync)("copilot --version",{env:O,shell:!0,encoding:"utf8"});if(e.error||e.status!==0)return;let t=e.stdout.match(/[0-9]+\.[0-9]+\.[0-9]+/);return t?{version:t[0],installed:!0}:{installed:!0}}function Ze(e,t){let n=(0,E.spawnSync)("npm",e,{stdio:"inherit",env:O});return n.error?(v(`${t} failed: ${n.error.message}`),!1):n.status!==0?(v(`${t} failed with exit code ${n.status}`),!1):!0}function Je(e){let t=(0,E.spawnSync)("brew",["install","copilot-cli"],{stdio:"inherit",env:O});return t.error?(v(`${e} via brew failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via brew failed with exit code ${t.status}`),!1):!0}function Xe(e){let t=(0,E.spawnSync)("bash",["-c","curl -fsSL https://gh.io/copilot-install | bash"],{stdio:"inherit",env:O});return t.error?(v(`${e} via curl failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via curl failed with exit code ${t.status}`),!1):!0}function et(e){let t=(0,E.spawnSync)("bash",["-c","wget -qO- https://gh.io/copilot-install | bash"],{stdio:"inherit",env:O});return t.error?(v(`${e} via wget failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via wget failed with exit code ${t.status}`),!1):!0}function K(e){let t=(0,E.spawnSync)("sh",["-c",`command -v ${e}`],{env:O,encoding:"utf8"});return!t.error&&t.status===0}function pe(e,t=!1){return!!(K("npm")&&Ze([t?"update":"install","-g",qe],e)||K("brew")&&(q(`npm is not available or ${t?"update":"installation"} failed. Trying brew...`),Je(e))||K("curl")&&(q("Trying install script via curl..."),Xe(e))||K("wget")&&(q("Trying install script via wget..."),et(e)))}async function Ce(){let e=Ye();if(!e)if(v("Cannot find GitHub Copilot CLI (https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)"),await me("Install GitHub Copilot CLI?")){if(pe("Installing"))return Ce();await te()}else process.exit(0);return e}async function tt(e){if(!Qe(e,de))if(v(`GitHub Copilot CLI version ${e} is not compatible.`),q(`Version ${de} or later is required.`),await me("Update GitHub Copilot CLI?")){if(pe("Update",!0))return!0;await te()}else process.exit(0)}async function te(e="Press Enter to exit..."){await new Promise(t=>{he.question(`${e}`,()=>{t()})}),process.exit(0)}(async function(){let t=await Ce();t?.version&&await tt(t.version),t||(v("Error: Could not locate Copilot CLI after update."),await te("Try manually reinstalling (https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)"));let n=process.argv.slice(2);n[0]==="--clear"&&(console.clear(),n.shift()),(0,E.spawnSync)("copilot",n,{stdio:"inherit",env:O}),process.exit(0)})();
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'

Xet Storage Details

Size:
17.7 kB
·
Xet hash:
09f4e484f8105a5f1c47d263b9147483b0fb58a5b5e9df8ad4a3c57a34a40f33

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.