티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[91232],{23657:(e,t,s)=>{s.d(t,{Cb:()=>O,FQ:()=>T,Hh:()=>R,JB:()=>L,Ku:()=>l,Pg:()=>N,UG:()=>C,Ym:()=>g,fn:()=>c,iI:()=>u,j0:()=>o,mM:()=>I,q5:()=>P,rl:()=>A,y_:()=>h});var r=s(53419),i=s(25407),_=s(61526),E=s(96540),a=s(25641);let o=”The name of this space is too close to another existing space. Please modify the name and try again.”,l=”https://github.com/mcp/io.github.github/github-mcp-server”,n=”[a-zA-Z0-9-_]+”,S=”[0-9]+”;function O(e){let{id:t,owner:s}=e;return`${a.VR}/${s}/${t}`}function h(){let e=(0,_.zy)().pathname;return(0,E.useMemo)(()=>e===a.VR||e===`${a.VR}/`,[e])}function T(e=!1){let t=(0,_.zy)().pathname;return(0,E.useMemo)(()=>(function(e,t=!1){let s=`${a.VR}/${n}/${S}`,r=RegExp(`^${s}${t?”(/edit)?”:””}$`);return!!e.match(r)})(t,e),[e,t])}function I(){let e=h(),t=T();return e||t}function u(){let e=(0,_.zy)().pathname;return(0,E.useMemo)(()=>{let t=e.match(RegExp(`${a.VR}/(${n})/(${S})`));if(t){let[,e,s]=t;if(e&&s){let t=parseInt(s,10);if(!isNaN(t))return{id:t,owner:e}}}return null},[e])}function g(e,t){return e===t||null!==e&&null!==t&&e.id===t.id&&e.owner===t.owner}function C(e,t){return e.id===t.id&&e.owner===t.owner}function L(e,t){if(t)return e?.find(e=>C(e,t))}function c(e){return e?`${a.VR}/${e.owner}/${e.id}`:a.VR}function A(e,t,s=!1){let r,i=t.indexOf(“/”);if(-1!==i&&0!==i){let s=t.slice(0,i),_=t.slice(i+1);r=e===s?`org:${e} ${_}`:`org:${s} ${_} visibility:public`}else r=`org:${e} ${t}`;return`${r} in:name archived:false ${s?”fork:true”:””}`.trim().replace(/\s+/g,” “)}function R(e){return(e?.sizePercentage??0)>100}function P(e){let t=e.filePath.split(“/”),s=t.pop(),r=[e.nwo,…t].join(“/”),_=e.nwo.split(“/”),E=e.sha;return{filePath:r,fileName:s,fileUrl:e.fileExists&&e.sha?(0,i.IO9)({repo:{ownerLogin:_[0],name:_[1]},commitish:e.sha,action:”blob”,path:e.filePath}):void 0,sha:E}}function N(e,t){let s={…e.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{}),source:t};(0,r.BI)(“copilot-spaces.resources-added”,s)}},33535:(e,t,s)=>{s.d(t,{AI:()=>_,HN:()=>n,R:()=>a,Rs:()=>l,Sk:()=>O,XG:()=>E,tQ:()=>S});var r=s(96540),i=s(49835);function _(e){let[t]=(0,r.useState)(()=>new i.Lj(e));return t}function E(e){let t=(0,r.useRef)(null);null===t.current&&(t.current=new i.Lj(e));let s=(0,r.useCallback)(e=>{null!==t.current&&(t.current.value=e)},[]);return[t,s]}function a(…e){let[t]=(0,r.useState)(()=>new i.Es(…e));return t}let o=Symbol(“no value”);function l(e,t){let s=(0,r.useRef)(e.value),i=(0,r.useRef)(t);(0,r.useEffect)(()=>{i.current=t}),(0,r.useEffect)(()=>(s.current!==o&&s.current!==e.value&&(i.current(e.value),s.current=o),e.subscribe(e=>i.current(e))),[e])}function n(e){let[t,s]=(0,r.useState)(e.value);return l(e,e=>s(e)),t}function S(e){let[t,s]=(0,r.useState)(e.value),[i,_]=(0,r.useState)({});return l(e,e=>{s(e),_({})}),t}function O(e,t){let s=_(t(e.value));return l(e,e=>{s.value=t(e)}),s}},49835:(e,t,s)=>{s.d(t,{Es:()=>ObservableMap,Lj:()=>ObservableValue,yy:()=>ObservableSet});var r=s(35750),i=s(18150),_=s(85242),E=new WeakMap;let a=class ObservableBase{subscribe(e){return(0,r._)(this,E).add(e),()=>{(0,r._)(this,E).delete(e)}}notify(e){for(let t of(0,r._)(this,E))t(e)}constructor(){(0,i._)(this,E,{writable:!0,value:new Set})}};var o=new WeakMap;let ObservableValue=class ObservableValue extends a{get value(){return(0,r._)(this,o)}set value(e){var t,s;t=(0,r._)(this,o),(“object”==typeof(s=e)&&s&&”object”==typeof t&&t?function(e,t){for(let s of new Set(Object.keys(e).concat(Object.keys(t))))if(!Object.is(e[s],t[s]))return!0;return!1}(t,s):!Object.is(t,s))&&((0,_._)(this,o,e),this.notify(e))}setValue(e){this.value=e}constructor(e){super(),(0,i._)(this,o,{writable:!0,value:void 0}),(0,_._)(this,o,e)}};var l=new WeakMap,n=new WeakMap;let ObservableSet=class ObservableSet extends a{get value(){return(0,r._)(this,l)}has(e){if(!(0,r._)(this,n).has(e)){let t=new ObservableValue((0,r._)(this,l).has(e));(0,r._)(this,n).set(e,t)}return(0,r._)(this,n).get(e)}add(e){(0,r._)(this,l).has(e)||((0,r._)(this,l).add(e),(0,r._)(this,n).has(e)&&((0,r._)(this,n).get(e).value=!0),this.notify((0,r._)(this,l)))}delete(e){(0,r._)(this,l).has(e)&&((0,r._)(this,l).delete(e),(0,r._)(this,n).has(e)&&((0,r._)(this,n).get(e).value=!1),this.notify((0,r._)(this,l)))}clear(){if(0!==(0,r._)(this,l).size){for(let e of((0,r._)(this,l).clear(),(0,r._)(this,n).values()))e.value=!1;this.notify((0,r._)(this,l))}}constructor(…e){super(),(0,i._)(this,l,{writable:!0,value:void 0}),(0,i._)(this,n,{writable:!0,value:new Map}),(0,_._)(this,l,new Set(…e))}};var S=new WeakMap,O=new WeakMap,h=new WeakMap;let ObservableMap=class ObservableMap extends a{get value(){return(0,r._)(this,S)}has(e){if(!(0,r._)(this,O).has(e)){let t=new ObservableValue((0,r._)(this,S).has(e));(0,r._)(this,O).set(e,t)}return(0,r._)(this,O).get(e)}get(e){if(!(0,r._)(this,h).has(e)){let t=new ObservableValue((0,r._)(this,S).get(e));(0,r._)(this,h).set(e,t)}return(0,r._)(this,h).get(e)}set(e,t){(0,r._)(this,S).get(e)!==t&&((0,r._)(this,S).set(e,t),(0,r._)(this,O).has(e)&&((0,r._)(this,O).get(e).value=!0),(0,r._)(this,h).has(e)&&((0,r._)(this,h).get(e).value=t),this.notify((0,r._)(this,S)))}delete(e){(0,r._)(this,S).has(e)&&((0,r._)(this,S).delete(e),(0,r._)(this,O).has(e)&&((0,r._)(this,O).get(e).value=!1),(0,r._)(this,h).has(e)&&((0,r._)(this,h).get(e).value=void 0),this.notify((0,r._)(this,S)))}clear(){if(0!==(0,r._)(this,S).size){for(let e of((0,r._)(this,S).clear(),(0,r._)(this,O).values()))e.value=!1;for(let e of(0,r._)(this,h).values())e.value=void 0;this.notify((0,r._)(this,S))}}constructor(…e){super(),(0,i._)(this,S,{writable:!0,value:void 0}),(0,i._)(this,O,{writable:!0,value:new Map}),(0,i._)(this,h,{writable:!0,value:new Map}),(0,_._)(this,S,new Map(…e))}}},65411:(e,t,s)=>{s.d(t,{JR:()=>CopilotAuthTokenProvider,UZ:()=>a,yj:()=>CopilotAuthTokenUnlicensedError});var r=s(50467),i=s(65620),_=s(82075),E=s(96379);let a=”COPILOT_AUTH_TOKEN”;let CopilotAuthTokenProvider=class CopilotAuthTokenProvider{async getAuthToken(){let e=this.getLocalStorageAuthToken();return e?this.validateAuthToken(e):this.fetchAuthToken()}setLocalStorageAuthToken(e){this.copilotLocalStorage.setItem(this.storageKey,JSON.stringify(e.serialize()))}getLocalStorageAuthToken(){let e=this.copilotLocalStorage.getItem(this.storageKey);return e?i.Y.deserialize(JSON.parse(e)):null}removeLocalStorageAuthToken(){this.copilotLocalStorage.removeItem(this.storageKey)}async validateAuthToken(e){return e.needsRefreshing(this.ssoOrgIDs)?this.fetchAuthToken():e}fetchAuthToken(){return this.currentAuthTokenRequest||(this.currentAuthTokenRequest=this._fetchAuthToken()),this.currentAuthTokenRequest}async _fetchAuthToken(){try{let e=await (0,E.lS)(this.tokenEndpoint,{method:”POST”});if(e.ok){let t=await e.json(),s=i.Y.fromResult(t,this.ssoOrgIDs);return this.ssoOrgIDs=s.ssoOrgIDs,this.setLocalStorageAuthToken(s),s}if(404===e.status)throw new CopilotAuthTokenUnlicensedError(“Copilot auth token endpoint not found (404)”);throw Error(“Failed to mint new auth token”)}finally{this.currentAuthTokenRequest=null}}constructor(e,t=”/github-copilot/chat/token”,s=a){(0,r._)(this,”tokenEndpoint”,void 0),(0,r._)(this,”storageKey”,void 0),(0,r._)(this,”ssoOrgIDs”,void 0),(0,r._)(this,”currentAuthTokenRequest”,void 0),(0,r._)(this,”copilotLocalStorage”,void 0),this.ssoOrgIDs=e,this.currentAuthTokenRequest=null,this.copilotLocalStorage=(0,_.A)(“localStorage”,{throwQuotaErrorsOnSet:!1,ttl:864e5}),this.storageKey=s,this.tokenEndpoint=t}};let CopilotAuthTokenUnlicensedError=class CopilotAuthTokenUnlicensedError extends Error{constructor(e){super(e),this.name=”CopilotAuthTokenUnlicensedError”}}},65620:(e,t,s)=>{s.d(t,{Y:()=>AuthToken});var r=s(50467);let AuthToken=class AuthToken{get authorizationHeaderValue(){return`GitHub-Bearer ${this.value}`}needsRefreshing(e){return this.isExpired||this.ssoChanged(e)}get isExpired(){let e=new Date(this.expiration);return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()))e.includes(t))&&e.every(e=>this.ssoOrgIDs.includes(e)))}static fromResult(e,t){return new AuthToken(e.token,e.expiration,e.ssoOrgIDs??t)}serialize(){return{value:this.value,expiration:this.expiration,ssoOrgIDs:this.ssoOrgIDs}}static deserialize(e){return new AuthToken(e.value,e.expiration,e.ssoOrgIDs)}constructor(e,t,s){(0,r._)(this,”value”,void 0),(0,r._)(this,”expiration”,void 0),(0,r._)(this,”ssoOrgIDs”,void 0),this.value=e,this.expiration=t,this.ssoOrgIDs=s}}},79064:(e,t,s)=>{s.d(t,{Jt:()=>O,iI:()=>h});var r=s(50467),i=s(31635),_=s(16522),E=s(45062),a=s(65411),o=s(82075),l=s(96540),n=s(25641),S=s(35247);let CopilotLocalStorage=class CopilotLocalStorage{get selectedThreadID(){return this.localStorage.getItem(this.COPILOT_SELECTED_THREAD_ID_STORAGE_KEY)}set selectedThreadID(e){let t=this.COPILOT_SELECTED_THREAD_ID_STORAGE_KEY;null==e?this.localStorage.removeItem(t):this.localStorage.setItem(t,e)}getModel(e){this.lastCheckedModelVersion!==this.CURRENT_MODEL_STORAGE_VERSION&&null===e&&this.checkAndClearModelSelection();let t=this.mediumStorage.getItem(this.COPILOT_SELECTED_MODEL_STORAGE_KEY(e));return null===t?t:JSON.parse(t)}setModel(e,t){this.mediumStorage.setItem(this.COPILOT_SELECTED_MODEL_STORAGE_KEY(e),JSON.stringify(t)),e&&this.mediumStorage.setItem(this.COPILOT_SELECTED_MODEL_STORAGE_KEY(null),JSON.stringify(t))}checkAndClearModelSelection(){this.lastCheckedModelVersion=this.CURRENT_MODEL_STORAGE_VERSION,S.W.clearModelSelectionForDefaultChange&&this.longStorage.getItem(this.COPILOT_SELECTED_MODEL_VERSION_KEY)!==this.CURRENT_MODEL_STORAGE_VERSION&&(this.mediumStorage.removeItem(this.COPILOT_SELECTED_MODEL_STORAGE_KEY(null)),this.longStorage.setItem(this.COPILOT_SELECTED_MODEL_VERSION_KEY,this.CURRENT_MODEL_STORAGE_VERSION))}get settings(){let e=this.localStorage.getItem(this.COPILOT_SETTINGS_STORAGE_KEY(this.selectedThreadID));return null===e?e:JSON.parse(e)}set settings(e){this.localStorage.setItem(this.COPILOT_SETTINGS_STORAGE_KEY(this.selectedThreadID),JSON.stringify(e))}getPanelHeight(){let e=this.localStorage.getItem(this.COPILOT_PANEL_HEIGHT);return e?parseInt(e):this.DEFAULT_PANEL_HEIGHT}setPanelHeight(e){let t=this.COPILOT_PANEL_HEIGHT;this.localStorage.setItem(t,e.toString())}getPanelWidth(){let e=this.localStorage.getItem(this.COPILOT_PANEL_WIDTH);return e?parseInt(e):this.DEFAULT_PANEL_WIDTH}setPanelWidth(e){let t=this.COPILOT_PANEL_WIDTH;this.localStorage.setItem(t,e.toString())}getRepoCustomInstructionsState(){return”false”!==this.localStorage.getItem(this.COPILOT_REPO_CUSTOM_INSTRUCTIONS_STATE_KEY)}setRepoCustomInstructionsState(e){let t=this.COPILOT_REPO_CUSTOM_INSTRUCTIONS_STATE_KEY;this.localStorage.setItem(t,e.toString())}getCollapsedState(){return”false”!==this.sessionStorage.getItem(this.COPILOT_COLLAPSED_STATE_KEY)}setCollapsedState(e){let t=this.COPILOT_COLLAPSED_STATE_KEY;this.sessionStorage.setItem(t,e.toString())}getSelectedTopic(e){return this.localStorage.getItem(this.COPILOT_SELECTED_TOPIC_STORAGE_KEY(e))}setSelectedTopic(e,t){if(null==t)return void this.localStorage.removeItem(this.COPILOT_SELECTED_TOPIC_STORAGE_KEY(e));let s=this.COPILOT_SELECTED_TOPIC_STORAGE_KEY(e);this.localStorage.setItem(s,t)}getSavedMessage(e){return this.localStorage.getItem(this.COPILOT_SAVED_USER_MESSAGE_KEY(e))}setSavedMessage(e,t){this.setSavedMessageFast(e,t)}setSavedMessageFast(e,t){let s=this.COPILOT_SAVED_USER_MESSAGE_KEY(e);null==t?this.localStorage.removeItem(s):this.localStorage.setItem(s,t)}clearSavedUserMessage(e){this.localStorage.removeItem(this.COPILOT_SAVED_USER_MESSAGE_KEY(e))}getSavedUserMessageOnError(e){return this.localStorage.getItem(this.COPILOT_SAVED_USER_MESSAGE_ON_ERROR_KEY(e))}setSavedUserMessageOnError(e,t){let s=this.COPILOT_SAVED_USER_MESSAGE_ON_ERROR_KEY(e);null==t?this.localStorage.removeItem(s):this.localStorage.setItem(s,t)}clearSavedUserMessageOnError(e){this.localStorage.removeItem(this.COPILOT_SAVED_USER_MESSAGE_ON_ERROR_KEY(e))}getEntrypointMessage(e){return this.getEntrypointMessageImpl(this.COPILOT_ENTRYPOINT_MESSAGE_KEY(e))}getEntrypointMessageImpl(e){let t,s=this.localStorage.getItem(e);if(null==s)return null;try{t=JSON.parse(s)}catch{return null}return t?{message:t.message,references:t.references,model:t.model,mediaContent:t.mediaContent}:null}clearEntrypointMessage(e){this.localStorage.removeItem(this.COPILOT_ENTRYPOINT_MESSAGE_KEY(e))}setEntrypointMessage({message:e,references:t,model:s,mediaContent:r,threadID:i}){this.setEntrypointMessageImpl({message:e,references:t,model:s,mediaContent:r,key:this.COPILOT_ENTRYPOINT_MESSAGE_KEY(i)})}setEntrypointMessageImpl({message:e,references:t,model:s,mediaContent:r,key:i}){null==e?this.localStorage.removeItem(i):this.localStorage.setItem(i,JSON.stringify({message:e,references:t,model:s,mediaContent:r}))}getTaskEntrypointMessage(){return this.getEntrypointMessageImpl(this.COPILOT_TASK_ENTRYPOINT_MESSAGE_KEY)}setTaskEntrypointMessage(e,t){this.setEntrypointMessageImpl({message:e,references:t,key:this.COPILOT_TASK_ENTRYPOINT_MESSAGE_KEY})}getLoopEntrypointMessage(){return this.getEntrypointMessageImpl(this.COPILOT_LOOP_ENTRYPOINT_MESSAGE_KEY)}setLoopEntrypointMessage(e,t){this.setEntrypointMessageImpl({message:e,references:t,key:this.COPILOT_LOOP_ENTRYPOINT_MESSAGE_KEY})}getSparkEntrypointMessage(){return this.getEntrypointMessageImpl(this.COPILOT_SPARK_ENTRYPOINT_MESSAGE_KEY)}setSparkEntrypointMessage(e){this.setEntrypointMessageImpl({message:e,key:this.COPILOT_SPARK_ENTRYPOINT_MESSAGE_KEY})}getLastUsedRepository(){let e=this.localStorage.getItem(this.COPILOT_LAST_USED_REPOSITORY_KEY);if(!e)return null;try{return JSON.parse(e)}catch{return null}}setLastUsedRepository(e){this.localStorage.setItem(this.COPILOT_LAST_USED_REPOSITORY_KEY,JSON.stringify(e))}getCurrentReferences(e){let t=this.COPILOT_CURRENT_REFERENCES_KEY(e),s=this.localStorage.getItem(t);return s?JSON.parse(s):null}setCurrentReferences(e,t){let s=this.COPILOT_CURRENT_REFERENCES_KEY(e),r=t.filter((e,s)=>s===t.findIndex(t=>(0,n.Vb)(e)===(0,n.Vb)(t)));this.localStorage.setItem(s,JSON.stringify(r))}clearCurrentReferences(e){let t=this.COPILOT_CURRENT_REFERENCES_KEY(e);this.localStorage.removeItem(t)}migrateNullThreadToNewThread(e){let t=this.getSavedMessage(null);this.setSavedMessageFast(null,null),t&&this.setSavedMessageFast(e,t);let s=this.getCurrentReferences(null);this.clearCurrentReferences(null),s&&this.setCurrentReferences(e,s);let r=this.settings;r&&this.localStorage.setItem(this.COPILOT_SETTINGS_STORAGE_KEY(e),JSON.stringify(r)),this.selectedThreadID=e,this.localStorage.removeItem(this.COPILOT_SETTINGS_STORAGE_KEY(null))}getImmersiveSidebarCollapsedState(){let e=this.localStorage.getItem(this.COPILOT_IMMERSIVE_SIDEBAR_COLLAPSED_STATE_KEY);return null===e||”true”===e}setImmersiveSidebarCollapsedState(e){this.localStorage.setItem(this.COPILOT_IMMERSIVE_SIDEBAR_COLLAPSED_STATE_KEY,String(e))}getCopilotDiffReferences(){let e=this.localStorage.getItem(this.COPILOT_DIFF_REFERENCES_KEY);return e?JSON.parse(e):null}setCopilotDiffReferences(e){let t=Array.isArray(e)?e:[e];this.localStorage.setItem(this.COPILOT_DIFF_REFERENCES_KEY,JSON.stringify(t))}removeCopilotDiffReferences(){this.localStorage.removeItem(this.COPILOT_DIFF_REFERENCES_KEY)}clearAuthToken(){this.localStorage.removeItem(a.UZ)}getMeterBannerFlag(){let e=this.localStorage.getItem(this.COPILOT_METER_BANNER_FLAG);return null===e?null:”true”===e}setMeterBannerFlag(e){this.localStorage.setItem(this.COPILOT_METER_BANNER_FLAG,String(e))}removeMeterBannerFlag(){this.localStorage.removeItem(this.COPILOT_METER_BANNER_FLAG)}getQuotaExceededBannerFlag(){let e=this.tempStorage.getItem(this.COPILOT_QUOTA_EXCEEDED_BANNER_FLAG);return null===e?null:”true”===e}setQuotaExceededBannerFlag(e){this.tempStorage.setItem(this.COPILOT_QUOTA_EXCEEDED_BANNER_FLAG,String(e))}removeQuotaExceededBannerFlag(){this.tempStorage.removeItem(this.COPILOT_QUOTA_EXCEEDED_BANNER_FLAG)}getSkuSuccessBannerFlag(e){return this.getBooleanFlag(this.skuSuccessBannerKey(e))}setSkuSuccessBannerFlag(e,t){this.tempStorage.setItem(this.skuSuccessBannerKey(e),String(t))}removeSkuSuccessBannerFlag(e){this.tempStorage.removeItem(this.skuSuccessBannerKey(e))}getAnimationFlag(){return this.getBooleanFlag(this.COPILOT_ANIMATION_FLAG)}setAnimationFlag(e){this.tempStorage.setItem(this.COPILOT_ANIMATION_FLAG,String(e))}removeAnimationFlag(){this.tempStorage.removeItem(this.COPILOT_ANIMATION_FLAG)}getTracingRequestedFlag(){return”true”===this.localStorage.getItem(this.COPILOT_TRACING_REQUESTED_FLAG)}setTracingRequestedFlag(e){this.localStorage.setItem(this.COPILOT_TRACING_REQUESTED_FLAG,String(e))}getWrapCodeLines(){return”true”===this.localStorage.getItem(this.COPILOT_WRAP_CODE_LINES_KEY)}setWrapCodeLines(e){this.localStorage.setItem(this.COPILOT_WRAP_CODE_LINES_KEY,String(e))}getBooleanFlag(e,t=this.tempStorage){let s=t.getItem(e);return null===s?null:”true”===s}getSpacesMcpBannerDismissalCount(){let e=this.localStorage.getItem(this.COPILOT_SPACES_MCP_BANNER_DISMISSAL_COUNT);return e?parseInt(e,10):0}setSpacesMcpBannerDismissalCount(e){let t=this.COPILOT_SPACES_MCP_BANNER_DISMISSAL_COUNT;this.localStorage.setItem(t,e.toString())}getSpacesSelectedTab(){return this.localStorage.getItem(this.COPILOT_SPACES_SELECTED_TAB)||”personal”}setSpacesSelectedTab(e){let t=this.COPILOT_SPACES_SELECTED_TAB;this.localStorage.setItem(t,e)}getLastSelectedSpace(){let e=this.localStorage.getItem(this.COPILOT_SPACES_SELECTION_MENU_LAST_SELECTED_SPACE);if(e)try{return JSON.parse(e)}catch{return}}setLastSelectedSpace(e){let t=this.COPILOT_SPACES_SELECTION_MENU_LAST_SELECTED_SPACE;void 0===e?this.localStorage.removeItem(t):this.localStorage.setItem(t,JSON.stringify(e))}getActiveMode(){return this.longStorage.getItem(this.COPILOT_ACTIVE_MODE_KEY)}setActiveMode(e){this.longStorage.setItem(this.COPILOT_ACTIVE_MODE_KEY,e)}getLandedOnAgentsView(){return”true”===this.sessionStorage.getItem(this.COPILOT_LANDED_ON_AGENTS_VIEW_KEY)}setLandedOnAgentsView(e){this.sessionStorage.setItem(this.COPILOT_LANDED_ON_AGENTS_VIEW_KEY,String(e))}skuSuccessBannerKey(e){return`COPILOT_${e.toUpperCase()}_SUCCESS_BANNER_FLAG`}retrieveAndValidateRequestIDs(){let e=this.localStorage.getItem(this.COPILOT_MESSAGE_REQUEST_ID_KEY);try{let t=JSON.parse(e||”[]”);if(!Array.isArray(t)||0===t.length)return[];return t.filter(e=>”string”==typeof e.messageID&&”string”==typeof e.requestID)}catch{return[]}}addRequestID(e,t){let s=this.retrieveAndValidateRequestIDs(),r=s.findIndex(t=>t.messageID===e);-1!==r&&s.splice(r,1),s.push({messageID:e,requestID:t}),s.length>this.MAX_MESSAGE_REQUEST_ID_STORAGE_COUNT&&s.shift(),this.localStorage.setItem(this.COPILOT_MESSAGE_REQUEST_ID_KEY,JSON.stringify(s))}getRequestID(e){let t=this.retrieveAndValidateRequestIDs().find(t=>t.messageID===e);return t?t.requestID:void 0}constructor(){(0,r._)(this,”COPILOT_REPO_CUSTOM_INSTRUCTIONS_STATE_KEY”,”COPILOT_REPO_CUSTOM_INSTRUCTIONS_STATE_KEY”),(0,r._)(this,”COPILOT_SELECTED_THREAD_ID_STORAGE_KEY”,”COPILOT_SELECTED_THREAD_ID_STORAGE_KEY”),(0,r._)(this,”COPILOT_COLLAPSED_STATE_KEY”,”COPILOT_COLLAPSED_STATE_KEY”),(0,r._)(this,”COPILOT_IMMERSIVE_SIDEBAR_COLLAPSED_STATE_KEY”,”COPILOT_IMMERSIVE_SIDEBAR_COLLAPSED_STATE_KEY”),(0,r._)(this,”COPILOT_PANEL_HEIGHT”,”COPILOT_PANEL_HEIGHT”),(0,r._)(this,”DEFAULT_PANEL_HEIGHT”,600),(0,r._)(this,”COPILOT_PANEL_WIDTH”,”COPILOT_PANEL_WIDTH”),(0,r._)(this,”COPILOT_ENTRYPOINT_MESSAGE_KEY”,e=>e?`COPILOT_ENTRYPOINT_MESSAGE_KEY_${e}`:”COPILOT_ENTRYPOINT_MESSAGE_KEY”),(0,r._)(this,”COPILOT_TASK_ENTRYPOINT_MESSAGE_KEY”,”COPILOT_TASK_ENTRYPOINT_MESSAGE_KEY”),(0,r._)(this,”COPILOT_LOOP_ENTRYPOINT_MESSAGE_KEY”,”COPILOT_LOOP_ENTRYPOINT_MESSAGE_KEY”),(0,r._)(this,”COPILOT_SPARK_ENTRYPOINT_MESSAGE_KEY”,”COPILOT_SPARK_ENTRYPOINT_MESSAGE_KEY”),(0,r._)(this,”COPILOT_MESSAGE_REQUEST_ID_KEY”,”COPILOT_MESSAGE_REQUEST_ID_KEY”),(0,r._)(this,”COPILOT_METER_BANNER_FLAG”,”COPILOT_METER_BANNER_FLAG”),(0,r._)(this,”COPILOT_QUOTA_EXCEEDED_BANNER_FLAG”,”COPILOT_QUOTA_EXCEEDED_BANNER_FLAG”),(0,r._)(this,”COPILOT_ANIMATION_FLAG”,”COPILOT_ANIMATION_FLAG”),(0,r._)(this,”COPILOT_WRAP_CODE_LINES_KEY”,”COPILOT_WRAP_CODE_LINES_KEY”),(0,r._)(this,”COPILOT_TRACING_REQUESTED_FLAG”,”COPILOT_TRACING_REQUESTED_FLAG”),(0,r._)(this,”COPILOT_DIFF_REFERENCES_KEY”,”COPILOT_DIFF_REFERENCES_KEY”),(0,r._)(this,”COPILOT_SPACES_MCP_BANNER_DISMISSAL_COUNT”,”COPILOT_SPACES_MCP_BANNER_DISMISSAL_COUNT”),(0,r._)(this,”COPILOT_SPACES_SELECTED_TAB”,”COPILOT_SPACES_SELECTED_TAB”),(0,r._)(this,”COPILOT_SPACES_SELECTION_MENU_LAST_SELECTED_SPACE”,”COPILOT_SPACES_SELECTION_MENU_LAST_SELECTED_SPACE”),(0,r._)(this,”COPILOT_LAST_USED_REPOSITORY_KEY”,”COPILOT_LAST_USED_REPOSITORY_KEY”),(0,r._)(this,”COPILOT_ACTIVE_MODE_KEY”,”COPILOT_ACTIVE_MODE_KEY”),(0,r._)(this,”COPILOT_SELECTED_MODEL_VERSION_KEY”,”COPILOT_SELECTED_MODEL_VERSION”),(0,r._)(this,”COPILOT_LANDED_ON_AGENTS_VIEW_KEY”,”COPILOT_LANDED_ON_AGENTS_VIEW_KEY”),(0,r._)(this,”lastCheckedModelVersion”,null),(0,r._)(this,”MAX_MESSAGE_REQUEST_ID_STORAGE_COUNT”,100),(0,r._)(this,”DEFAULT_PANEL_WIDTH”,480),(0,r._)(this,”CURRENT_MODEL_STORAGE_VERSION”,”4″),(0,r._)(this,”COPILOT_SELECTED_MODEL_STORAGE_KEY”,e=>`COPILOT_SELECTED_MODEL_${e}`),(0,r._)(this,”COPILOT_SETTINGS_STORAGE_KEY”,e=>`COPILOT_SETTINGS_${e}`),(0,r._)(this,”COPILOT_SAVED_USER_MESSAGE_KEY”,e=>`COPILOT_SAVED_USER_MESSAGE_${e}`),(0,r._)(this,”COPILOT_SAVED_USER_MESSAGE_ON_ERROR_KEY”,e=>`COPILOT_SAVED_USER_MESSAGE_ON_ERROR_${e}`),(0,r._)(this,”COPILOT_CURRENT_REFERENCES_KEY”,e=>`COPILOT_CURRENT_REFERENCES_${e}`),(0,r._)(this,”COPILOT_SELECTED_TOPIC_STORAGE_KEY”,e=>`COPILOT_SELECTED_TOPIC_${e}`),(0,r._)(this,”localStorage”,(0,o.A)(“localStorage”,{throwQuotaErrorsOnSet:!1,ttl:864e5})),(0,r._)(this,”mediumStorage”,(0,o.A)(“localStorage”,{throwQuotaErrorsOnSet:!1,ttl:24192e5})),(0,r._)(this,”longStorage”,(0,o.A)(“localStorage”,{throwQuotaErrorsOnSet:!1})),(0,r._)(this,”tempStorage”,(0,o.A)(“localStorage”,{throwQuotaErrorsOnSet:!1,ttl:18e5})),(0,r._)(this,”sessionStorage”,(0,o.A)(“sessionStorage”,{throwQuotaErrorsOnSet:!1,ttl:864e5}))}};(0,i.Cg)([(0,E.s)(100)],CopilotLocalStorage.prototype,”setSavedMessage”,null);let O=new CopilotLocalStorage;function h(e,t){let s,r,i,E=(0,_.c)(7);E[0]!==e?(s=()=>O[e](),E[0]=e,E[1]=s):s=E[1];let[a,o]=(0,l.useState)(s);E[2]!==t?(r=e=>{O[t](e),o(e)},E[2]=t,E[3]=r):r=E[3];let n=r;return E[4]!==a||E[5]!==n?(i=[a,n],E[4]=a,E[5]=n,E[6]=i):i=E[6],i}}}]);
//# sourceMappingURL=91232-5ec0bad53a6e.js.map