makecoder 2.0.82 → 2.0.83

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.
@@ -1,5 +1,5 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
- import{$c as yR,$e as aH,$m as d3,Ab as QU,Am as xR,B as xU,Be as tH,Bf as Mre,Bm as o3,Ce as ER,Cf as uH,Cm as s3,De as nH,Df as dH,Dl as DR,Ec as jU,Ee as CR,Fe as rH,Ff as al,Fg as EH,Ge as iH,Gf as fH,Gg as CH,Gj as OA,Hf as hH,Hh as NH,Hl as zH,Hm as a3,Ih as rc,Im as iv,Jl as qH,Jm as l3,K as BU,Le as v0,M as wU,Mb as _U,Mf as AH,Ne as JD,Nm as c3,Oe as oH,Of as SR,Om as u3,Pb as qD,Rk as nv,S as Jo,Sb as AR,Si as LH,Ub as FU,Vb as mR,Vl as YH,Wb as NU,Wc as zU,Wh as kH,Xb as kU,Xl as vR,Yb as MU,Yk as UA,Zk as GH,Zl as KH,_e as sH,a as Fre,ad as Og,bd as qU,be as WU,cd as YU,ci as MH,dh as SH,dk as LA,ef as lH,fa as kre,fc as YD,fe as VD,ga as RU,gi as OH,gm as VH,ha as Ng,hh as bH,hm as rv,ia as kg,ik as HH,im as WH,je as JU,jg as mH,jh as Ji,jj as bR,kg as pH,kh as ev,km as JH,le as XU,lf as cH,lg as XD,lh as IH,lm as XH,mc as pR,me as $U,mg as gH,mh as tv,nc as OU,ne as ZU,ng as Ore,nh as DH,nk as IR,oc as LU,og as ua,oh as vH,om as $H,pc as UU,pg as $D,ph as xH,pm as ZH,q as SU,qc as HU,qf as Lg,qg as Lre,qh as BH,qm as e3,rc as GU,rd as KU,rg as Ure,rh as x0,rm as t3,s as bU,sc as PU,sd as VU,sh as B0,sm as n3,t as PD,td as D0,th as wH,tl as PH,tm as r3,uh as TH,ui as da,vh as RH,vn as f3,wd as KD,we as eH,wg as yH,wh as QH,wl as jH,wm as Gg,x as IU,xb as zD,xe as WD,xh as Ug,xi as Mf,y as DU,yb as hR,yc as gR,yh as _H,yi as Hg,ym as i3,z as vU,zg as ZD,zh as FH}from"./chunk-5BEOVOB4.js";import{$ as kf,$d as Mg,C as uR,Gd as jD,Id as _t,Od as I0,Pa as EU,Yc as CU,Zd as TU,a as vt,b as Ce,ba as Fi,be as gt,da as dR,ea as mU,ga as fR,ha as LD,ka as pU,la as UD,na as Nre,pa as fr,ra as gU,sa as yU,tc as HD,te as UH,uc as GD}from"./chunk-VEQE4EAQ.js";import{b as ov,c as Of}from"./chunk-LP5C4GJE.js";import{a as $n,c as me,d as _re,e as Se}from"./chunk-YUXORC52.js";var I3=me(Vt=>{"use strict";var TR=Symbol.for("react.transitional.element"),Hre=Symbol.for("react.portal"),Gre=Symbol.for("react.fragment"),Pre=Symbol.for("react.strict_mode"),jre=Symbol.for("react.profiler"),zre=Symbol.for("react.consumer"),qre=Symbol.for("react.context"),Yre=Symbol.for("react.forward_ref"),Kre=Symbol.for("react.suspense"),Vre=Symbol.for("react.memo"),g3=Symbol.for("react.lazy"),Wre=Symbol.for("react.activity"),h3=Symbol.iterator;function Jre(e){return e===null||typeof e!="object"?null:(e=h3&&e[h3]||e["@@iterator"],typeof e=="function"?e:null)}var y3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E3=Object.assign,C3={};function jg(e,t,n){this.props=e,this.context=t,this.refs=C3,this.updater=n||y3}jg.prototype.isReactComponent={};jg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function S3(){}S3.prototype=jg.prototype;function RR(e,t,n){this.props=e,this.context=t,this.refs=C3,this.updater=n||y3}var QR=RR.prototype=new S3;QR.constructor=RR;E3(QR,jg.prototype);QR.isPureReactComponent=!0;var A3=Array.isArray;function wR(){}var wr={H:null,A:null,T:null,S:null},b3=Object.prototype.hasOwnProperty;function _R(e,t,n){var r=n.ref;return{$$typeof:TR,type:e,key:t,ref:r!==void 0?r:null,props:n}}function Xre(e,t){return _R(e.type,t,e.props)}function FR(e){return typeof e=="object"&&e!==null&&e.$$typeof===TR}function $re(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var m3=/\/+/g;function BR(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$re(""+e.key):t.toString(36)}function Zre(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(wR,wR):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pg(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case TR:case Hre:a=!0;break;case g3:return a=e._init,Pg(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+BR(e,0):r,A3(i)?(n="",a!=null&&(n=a.replace(m3,"$&/")+"/"),Pg(i,t,n,"",function(A){return A})):i!=null&&(FR(i)&&(i=Xre(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(m3,"$&/")+"/")+a)),t.push(i)),1;a=0;var c=r===""?".":r+":";if(A3(e))for(var f=0;f<e.length;f++)r=e[f],s=c+BR(r,f),a+=Pg(r,t,n,s,i);else if(f=Jre(e),typeof f=="function")for(e=f.call(e),f=0;!(r=e.next()).done;)r=r.value,s=c+BR(r,f++),a+=Pg(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return Pg(Zre(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function sv(e,t,n){if(e==null)return e;var r=[],i=0;return Pg(e,r,"","",function(s){return t.call(n,s,i++)}),r}function eie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var p3=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tie={map:sv,forEach:function(e,t,n){sv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return sv(e,function(){t++}),t},toArray:function(e){return sv(e,function(t){return t})||[]},only:function(e){if(!FR(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Vt.Activity=Wre;Vt.Children=tie;Vt.Component=jg;Vt.Fragment=Gre;Vt.Profiler=jre;Vt.PureComponent=RR;Vt.StrictMode=Pre;Vt.Suspense=Kre;Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=wr;Vt.__COMPILER_RUNTIME={__proto__:null,c:function(e){return wr.H.useMemoCache(e)}};Vt.cache=function(e){return function(){return e.apply(null,arguments)}};Vt.cacheSignal=function(){return null};Vt.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=E3({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!b3.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];r.children=a}return _R(e.type,i,r)};Vt.createContext=function(e){return e={$$typeof:qre,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:zre,_context:e},e};Vt.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)b3.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),f=0;f<a;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return _R(e,s,i)};Vt.createRef=function(){return{current:null}};Vt.forwardRef=function(e){return{$$typeof:Yre,render:e}};Vt.isValidElement=FR;Vt.lazy=function(e){return{$$typeof:g3,_payload:{_status:-1,_result:e},_init:eie}};Vt.memo=function(e,t){return{$$typeof:Vre,type:e,compare:t===void 0?null:t}};Vt.startTransition=function(e){var t=wr.T,n={};wr.T=n;try{var r=e(),i=wr.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(wR,p3)}catch(s){p3(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),wr.T=t}};Vt.unstable_useCacheRefresh=function(){return wr.H.useCacheRefresh()};Vt.use=function(e){return wr.H.use(e)};Vt.useActionState=function(e,t,n){return wr.H.useActionState(e,t,n)};Vt.useCallback=function(e,t){return wr.H.useCallback(e,t)};Vt.useContext=function(e){return wr.H.useContext(e)};Vt.useDebugValue=function(){};Vt.useDeferredValue=function(e,t){return wr.H.useDeferredValue(e,t)};Vt.useEffect=function(e,t){return wr.H.useEffect(e,t)};Vt.useEffectEvent=function(e){return wr.H.useEffectEvent(e)};Vt.useId=function(){return wr.H.useId()};Vt.useImperativeHandle=function(e,t,n){return wr.H.useImperativeHandle(e,t,n)};Vt.useInsertionEffect=function(e,t){return wr.H.useInsertionEffect(e,t)};Vt.useLayoutEffect=function(e,t){return wr.H.useLayoutEffect(e,t)};Vt.useMemo=function(e,t){return wr.H.useMemo(e,t)};Vt.useOptimistic=function(e,t){return wr.H.useOptimistic(e,t)};Vt.useReducer=function(e,t,n){return wr.H.useReducer(e,t,n)};Vt.useRef=function(e){return wr.H.useRef(e)};Vt.useState=function(e){return wr.H.useState(e)};Vt.useSyncExternalStore=function(e,t,n){return wr.H.useSyncExternalStore(e,t,n)};Vt.useTransition=function(){return wr.H.useTransition()};Vt.version="19.2.4"});var D3=me((jt,av)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){function e(k,z){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",z[0],z[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=Ve&&k[Ve]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,z){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Le=k+"."+z;Qe[Le]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",z,k),Qe[Le]=!0)}function r(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function i(){}function s(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function a(){}function c(k){return""+k}function f(k){try{c(k);var z=!1}catch{z=!0}if(z){z=console;var Le=z.error,We=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Le.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",We),c(k)}}function A(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Gn?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Ze:return"Fragment";case J:return"Profiler";case xe:return"StrictMode";case St:return"Suspense";case j:return"SuspenseList";case Ae:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case ke:return"Portal";case Oe:return k.displayName||"Context";case Re:return(k._context.displayName||"Context")+".Consumer";case nt:var z=k.render;return k=k.displayName,k||(k=z.displayName||z.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case q:return z=k.displayName||null,z!==null?z:A(k.type)||"Memo";case Y:z=k._payload,k=k._init;try{return A(k(z))}catch{}}return null}function m(k){if(k===Ze)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===Y)return"<...>";try{var z=A(k);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function E(){var k=pt.A;return k===null?null:k.getOwner()}function C(){return Error("react-stack-top-frame")}function p(k){if(Si.call(k,"key")){var z=Object.getOwnPropertyDescriptor(k,"key").get;if(z&&z.isReactWarning)return!1}return k.key!==void 0}function g(k,z){function Le(){Jn||(Jn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z))}Le.isReactWarning=!0,Object.defineProperty(k,"key",{get:Le,configurable:!0})}function b(){var k=A(this.type);return to[k]||(to[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function v(k,z,Le,We,ee,le){var be=Le.ref;return k={$$typeof:pe,type:k,key:z,props:Le,_owner:We},(be!==void 0?be:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:b}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function w(k,z){return z=v(k.type,z,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(z._store.validated=k._store.validated),z}function T(k){_(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===Y&&(k._payload.status==="fulfilled"?_(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function _(k){return typeof k=="object"&&k!==null&&k.$$typeof===pe}function M(k){var z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Le){return z[Le]})}function U(k,z){return typeof k=="object"&&k!==null&&k.key!=null?(f(k.key),M(""+k.key)):z.toString(36)}function P(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(z){k.status==="pending"&&(k.status="fulfilled",k.value=z)},function(z){k.status==="pending"&&(k.status="rejected",k.reason=z)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function V(k,z,Le,We,ee){var le=typeof k;(le==="undefined"||le==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(le){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case pe:case ke:be=!0;break;case Y:return be=k._init,V(be(k._payload),z,Le,We,ee)}}if(be){be=k,ee=ee(be);var $e=We===""?"."+U(be,0):We;return Fr(ee)?(Le="",$e!=null&&(Le=$e.replace(Oi,"$&/")+"/"),V(ee,z,Le,"",function(mr){return mr})):ee!=null&&(_(ee)&&(ee.key!=null&&(be&&be.key===ee.key||f(ee.key)),Le=w(ee,Le+(ee.key==null||be&&be.key===ee.key?"":(""+ee.key).replace(Oi,"$&/")+"/")+$e),We!==""&&be!=null&&_(be)&&be.key==null&&be._store&&!be._store.validated&&(Le._store.validated=2),ee=Le),z.push(ee)),1}if(be=0,$e=We===""?".":We+":",Fr(k))for(var Et=0;Et<k.length;Et++)We=k[Et],le=$e+U(We,Et),be+=V(We,z,Le,le,ee);else if(Et=t(k),typeof Et=="function")for(Et===k.entries&&(Nr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Nr=!0),k=Et.call(k),Et=0;!(We=k.next()).done;)We=We.value,le=$e+U(We,Et++),be+=V(We,z,Le,le,ee);else if(le==="object"){if(typeof k.then=="function")return V(P(k),z,Le,We,ee);throw z=String(k),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return be}function te(k,z,Le){if(k==null)return k;var We=[],ee=0;return V(k,We,"","",function(le){return z.call(Le,le,ee++)}),We}function G(k){if(k._status===-1){var z=k._ioInfo;z!=null&&(z.start=z.end=performance.now()),z=k._result;var Le=z();if(Le.then(function(ee){if(k._status===0||k._status===-1){k._status=1,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="fulfilled",Le.value=ee)}},function(ee){if(k._status===0||k._status===-1){k._status=2,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="rejected",Le.reason=ee)}}),z=k._ioInfo,z!=null){z.value=Le;var We=Le.displayName;typeof We=="string"&&(z.name=We)}k._status===-1&&(k._status=0,k._result=Le)}if(k._status===1)return z=k._result,z===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+ import{$c as yR,$e as aH,$m as d3,Ab as QU,Am as xR,B as xU,Be as tH,Bf as Mre,Bm as o3,Ce as ER,Cf as uH,Cm as s3,De as nH,Df as dH,Dl as DR,Ec as jU,Ee as CR,Fe as rH,Ff as al,Fg as EH,Ge as iH,Gf as fH,Gg as CH,Gj as OA,Hf as hH,Hh as NH,Hl as zH,Hm as a3,Ih as rc,Im as iv,Jl as qH,Jm as l3,K as BU,Le as v0,M as wU,Mb as _U,Mf as AH,Ne as JD,Nm as c3,Oe as oH,Of as SR,Om as u3,Pb as qD,Rk as nv,S as Jo,Sb as AR,Si as LH,Ub as FU,Vb as mR,Vl as YH,Wb as NU,Wc as zU,Wh as kH,Xb as kU,Xl as vR,Yb as MU,Yk as UA,Zk as GH,Zl as KH,_e as sH,a as Fre,ad as Og,bd as qU,be as WU,cd as YU,ci as MH,dh as SH,dk as LA,ef as lH,fa as kre,fc as YD,fe as VD,ga as RU,gi as OH,gm as VH,ha as Ng,hh as bH,hm as rv,ia as kg,ik as HH,im as WH,je as JU,jg as mH,jh as Ji,jj as bR,kg as pH,kh as ev,km as JH,le as XU,lf as cH,lg as XD,lh as IH,lm as XH,mc as pR,me as $U,mg as gH,mh as tv,nc as OU,ne as ZU,ng as Ore,nh as DH,nk as IR,oc as LU,og as ua,oh as vH,om as $H,pc as UU,pg as $D,ph as xH,pm as ZH,q as SU,qc as HU,qf as Lg,qg as Lre,qh as BH,qm as e3,rc as GU,rd as KU,rg as Ure,rh as x0,rm as t3,s as bU,sc as PU,sd as VU,sh as B0,sm as n3,t as PD,td as D0,th as wH,tl as PH,tm as r3,uh as TH,ui as da,vh as RH,vn as f3,wd as KD,we as eH,wg as yH,wh as QH,wl as jH,wm as Gg,x as IU,xb as zD,xe as WD,xh as Ug,xi as Mf,y as DU,yb as hR,yc as gR,yh as _H,yi as Hg,ym as i3,z as vU,zg as ZD,zh as FH}from"./chunk-CTQJGFLJ.js";import{$ as kf,$d as Mg,C as uR,Gd as jD,Id as _t,Od as I0,Pa as EU,Yc as CU,Zd as TU,a as vt,b as Ce,ba as Fi,be as gt,da as dR,ea as mU,ga as fR,ha as LD,ka as pU,la as UD,na as Nre,pa as fr,ra as gU,sa as yU,tc as HD,te as UH,uc as GD}from"./chunk-VEQE4EAQ.js";import{b as ov,c as Of}from"./chunk-LP5C4GJE.js";import{a as $n,c as me,d as _re,e as Se}from"./chunk-YUXORC52.js";var I3=me(Vt=>{"use strict";var TR=Symbol.for("react.transitional.element"),Hre=Symbol.for("react.portal"),Gre=Symbol.for("react.fragment"),Pre=Symbol.for("react.strict_mode"),jre=Symbol.for("react.profiler"),zre=Symbol.for("react.consumer"),qre=Symbol.for("react.context"),Yre=Symbol.for("react.forward_ref"),Kre=Symbol.for("react.suspense"),Vre=Symbol.for("react.memo"),g3=Symbol.for("react.lazy"),Wre=Symbol.for("react.activity"),h3=Symbol.iterator;function Jre(e){return e===null||typeof e!="object"?null:(e=h3&&e[h3]||e["@@iterator"],typeof e=="function"?e:null)}var y3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E3=Object.assign,C3={};function jg(e,t,n){this.props=e,this.context=t,this.refs=C3,this.updater=n||y3}jg.prototype.isReactComponent={};jg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function S3(){}S3.prototype=jg.prototype;function RR(e,t,n){this.props=e,this.context=t,this.refs=C3,this.updater=n||y3}var QR=RR.prototype=new S3;QR.constructor=RR;E3(QR,jg.prototype);QR.isPureReactComponent=!0;var A3=Array.isArray;function wR(){}var wr={H:null,A:null,T:null,S:null},b3=Object.prototype.hasOwnProperty;function _R(e,t,n){var r=n.ref;return{$$typeof:TR,type:e,key:t,ref:r!==void 0?r:null,props:n}}function Xre(e,t){return _R(e.type,t,e.props)}function FR(e){return typeof e=="object"&&e!==null&&e.$$typeof===TR}function $re(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var m3=/\/+/g;function BR(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$re(""+e.key):t.toString(36)}function Zre(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(wR,wR):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pg(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case TR:case Hre:a=!0;break;case g3:return a=e._init,Pg(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+BR(e,0):r,A3(i)?(n="",a!=null&&(n=a.replace(m3,"$&/")+"/"),Pg(i,t,n,"",function(A){return A})):i!=null&&(FR(i)&&(i=Xre(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(m3,"$&/")+"/")+a)),t.push(i)),1;a=0;var c=r===""?".":r+":";if(A3(e))for(var f=0;f<e.length;f++)r=e[f],s=c+BR(r,f),a+=Pg(r,t,n,s,i);else if(f=Jre(e),typeof f=="function")for(e=f.call(e),f=0;!(r=e.next()).done;)r=r.value,s=c+BR(r,f++),a+=Pg(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return Pg(Zre(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function sv(e,t,n){if(e==null)return e;var r=[],i=0;return Pg(e,r,"","",function(s){return t.call(n,s,i++)}),r}function eie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var p3=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tie={map:sv,forEach:function(e,t,n){sv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return sv(e,function(){t++}),t},toArray:function(e){return sv(e,function(t){return t})||[]},only:function(e){if(!FR(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Vt.Activity=Wre;Vt.Children=tie;Vt.Component=jg;Vt.Fragment=Gre;Vt.Profiler=jre;Vt.PureComponent=RR;Vt.StrictMode=Pre;Vt.Suspense=Kre;Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=wr;Vt.__COMPILER_RUNTIME={__proto__:null,c:function(e){return wr.H.useMemoCache(e)}};Vt.cache=function(e){return function(){return e.apply(null,arguments)}};Vt.cacheSignal=function(){return null};Vt.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=E3({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!b3.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];r.children=a}return _R(e.type,i,r)};Vt.createContext=function(e){return e={$$typeof:qre,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:zre,_context:e},e};Vt.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)b3.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),f=0;f<a;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return _R(e,s,i)};Vt.createRef=function(){return{current:null}};Vt.forwardRef=function(e){return{$$typeof:Yre,render:e}};Vt.isValidElement=FR;Vt.lazy=function(e){return{$$typeof:g3,_payload:{_status:-1,_result:e},_init:eie}};Vt.memo=function(e,t){return{$$typeof:Vre,type:e,compare:t===void 0?null:t}};Vt.startTransition=function(e){var t=wr.T,n={};wr.T=n;try{var r=e(),i=wr.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(wR,p3)}catch(s){p3(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),wr.T=t}};Vt.unstable_useCacheRefresh=function(){return wr.H.useCacheRefresh()};Vt.use=function(e){return wr.H.use(e)};Vt.useActionState=function(e,t,n){return wr.H.useActionState(e,t,n)};Vt.useCallback=function(e,t){return wr.H.useCallback(e,t)};Vt.useContext=function(e){return wr.H.useContext(e)};Vt.useDebugValue=function(){};Vt.useDeferredValue=function(e,t){return wr.H.useDeferredValue(e,t)};Vt.useEffect=function(e,t){return wr.H.useEffect(e,t)};Vt.useEffectEvent=function(e){return wr.H.useEffectEvent(e)};Vt.useId=function(){return wr.H.useId()};Vt.useImperativeHandle=function(e,t,n){return wr.H.useImperativeHandle(e,t,n)};Vt.useInsertionEffect=function(e,t){return wr.H.useInsertionEffect(e,t)};Vt.useLayoutEffect=function(e,t){return wr.H.useLayoutEffect(e,t)};Vt.useMemo=function(e,t){return wr.H.useMemo(e,t)};Vt.useOptimistic=function(e,t){return wr.H.useOptimistic(e,t)};Vt.useReducer=function(e,t,n){return wr.H.useReducer(e,t,n)};Vt.useRef=function(e){return wr.H.useRef(e)};Vt.useState=function(e){return wr.H.useState(e)};Vt.useSyncExternalStore=function(e,t,n){return wr.H.useSyncExternalStore(e,t,n)};Vt.useTransition=function(){return wr.H.useTransition()};Vt.version="19.2.4"});var D3=me((jt,av)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){function e(k,z){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",z[0],z[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=Ve&&k[Ve]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,z){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Le=k+"."+z;Qe[Le]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",z,k),Qe[Le]=!0)}function r(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function i(){}function s(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function a(){}function c(k){return""+k}function f(k){try{c(k);var z=!1}catch{z=!0}if(z){z=console;var Le=z.error,We=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Le.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",We),c(k)}}function A(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Gn?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Ze:return"Fragment";case J:return"Profiler";case xe:return"StrictMode";case St:return"Suspense";case j:return"SuspenseList";case Ae:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case ke:return"Portal";case Oe:return k.displayName||"Context";case Re:return(k._context.displayName||"Context")+".Consumer";case nt:var z=k.render;return k=k.displayName,k||(k=z.displayName||z.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case q:return z=k.displayName||null,z!==null?z:A(k.type)||"Memo";case Y:z=k._payload,k=k._init;try{return A(k(z))}catch{}}return null}function m(k){if(k===Ze)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===Y)return"<...>";try{var z=A(k);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function E(){var k=pt.A;return k===null?null:k.getOwner()}function C(){return Error("react-stack-top-frame")}function p(k){if(Si.call(k,"key")){var z=Object.getOwnPropertyDescriptor(k,"key").get;if(z&&z.isReactWarning)return!1}return k.key!==void 0}function g(k,z){function Le(){Jn||(Jn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z))}Le.isReactWarning=!0,Object.defineProperty(k,"key",{get:Le,configurable:!0})}function b(){var k=A(this.type);return to[k]||(to[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function v(k,z,Le,We,ee,le){var be=Le.ref;return k={$$typeof:pe,type:k,key:z,props:Le,_owner:We},(be!==void 0?be:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:b}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function w(k,z){return z=v(k.type,z,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(z._store.validated=k._store.validated),z}function T(k){_(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===Y&&(k._payload.status==="fulfilled"?_(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function _(k){return typeof k=="object"&&k!==null&&k.$$typeof===pe}function M(k){var z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Le){return z[Le]})}function U(k,z){return typeof k=="object"&&k!==null&&k.key!=null?(f(k.key),M(""+k.key)):z.toString(36)}function P(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(z){k.status==="pending"&&(k.status="fulfilled",k.value=z)},function(z){k.status==="pending"&&(k.status="rejected",k.reason=z)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function V(k,z,Le,We,ee){var le=typeof k;(le==="undefined"||le==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(le){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case pe:case ke:be=!0;break;case Y:return be=k._init,V(be(k._payload),z,Le,We,ee)}}if(be){be=k,ee=ee(be);var $e=We===""?"."+U(be,0):We;return Fr(ee)?(Le="",$e!=null&&(Le=$e.replace(Oi,"$&/")+"/"),V(ee,z,Le,"",function(mr){return mr})):ee!=null&&(_(ee)&&(ee.key!=null&&(be&&be.key===ee.key||f(ee.key)),Le=w(ee,Le+(ee.key==null||be&&be.key===ee.key?"":(""+ee.key).replace(Oi,"$&/")+"/")+$e),We!==""&&be!=null&&_(be)&&be.key==null&&be._store&&!be._store.validated&&(Le._store.validated=2),ee=Le),z.push(ee)),1}if(be=0,$e=We===""?".":We+":",Fr(k))for(var Et=0;Et<k.length;Et++)We=k[Et],le=$e+U(We,Et),be+=V(We,z,Le,le,ee);else if(Et=t(k),typeof Et=="function")for(Et===k.entries&&(Nr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Nr=!0),k=Et.call(k),Et=0;!(We=k.next()).done;)We=We.value,le=$e+U(We,Et++),be+=V(We,z,Le,le,ee);else if(le==="object"){if(typeof k.then=="function")return V(P(k),z,Le,We,ee);throw z=String(k),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return be}function te(k,z,Le){if(k==null)return k;var We=[],ee=0;return V(k,We,"","",function(le){return z.call(Le,le,ee++)}),We}function G(k){if(k._status===-1){var z=k._ioInfo;z!=null&&(z.start=z.end=performance.now()),z=k._result;var Le=z();if(Le.then(function(ee){if(k._status===0||k._status===-1){k._status=1,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="fulfilled",Le.value=ee)}},function(ee){if(k._status===0||k._status===-1){k._status=2,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="rejected",Le.reason=ee)}}),z=k._ioInfo,z!=null){z.value=Le;var We=Le.displayName;typeof We=="string"&&(z.name=We)}k._status===-1&&(k._status=0,k._result=Le)}if(k._status===1)return z=k._result,z===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
3
 
4
4
  Your code should look like:
5
5
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -671,7 +671,7 @@ Update your environment and try again (no reload needed if using .env)!`:null}re
671
671
  - `)}`);else for(let w of e)try{let T=Mee.resolve(Du(w));C===1&&await g.setValue(T,"TRUST_FOLDER"),p.addDirectory(T),v.push(w)}catch(T){let _=T;b.push(`Error adding '${w}': ${_.message}`)}await i(s,a,v,b),t()};return(0,Ic.jsxs)(ce,{flexDirection:"column",width:"100%",children:[(0,Ic.jsxs)(ce,{flexDirection:"column",borderStyle:"round",borderColor:oe.status.warning,padding:1,marginLeft:1,marginRight:1,children:[(0,Ic.jsxs)(ce,{flexDirection:"column",marginBottom:1,children:[(0,Ic.jsx)(H,{bold:!0,color:oe.text.primary,children:"Do you trust the following folders being added to this workspace?"}),(0,Ic.jsx)(H,{color:oe.text.secondary,children:e.map(C=>`- ${C}`).join(`
672
672
  `)}),(0,Ic.jsx)(H,{color:oe.text.primary,children:"Trusting a folder allows Gemini to read and perform auto-edits when in auto-approval mode. This is a security feature to prevent accidental execution in untrusted directories."})]}),(0,Ic.jsx)(tI,{items:m,onSelect:E,isFocused:!c})]}),c&&(0,Ic.jsx)(ce,{marginLeft:1,marginTop:1,children:(0,Ic.jsx)(H,{color:oe.text.primary,children:"Applying trust settings..."})})]})};var EE=Se(ut(),1);var Pee=Se(Gee(),1);function XBe({type:e="dots"}){let[t,n]=(0,EE.useState)(0),r=Pee.default[e];return(0,EE.useEffect)(()=>{let i=setInterval(()=>{n(s=>s===r.frames.length-1?0:s+1)},r.interval);return()=>{clearInterval(i)}},[r]),EE.default.createElement(H,null,r.frames[t])}var jd=XBe;var jee=Se(ut(),1);var qee=Se(It(),1);var zee=e=>{let n=$f().merged.ui?.showSpinner!==!1;return(0,jee.useEffect)(()=>{if(n)return TS.debugNumAnimatedComponents++,()=>{TS.debugNumAnimatedComponents--}},[n]),n?(0,qee.jsx)(jd,{...e}):null};var Yee=Se(ut(),1);var nI=Se(It(),1);var $Be=150,ZBe=({label:e,matchedIndex:t,userInput:n="",textColor:r=oe.text.primary,isExpanded:i=!1,maxWidth:s=$Be,maxLines:a})=>{if(!(t!==void 0&&t>=0&&t<e.length&&n.length>0)){let C=e;if(!i)if(a!==void 0){let p=e.split(`
673
673
  `),g=p.slice(0,a).join(`
674
- `),b=p.length>a;g.length>s?g=g.slice(0,s)+"...":b&&(g+="..."),C=g}else e.length>s&&(C=e.slice(0,s)+"...");return(0,nI.jsx)(H,{wrap:"wrap",color:r,children:C})}let f=n.length,A="",m="",E="";if(i||e.length<=s)A=e.slice(0,t),m=e.slice(t,t+f),E=e.slice(t+f);else if(f>=s)m=e.slice(t,t+s-1)+"...";else{let C=s-f,p=Math.floor(C/2),g=Math.ceil(C/2),b=t-p,v=t+f+g;b<0&&(v+=-b,b=0),v>e.length&&(b-=v-e.length,v=e.length),b=Math.max(0,b);let w=t-b,T=e.slice(b,v);A=T.slice(0,w),m=T.slice(w,w+f),E=T.slice(w+f),b>0&&(A=A.length>=3?"..."+A.slice(3):"..."),v<e.length&&(E=E.length>=3?E.slice(0,-3)+"...":"...")}return(0,nI.jsxs)(H,{color:r,wrap:"wrap",children:[A,m?m.split(/(\s+)/).map((C,p)=>(0,nI.jsx)(H,{inverse:!0,color:r,children:C},`match-${p}`)):null,E]})},Kee=Yee.default.memo(ZBe);import Gm from"node:process";var Vee={name:"about",description:"Show version info",kind:"built-in",autoExecute:!0,isSafeConcurrent:!0,action:async e=>{let t=Gm.platform,n="no sandbox";Gm.env.SANDBOX&&Gm.env.SANDBOX!=="sandbox-exec"?n=Gm.env.SANDBOX:Gm.env.SANDBOX==="sandbox-exec"&&(n=`sandbox-exec (${Gm.env.SEATBELT_PROFILE||"unknown"})`);let r=e.services.agentContext?.config.getModel()||"Unknown",i=await ZD(),s=e.services.settings.merged.security.auth.selectedType||"",a=Gm.env.GOOGLE_CLOUD_PROJECT||"",c=await ewe(e),A=new kg().getCachedGoogleAccount();Ce.log("AboutCommand: Retrieved cached Google account",{cachedAccount:A});let m=A??void 0,E=e.services.agentContext?.config.getUserTierName(),C={type:"about",cliVersion:i,osVersion:t,sandboxEnv:n,modelVersion:r,selectedAuthType:s,gcpProject:a,ideClient:c,userEmail:m,tier:E};e.ui.addItem(C)}};async function ewe(e){return e.services.agentContext?.config.getIdeMode()?(await al.getInstance())?.getDetectedIdeDisplayName()??"":""}function GT(e,t,n){let r=["Workspace","User"],i=[],s=[];for(let c of r)if(Al(c)){let f=e.forScope(c).path;n.needsEnabling(e,c,t)?i.push({scope:c,path:f}):s.push({scope:c,path:f})}if(i.length===0)return{status:"no-op",featureName:t,action:"enable",modifiedScopes:[],alreadyInStateScopes:s};let a=[];for(let{scope:c,path:f}of i)Al(c)&&(n.enable(e,c,t),a.push({scope:c,path:f}));return{status:"success",featureName:t,action:"enable",modifiedScopes:a,alreadyInStateScopes:s}}function PT(e,t,n,r){if(!Al(n))return{status:"error",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[],error:`Invalid settings scope: ${n}`};let i=e.forScope(n).path;if(r.isExplicitlyDisabled(e,n,t))return{status:"no-op",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[{scope:n,path:i}]};let s=n==="Workspace"?"User":"Workspace",a=[];return Al(s)&&r.isExplicitlyDisabled(e,s,t)&&a.push({scope:s,path:e.forScope(s).path}),r.disable(e,n,t),{status:"success",featureName:t,action:"disable",modifiedScopes:[{scope:n,path:i}],alreadyInStateScopes:a}}var Wee={needsEnabling:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled!==!0,enable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!0)},isExplicitlyDisabled:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled===!1,disable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!1)}};function Jee(e,t){let{featureName:n,...r}=GT(e,t,Wee);return{...r,agentName:n}}function Xee(e,t,n){let{featureName:r,...i}=PT(e,t,n,Wee);return{...i,agentName:r}}function rI(e,t){let{agentName:n,action:r,status:i,error:s}=e;if(i==="error")return s||`An error occurred while attempting to ${r} agent "${n}".`;if(i==="no-op")return`Agent "${n}" is already ${r==="enable"?"enabled":"disabled"}.`;let a=r==="enable",c=a?"enabled":"disabled",f=a?"by setting it to enabled in":"by setting it to disabled in",A=C=>{let p=C.scope==="Workspace"?"project":C.scope.toLowerCase();return t(p,C.path)},m=[...e.modifiedScopes,...e.alreadyInStateScopes];if(m.length===2){let C=A(m[0]),p=A(m[1]);return a?`Agent "${n}" ${c} ${f} ${C} and ${p} settings.`:`Agent "${n}" is now disabled in both ${C} and ${p} settings.`}let E=A(m[0]);return`Agent "${n}" ${c} ${f} ${E} settings.`}var $ee={name:"list",description:"List available local and remote agents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return{type:"message",messageType:"error",content:"Config not loaded."};let n=t.getAgentRegistry();if(!n)return{type:"message",messageType:"error",content:"Agent registry not found."};let r=n.getAllDefinitions().map(s=>({name:s.name,displayName:s.displayName,description:s.description,kind:s.kind})),i={type:"agents_list",agents:r};e.ui.addItem(i)}};async function twe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents enable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides,f=Object.keys(c).filter(m=>c[m]?.enabled===!1);if(a.includes(i)&&!f.includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already enabled.`};if(!f.includes(i)&&!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=Jee(r,i);return A.status==="no-op"?{type:"message",messageType:"info",content:rI(A,(m,E)=>`${m} (${E})`)}:(e.ui.addItem({type:"info",text:`Enabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:rI(A,(m,E)=>`${m} (${E})`)})}async function nwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents disable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides;if(Object.keys(c).filter(E=>c[E]?.enabled===!1).includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already disabled.`};if(!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=e.services.settings.workspace.path?"Workspace":"User",m=Xee(r,i,A);return m.status==="no-op"?{type:"message",messageType:"info",content:rI(m,(E,C)=>`${E} (${C})`)}:(e.ui.addItem({type:"info",text:`Disabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:rI(m,(E,C)=>`${E} (${C})`)})}async function rwe(e,t){let n=e.services.agentContext?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=t.trim();if(!r)return{type:"message",messageType:"error",content:"Usage: /agents config <agent-name>"};let i=n.getAgentRegistry();if(!i)return{type:"message",messageType:"error",content:"Agent registry not found."};let s=i.getDiscoveredDefinition(r);if(!s)return{type:"message",messageType:"error",content:`Agent '${r}' not found.`};let a=s.displayName||r;return{type:"dialog",dialog:"agentConfig",props:{name:r,displayName:a,definition:s}}}function iwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return[];let i=r.merged.agents.overrides;return Object.entries(i).filter(([a,c])=>c?.enabled===!1).map(([a])=>a).filter(a=>a.startsWith(t))}function owe(e,t){let n=e.services.agentContext?.config;if(!n)return[];let r=n.getAgentRegistry();return(r?r.getAllAgentNames():[]).filter(s=>s.startsWith(t))}function swe(e,t){let n=e.services.agentContext?.config;return n?(n.getAgentRegistry()?.getAllDiscoveredAgentNames()??[]).filter(s=>s.startsWith(t)):[]}var awe={name:"enable",description:"Enable a disabled agent",kind:"built-in",autoExecute:!1,action:twe,completion:iwe},lwe={name:"disable",description:"Disable an enabled agent",kind:"built-in",autoExecute:!1,action:nwe,completion:owe},cwe={name:"config",description:"Configure an agent",kind:"built-in",autoExecute:!1,action:rwe,completion:swe},uwe={name:"reload",altNames:["refresh"],description:"Reload the agent registry",kind:"built-in",action:async e=>{let n=e.services.agentContext?.config?.getAgentRegistry();return n?(e.ui.addItem({type:"info",text:"Reloading agent registry..."}),await n.reload(),{type:"message",messageType:"info",content:"Agents reloaded successfully"}):{type:"message",messageType:"error",content:"Agent registry not found."}}},Zee={name:"agents",description:"Manage agents",kind:"built-in",subCommands:[$ee,uwe,awe,lwe,cwe],action:async(e,t)=>$ee.action(e,t)};var ete={name:"signin",altNames:["login"],description:"Sign in or change the authentication method",kind:"built-in",autoExecute:!0,action:(e,t)=>({type:"dialog",dialog:"auth"})},dwe={name:"signout",altNames:["logout"],description:"Sign out and clear all cached credentials",kind:"built-in",action:async(e,t)=>(await jU(),e.services.settings.setValue("User","security.auth.selectedType",void 0),e.services.agentContext?.geminiClient.stripThoughtsFromHistory(),{type:"logout"})},tte={name:"auth",description:"Manage authentication",kind:"built-in",subCommands:[ete,dwe],action:(e,t)=>ete.action(e,t)};import Bh from"node:process";var nte="f8e1854";import*as jT from"node:fs/promises";import rte from"node:path";function fwe(e){return e.map(t=>{let n=t.parts?.map(i=>i.text?i.text:i.functionCall?"**Tool Command**:\n```json\n"+JSON.stringify(i.functionCall,null,2)+"\n```":i.functionResponse?"**Tool Response**:\n```json\n"+JSON.stringify(i.functionResponse,null,2)+"\n```":"").join("")||"",r=t.role==="user"?"\u{1F9D1}\u200D\u{1F4BB}":"\u2728";return`## ${(t.role||"model").toUpperCase()} ${r}
674
+ `),b=p.length>a;g.length>s?g=g.slice(0,s)+"...":b&&(g+="..."),C=g}else e.length>s&&(C=e.slice(0,s)+"...");return(0,nI.jsx)(H,{wrap:"wrap",color:r,children:C})}let f=n.length,A="",m="",E="";if(i||e.length<=s)A=e.slice(0,t),m=e.slice(t,t+f),E=e.slice(t+f);else if(f>=s)m=e.slice(t,t+s-1)+"...";else{let C=s-f,p=Math.floor(C/2),g=Math.ceil(C/2),b=t-p,v=t+f+g;b<0&&(v+=-b,b=0),v>e.length&&(b-=v-e.length,v=e.length),b=Math.max(0,b);let w=t-b,T=e.slice(b,v);A=T.slice(0,w),m=T.slice(w,w+f),E=T.slice(w+f),b>0&&(A=A.length>=3?"..."+A.slice(3):"..."),v<e.length&&(E=E.length>=3?E.slice(0,-3)+"...":"...")}return(0,nI.jsxs)(H,{color:r,wrap:"wrap",children:[A,m?m.split(/(\s+)/).map((C,p)=>(0,nI.jsx)(H,{inverse:!0,color:r,children:C},`match-${p}`)):null,E]})},Kee=Yee.default.memo(ZBe);import Gm from"node:process";var Vee={name:"about",description:"Show version info",kind:"built-in",autoExecute:!0,isSafeConcurrent:!0,action:async e=>{let t=Gm.platform,n="no sandbox";Gm.env.SANDBOX&&Gm.env.SANDBOX!=="sandbox-exec"?n=Gm.env.SANDBOX:Gm.env.SANDBOX==="sandbox-exec"&&(n=`sandbox-exec (${Gm.env.SEATBELT_PROFILE||"unknown"})`);let r=e.services.agentContext?.config.getModel()||"Unknown",i=await ZD(),s=e.services.settings.merged.security.auth.selectedType||"",a=Gm.env.GOOGLE_CLOUD_PROJECT||"",c=await ewe(e),A=new kg().getCachedGoogleAccount();Ce.log("AboutCommand: Retrieved cached Google account",{cachedAccount:A});let m=A??void 0,E=e.services.agentContext?.config.getUserTierName(),C={type:"about",cliVersion:i,osVersion:t,sandboxEnv:n,modelVersion:r,selectedAuthType:s,gcpProject:a,ideClient:c,userEmail:m,tier:E};e.ui.addItem(C)}};async function ewe(e){return e.services.agentContext?.config.getIdeMode()?(await al.getInstance())?.getDetectedIdeDisplayName()??"":""}function GT(e,t,n){let r=["Workspace","User"],i=[],s=[];for(let c of r)if(Al(c)){let f=e.forScope(c).path;n.needsEnabling(e,c,t)?i.push({scope:c,path:f}):s.push({scope:c,path:f})}if(i.length===0)return{status:"no-op",featureName:t,action:"enable",modifiedScopes:[],alreadyInStateScopes:s};let a=[];for(let{scope:c,path:f}of i)Al(c)&&(n.enable(e,c,t),a.push({scope:c,path:f}));return{status:"success",featureName:t,action:"enable",modifiedScopes:a,alreadyInStateScopes:s}}function PT(e,t,n,r){if(!Al(n))return{status:"error",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[],error:`Invalid settings scope: ${n}`};let i=e.forScope(n).path;if(r.isExplicitlyDisabled(e,n,t))return{status:"no-op",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[{scope:n,path:i}]};let s=n==="Workspace"?"User":"Workspace",a=[];return Al(s)&&r.isExplicitlyDisabled(e,s,t)&&a.push({scope:s,path:e.forScope(s).path}),r.disable(e,n,t),{status:"success",featureName:t,action:"disable",modifiedScopes:[{scope:n,path:i}],alreadyInStateScopes:a}}var Wee={needsEnabling:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled!==!0,enable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!0)},isExplicitlyDisabled:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled===!1,disable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!1)}};function Jee(e,t){let{featureName:n,...r}=GT(e,t,Wee);return{...r,agentName:n}}function Xee(e,t,n){let{featureName:r,...i}=PT(e,t,n,Wee);return{...i,agentName:r}}function rI(e,t){let{agentName:n,action:r,status:i,error:s}=e;if(i==="error")return s||`An error occurred while attempting to ${r} agent "${n}".`;if(i==="no-op")return`Agent "${n}" is already ${r==="enable"?"enabled":"disabled"}.`;let a=r==="enable",c=a?"enabled":"disabled",f=a?"by setting it to enabled in":"by setting it to disabled in",A=C=>{let p=C.scope==="Workspace"?"project":C.scope.toLowerCase();return t(p,C.path)},m=[...e.modifiedScopes,...e.alreadyInStateScopes];if(m.length===2){let C=A(m[0]),p=A(m[1]);return a?`Agent "${n}" ${c} ${f} ${C} and ${p} settings.`:`Agent "${n}" is now disabled in both ${C} and ${p} settings.`}let E=A(m[0]);return`Agent "${n}" ${c} ${f} ${E} settings.`}var $ee={name:"list",description:"List available local and remote agents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return{type:"message",messageType:"error",content:"Config not loaded."};let n=t.getAgentRegistry();if(!n)return{type:"message",messageType:"error",content:"Agent registry not found."};let r=n.getAllDefinitions().map(s=>({name:s.name,displayName:s.displayName,description:s.description,kind:s.kind})),i={type:"agents_list",agents:r};e.ui.addItem(i)}};async function twe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents enable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides,f=Object.keys(c).filter(m=>c[m]?.enabled===!1);if(a.includes(i)&&!f.includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already enabled.`};if(!f.includes(i)&&!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=Jee(r,i);return A.status==="no-op"?{type:"message",messageType:"info",content:rI(A,(m,E)=>`${m} (${E})`)}:(e.ui.addItem({type:"info",text:`Enabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:rI(A,(m,E)=>`${m} (${E})`)})}async function nwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents disable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides;if(Object.keys(c).filter(E=>c[E]?.enabled===!1).includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already disabled.`};if(!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=e.services.settings.workspace.path?"Workspace":"User",m=Xee(r,i,A);return m.status==="no-op"?{type:"message",messageType:"info",content:rI(m,(E,C)=>`${E} (${C})`)}:(e.ui.addItem({type:"info",text:`Disabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:rI(m,(E,C)=>`${E} (${C})`)})}async function rwe(e,t){let n=e.services.agentContext?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=t.trim();if(!r)return{type:"message",messageType:"error",content:"Usage: /agents config <agent-name>"};let i=n.getAgentRegistry();if(!i)return{type:"message",messageType:"error",content:"Agent registry not found."};let s=i.getDiscoveredDefinition(r);if(!s)return{type:"message",messageType:"error",content:`Agent '${r}' not found.`};let a=s.displayName||r;return{type:"dialog",dialog:"agentConfig",props:{name:r,displayName:a,definition:s}}}function iwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return[];let i=r.merged.agents.overrides;return Object.entries(i).filter(([a,c])=>c?.enabled===!1).map(([a])=>a).filter(a=>a.startsWith(t))}function owe(e,t){let n=e.services.agentContext?.config;if(!n)return[];let r=n.getAgentRegistry();return(r?r.getAllAgentNames():[]).filter(s=>s.startsWith(t))}function swe(e,t){let n=e.services.agentContext?.config;return n?(n.getAgentRegistry()?.getAllDiscoveredAgentNames()??[]).filter(s=>s.startsWith(t)):[]}var awe={name:"enable",description:"Enable a disabled agent",kind:"built-in",autoExecute:!1,action:twe,completion:iwe},lwe={name:"disable",description:"Disable an enabled agent",kind:"built-in",autoExecute:!1,action:nwe,completion:owe},cwe={name:"config",description:"Configure an agent",kind:"built-in",autoExecute:!1,action:rwe,completion:swe},uwe={name:"reload",altNames:["refresh"],description:"Reload the agent registry",kind:"built-in",action:async e=>{let n=e.services.agentContext?.config?.getAgentRegistry();return n?(e.ui.addItem({type:"info",text:"Reloading agent registry..."}),await n.reload(),{type:"message",messageType:"info",content:"Agents reloaded successfully"}):{type:"message",messageType:"error",content:"Agent registry not found."}}},Zee={name:"agents",description:"Manage agents",kind:"built-in",subCommands:[$ee,uwe,awe,lwe,cwe],action:async(e,t)=>$ee.action(e,t)};var ete={name:"signin",altNames:["login"],description:"Sign in or change the authentication method",kind:"built-in",autoExecute:!0,action:(e,t)=>({type:"dialog",dialog:"auth"})},dwe={name:"signout",altNames:["logout"],description:"Sign out and clear all cached credentials",kind:"built-in",action:async(e,t)=>(await jU(),e.services.settings.setValue("User","security.auth.selectedType",void 0),e.services.agentContext?.geminiClient.stripThoughtsFromHistory(),{type:"logout"})},tte={name:"auth",description:"Manage authentication",kind:"built-in",subCommands:[ete,dwe],action:(e,t)=>ete.action(e,t)};import Bh from"node:process";var nte="0dace6f";import*as jT from"node:fs/promises";import rte from"node:path";function fwe(e){return e.map(t=>{let n=t.parts?.map(i=>i.text?i.text:i.functionCall?"**Tool Command**:\n```json\n"+JSON.stringify(i.functionCall,null,2)+"\n```":i.functionResponse?"**Tool Response**:\n```json\n"+JSON.stringify(i.functionResponse,null,2)+"\n```":"").join("")||"",r=t.role==="user"?"\u{1F9D1}\u200D\u{1F4BB}":"\u2728";return`## ${(t.role||"model").toUpperCase()} ${r}
675
675
 
676
676
  ${n}`}).join(`
677
677
 
@@ -729,7 +729,7 @@ ${e.map(i=>{let s=$T.basename(i.path),a=(t.get(s)||0)>1,c=$T.basename($T.dirname
729
729
  ${m.map(E=>` - ${E}`).join(`
730
730
  `)}
731
731
 
732
- Use /mcp auth <server-name> to authenticate.`}}let a=s[n];if(!a)return{type:"message",messageType:"error",content:`MCP server '${n}' not found.`};let c=f=>{e.ui.addItem({type:"info",text:f})};gt.on("oauth-display-message",c);try{e.ui.addItem({type:"info",text:`Starting OAuth authentication for MCP server '${n}'...`});let{MCPOAuthProvider:f}=await import("./core-56B7CHS2.js"),A=a.oauth;A||(A={enabled:!1});let m=a.httpUrl||a.url;await new f(new IR).authenticate(n,A,m),e.ui.addItem({type:"info",text:`\u2705 Successfully authenticated with MCP server '${n}'!`});let C=i.getMcpClientManager();C&&(e.ui.addItem({type:"info",text:`Restarting MCP server '${n}'...`}),await C.restartServer(n));let p=e.services.agentContext?.geminiClient;return p?.isInitialized()&&await p.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:`Successfully authenticated and reloaded tools for '${n}'`}}catch(f){return{type:"message",messageType:"error",content:`Failed to authenticate with MCP server '${n}': ${_t(f)}`}}finally{gt.removeListener("oauth-display-message",c)}},completion:async(e,t)=>{let r=e.services.agentContext?.config;if(!r)return[];let i=r.getMcpClientManager()?.getMcpServers()||{};return Object.keys(i).filter(s=>s.startsWith(t))}},lI=async(e,t=!1,n=!1,r)=>{let i=e.services.agentContext,s=i?.config;if(!s)return{type:"message",messageType:"error",content:"Config not loaded."};s.setUserInteractedWithMcp();let a=i.toolRegistry;if(!a)return{type:"message",messageType:"error",content:"Could not retrieve tool registry."};let c=s.getMcpClientManager()?.getMcpServers()||{},f=s.getMcpClientManager()?.getBlockedMcpServers()||[];if(r){let G=r.trim().toLowerCase();G&&(c=Object.fromEntries(Object.entries(c).filter(([W])=>W.toLowerCase().includes(G)||js(W).includes(G))))}let A=Object.keys(c),m=A.filter(G=>zH(G)==="connecting"),C=qH()==="in_progress"||m.length>0,g=a.getAllTools().filter(G=>G instanceof CU),v=s.getPromptRegistry().getAllPrompts().filter(G=>"serverName"in G&&A.includes(G.serverName)),T=s.getResourceRegistry().getAllResources().filter(G=>A.includes(G.serverName)),_={},M=new IR;for(let G of A)if(c[G].oauth?.enabled||DR.has(G)){let ye=await M.getCredentials(G);ye?ye.token.expiresAt&&ye.token.expiresAt<Date.now()?_[G]="expired":_[G]="authenticated":_[G]="unauthenticated"}else _[G]="not-configured";let U=vh.getInstance(),P={};for(let G of A)P[G]=await U.getDisplayState(G);let V={};for(let G of A){let W=s.getMcpClientManager()?.getLastError(G);W&&(V[G]=W)}let te={type:"mcp_status",servers:c,tools:g.map(G=>({serverName:G.serverName,name:G.name,description:G.description,schema:G.schema})),prompts:v.map(G=>({serverName:G.serverName,name:G.name,description:G.description})),resources:T.map(G=>({serverName:G.serverName,name:G.name,uri:G.uri,mimeType:G.mimeType,description:G.description})),authStatus:_,enablementState:P,errors:V,blockedServers:f.map(G=>({name:G.name,extensionName:G.extensionName})),discoveryInProgress:C,connectingServers:m,showDescriptions:!!t,showSchema:!!n};e.ui.addItem(te)},hne={name:"list",altNames:["ls","nodesc","nodescription"],description:"List configured MCP servers and tools",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!1,!1,t)},ATe={name:"desc",altNames:["description"],description:"List configured MCP servers and tools with descriptions",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!0,!1,t)},mTe={name:"schema",description:"List configured MCP servers and tools with descriptions and schemas",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!0,!0,t)},pTe={name:"reload",altNames:["refresh"],description:"Reloads MCP servers",kind:"built-in",autoExecute:!0,takesArgs:!1,action:async e=>{let t=e.services.agentContext,n=t?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=n.getMcpClientManager();if(!r)return{type:"message",messageType:"error",content:"Could not retrieve mcp client manager."};e.ui.addItem({type:"info",text:"Reloading MCP servers..."}),await r.restart();let i=t.geminiClient;return i?.isInitialized()&&await i.setTools(),e.ui.reloadCommands(),hne.action(e,"")}};async function Ane(e,t,n){let r=e.services.agentContext,i=r?.config;if(!i)return{type:"message",messageType:"error",content:"Config not loaded."};i.setUserInteractedWithMcp();let s=t.trim().split(/\s+/),a=s.includes("--session"),c=s.filter(b=>b!=="--session")[0],f=n?"enable":"disable";if(!c)return{type:"message",messageType:"error",content:`Server name required. Usage: /mcp ${f} <server-name> [--session]`};let A=js(c),m=i.getMcpClientManager()?.getMcpServers()||{};if(!Object.keys(m).map(js).includes(A))return{type:"message",messageType:"error",content:`Server '${c}' not found. Use /mcp list to see available servers.`};let C=vh.getInstance();if(n){let b=Iy(),v=await Bee(A,{adminMcpEnabled:b.merged.admin?.mcp?.enabled??!0,allowedList:b.merged.mcp?.allowed,excludedList:b.merged.mcp?.excluded});if(!v.allowed&&(v.blockType==="allowlist"||v.blockType==="excludelist"))return{type:"message",messageType:"error",content:v.reason??"Blocked by settings."};a?C.clearSessionDisable(A):await C.enable(A),v.blockType==="admin"&&e.ui.addItem({type:"warning",text:"MCP disabled by admin. Will load when enabled."},Date.now())}else a?C.disableForSession(A):await C.disable(A);let p=`MCP server '${A}' ${n?"enabled":"disabled"}${a?" for this session":""}.`,g=i.getMcpClientManager();return g&&(e.ui.addItem({type:"info",text:"Reloading MCP servers..."},Date.now()),await g.restart()),r.geminiClient?.isInitialized()&&await r.geminiClient.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:p}}async function mne(e,t,n){let i=e.services.agentContext?.config;if(!i)return[];let s=Object.keys(i.getMcpClientManager()?.getMcpServers()||{}),a=vh.getInstance(),c=[];for(let f of s)(await a.getDisplayState(f)).enabled===n&&f.startsWith(t)&&c.push(f);return c}var gTe={name:"enable",description:"Enable a disabled MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Ane(e,t,!0),completion:(e,t)=>mne(e,t,!1)},yTe={name:"disable",description:"Disable an MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Ane(e,t,!1),completion:(e,t)=>mne(e,t,!0)},MO={name:"mcp",description:"Manage configured Model Context Protocol (MCP) servers",kind:"built-in",autoExecute:!1,subCommands:[hne,ATe,mTe,hTe,pTe,gTe,yTe],action:async(e,t)=>{if(t){let n=Ih(`/${t}`,MO.subCommands);return n.commandToExecute?.action?n.commandToExecute.action(e,n.args):lI(e,!1,!1,t)}return lI(e)}};var pne={name:"memory",description:"Commands for interacting with memory",kind:"built-in",autoExecute:!1,subCommands:[{name:"show",description:"Show the current memory contents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=e3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}},{name:"add",description:"Add content to the memory",kind:"built-in",autoExecute:!1,action:(e,t)=>{let n=t3(t);return n.type==="message"||e.ui.addItem({type:"info",text:`Attempting to save to memory: "${t.trim()}"`},Date.now()),n}},{name:"reload",altNames:["refresh"],description:"Reload the memory from the source",kind:"built-in",autoExecute:!0,action:async e=>{e.ui.addItem({type:"info",text:"Reloading memory from source files..."},Date.now());try{let t=e.services.agentContext?.config;if(t){let n=await n3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}catch(t){e.ui.addItem({type:"error",text:`Error reloading memory: ${t.message}`},Date.now())}}},{name:"list",description:"Lists the paths of the GEMINI.md files in use",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=r3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}]};var ETe={name:"set",description:"Set the model to use. Usage: /model set <model-name> [--persist]",kind:"built-in",autoExecute:!1,action:async(e,t)=>{let n=t.trim().split(/\s+/).filter(Boolean);if(n.length===0){e.ui.addItem({type:"error",text:"Usage: /model set <model-name> [--persist]"});return}let r=n[0],i=n.includes("--persist");if(e.services.agentContext?.config){e.services.agentContext.config.setModel(r,!i);let s=new kU(r);tH(e.services.agentContext.config,s),e.ui.addItem({type:"info",text:`Model set to ${r}${i?" (persisted)":""}`})}}},gne={name:"manage",description:"Opens a dialog to configure the model",kind:"built-in",autoExecute:!0,action:async e=>(e.services.agentContext?.config&&await e.services.agentContext.config.refreshUserQuota(),{type:"dialog",dialog:"model"})},yne={name:"model",description:"Manage model configuration",kind:"built-in",autoExecute:!1,subCommands:[gne,ETe],action:async(e,t)=>gne.action(e,t)};var eo=Se(ut(),1);var ot=Se(It(),1);var OO=6,LO=20,e1=25,Km=5,Ene=10,cI=e=>!e||!e.reactionGroups?0:e.reactionGroups.reduce((t,n)=>t+n.users.totalCount,0),STe=(e,t)=>t?.toLowerCase()==="duplicate"?"magenta":e==="OPEN"?"green":"red",Cne=({config:e,onExit:t,initialLimit:n=50})=>{let r=Ei(),[i,s]=(0,eo.useState)({status:"loading",issues:[],currentIndex:0,analysisCache:new Map,analyzingIds:new Set,message:"Fetching issues..."}),[a,c]=(0,eo.useState)("target"),[f,A]=(0,eo.useState)(0),[m,E]=(0,eo.useState)(!1),[C,p]=(0,eo.useState)(0),[g,b]=(0,eo.useState)(0),[v,w]=(0,eo.useState)(""),[T,_]=(0,eo.useState)([]),[M,U]=(0,eo.useState)(!1),[P,V]=(0,eo.useState)(0);(0,eo.useEffect)(()=>{f<P?V(f):f>=P+Km&&V(f-Km+1)},[f,P]);let te=async xe=>{try{let{stdout:J}=await Jo("gh",["issue","view",String(xe),"--json","number,title,body,state,stateReason,labels,url,comments,author,reactionGroups"]);return JSON.parse(J)}catch(J){return Ce.error(`Failed to fetch details for candidate #${xe}`,J),null}},G=(0,eo.useCallback)(async xe=>{let J=xe.comments.find(Qe=>Qe.body.includes("Found possible duplicate issues:"));if(!J)return null;let Re=J.body.split(`
732
+ Use /mcp auth <server-name> to authenticate.`}}let a=s[n];if(!a)return{type:"message",messageType:"error",content:`MCP server '${n}' not found.`};let c=f=>{e.ui.addItem({type:"info",text:f})};gt.on("oauth-display-message",c);try{e.ui.addItem({type:"info",text:`Starting OAuth authentication for MCP server '${n}'...`});let{MCPOAuthProvider:f}=await import("./core-B3NSJHXB.js"),A=a.oauth;A||(A={enabled:!1});let m=a.httpUrl||a.url;await new f(new IR).authenticate(n,A,m),e.ui.addItem({type:"info",text:`\u2705 Successfully authenticated with MCP server '${n}'!`});let C=i.getMcpClientManager();C&&(e.ui.addItem({type:"info",text:`Restarting MCP server '${n}'...`}),await C.restartServer(n));let p=e.services.agentContext?.geminiClient;return p?.isInitialized()&&await p.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:`Successfully authenticated and reloaded tools for '${n}'`}}catch(f){return{type:"message",messageType:"error",content:`Failed to authenticate with MCP server '${n}': ${_t(f)}`}}finally{gt.removeListener("oauth-display-message",c)}},completion:async(e,t)=>{let r=e.services.agentContext?.config;if(!r)return[];let i=r.getMcpClientManager()?.getMcpServers()||{};return Object.keys(i).filter(s=>s.startsWith(t))}},lI=async(e,t=!1,n=!1,r)=>{let i=e.services.agentContext,s=i?.config;if(!s)return{type:"message",messageType:"error",content:"Config not loaded."};s.setUserInteractedWithMcp();let a=i.toolRegistry;if(!a)return{type:"message",messageType:"error",content:"Could not retrieve tool registry."};let c=s.getMcpClientManager()?.getMcpServers()||{},f=s.getMcpClientManager()?.getBlockedMcpServers()||[];if(r){let G=r.trim().toLowerCase();G&&(c=Object.fromEntries(Object.entries(c).filter(([W])=>W.toLowerCase().includes(G)||js(W).includes(G))))}let A=Object.keys(c),m=A.filter(G=>zH(G)==="connecting"),C=qH()==="in_progress"||m.length>0,g=a.getAllTools().filter(G=>G instanceof CU),v=s.getPromptRegistry().getAllPrompts().filter(G=>"serverName"in G&&A.includes(G.serverName)),T=s.getResourceRegistry().getAllResources().filter(G=>A.includes(G.serverName)),_={},M=new IR;for(let G of A)if(c[G].oauth?.enabled||DR.has(G)){let ye=await M.getCredentials(G);ye?ye.token.expiresAt&&ye.token.expiresAt<Date.now()?_[G]="expired":_[G]="authenticated":_[G]="unauthenticated"}else _[G]="not-configured";let U=vh.getInstance(),P={};for(let G of A)P[G]=await U.getDisplayState(G);let V={};for(let G of A){let W=s.getMcpClientManager()?.getLastError(G);W&&(V[G]=W)}let te={type:"mcp_status",servers:c,tools:g.map(G=>({serverName:G.serverName,name:G.name,description:G.description,schema:G.schema})),prompts:v.map(G=>({serverName:G.serverName,name:G.name,description:G.description})),resources:T.map(G=>({serverName:G.serverName,name:G.name,uri:G.uri,mimeType:G.mimeType,description:G.description})),authStatus:_,enablementState:P,errors:V,blockedServers:f.map(G=>({name:G.name,extensionName:G.extensionName})),discoveryInProgress:C,connectingServers:m,showDescriptions:!!t,showSchema:!!n};e.ui.addItem(te)},hne={name:"list",altNames:["ls","nodesc","nodescription"],description:"List configured MCP servers and tools",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!1,!1,t)},ATe={name:"desc",altNames:["description"],description:"List configured MCP servers and tools with descriptions",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!0,!1,t)},mTe={name:"schema",description:"List configured MCP servers and tools with descriptions and schemas",kind:"built-in",autoExecute:!0,action:(e,t)=>lI(e,!0,!0,t)},pTe={name:"reload",altNames:["refresh"],description:"Reloads MCP servers",kind:"built-in",autoExecute:!0,takesArgs:!1,action:async e=>{let t=e.services.agentContext,n=t?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=n.getMcpClientManager();if(!r)return{type:"message",messageType:"error",content:"Could not retrieve mcp client manager."};e.ui.addItem({type:"info",text:"Reloading MCP servers..."}),await r.restart();let i=t.geminiClient;return i?.isInitialized()&&await i.setTools(),e.ui.reloadCommands(),hne.action(e,"")}};async function Ane(e,t,n){let r=e.services.agentContext,i=r?.config;if(!i)return{type:"message",messageType:"error",content:"Config not loaded."};i.setUserInteractedWithMcp();let s=t.trim().split(/\s+/),a=s.includes("--session"),c=s.filter(b=>b!=="--session")[0],f=n?"enable":"disable";if(!c)return{type:"message",messageType:"error",content:`Server name required. Usage: /mcp ${f} <server-name> [--session]`};let A=js(c),m=i.getMcpClientManager()?.getMcpServers()||{};if(!Object.keys(m).map(js).includes(A))return{type:"message",messageType:"error",content:`Server '${c}' not found. Use /mcp list to see available servers.`};let C=vh.getInstance();if(n){let b=Iy(),v=await Bee(A,{adminMcpEnabled:b.merged.admin?.mcp?.enabled??!0,allowedList:b.merged.mcp?.allowed,excludedList:b.merged.mcp?.excluded});if(!v.allowed&&(v.blockType==="allowlist"||v.blockType==="excludelist"))return{type:"message",messageType:"error",content:v.reason??"Blocked by settings."};a?C.clearSessionDisable(A):await C.enable(A),v.blockType==="admin"&&e.ui.addItem({type:"warning",text:"MCP disabled by admin. Will load when enabled."},Date.now())}else a?C.disableForSession(A):await C.disable(A);let p=`MCP server '${A}' ${n?"enabled":"disabled"}${a?" for this session":""}.`,g=i.getMcpClientManager();return g&&(e.ui.addItem({type:"info",text:"Reloading MCP servers..."},Date.now()),await g.restart()),r.geminiClient?.isInitialized()&&await r.geminiClient.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:p}}async function mne(e,t,n){let i=e.services.agentContext?.config;if(!i)return[];let s=Object.keys(i.getMcpClientManager()?.getMcpServers()||{}),a=vh.getInstance(),c=[];for(let f of s)(await a.getDisplayState(f)).enabled===n&&f.startsWith(t)&&c.push(f);return c}var gTe={name:"enable",description:"Enable a disabled MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Ane(e,t,!0),completion:(e,t)=>mne(e,t,!1)},yTe={name:"disable",description:"Disable an MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Ane(e,t,!1),completion:(e,t)=>mne(e,t,!0)},MO={name:"mcp",description:"Manage configured Model Context Protocol (MCP) servers",kind:"built-in",autoExecute:!1,subCommands:[hne,ATe,mTe,hTe,pTe,gTe,yTe],action:async(e,t)=>{if(t){let n=Ih(`/${t}`,MO.subCommands);return n.commandToExecute?.action?n.commandToExecute.action(e,n.args):lI(e,!1,!1,t)}return lI(e)}};var pne={name:"memory",description:"Commands for interacting with memory",kind:"built-in",autoExecute:!1,subCommands:[{name:"show",description:"Show the current memory contents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=e3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}},{name:"add",description:"Add content to the memory",kind:"built-in",autoExecute:!1,action:(e,t)=>{let n=t3(t);return n.type==="message"||e.ui.addItem({type:"info",text:`Attempting to save to memory: "${t.trim()}"`},Date.now()),n}},{name:"reload",altNames:["refresh"],description:"Reload the memory from the source",kind:"built-in",autoExecute:!0,action:async e=>{e.ui.addItem({type:"info",text:"Reloading memory from source files..."},Date.now());try{let t=e.services.agentContext?.config;if(t){let n=await n3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}catch(t){e.ui.addItem({type:"error",text:`Error reloading memory: ${t.message}`},Date.now())}}},{name:"list",description:"Lists the paths of the GEMINI.md files in use",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=r3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}]};var ETe={name:"set",description:"Set the model to use. Usage: /model set <model-name> [--persist]",kind:"built-in",autoExecute:!1,action:async(e,t)=>{let n=t.trim().split(/\s+/).filter(Boolean);if(n.length===0){e.ui.addItem({type:"error",text:"Usage: /model set <model-name> [--persist]"});return}let r=n[0],i=n.includes("--persist");if(e.services.agentContext?.config){e.services.agentContext.config.setModel(r,!i);let s=new kU(r);tH(e.services.agentContext.config,s),e.ui.addItem({type:"info",text:`Model set to ${r}${i?" (persisted)":""}`})}}},gne={name:"manage",description:"Opens a dialog to configure the model",kind:"built-in",autoExecute:!0,action:async e=>(e.services.agentContext?.config&&await e.services.agentContext.config.refreshUserQuota(),{type:"dialog",dialog:"model"})},yne={name:"model",description:"Manage model configuration",kind:"built-in",autoExecute:!1,subCommands:[gne,ETe],action:async(e,t)=>gne.action(e,t)};var eo=Se(ut(),1);var ot=Se(It(),1);var OO=6,LO=20,e1=25,Km=5,Ene=10,cI=e=>!e||!e.reactionGroups?0:e.reactionGroups.reduce((t,n)=>t+n.users.totalCount,0),STe=(e,t)=>t?.toLowerCase()==="duplicate"?"magenta":e==="OPEN"?"green":"red",Cne=({config:e,onExit:t,initialLimit:n=50})=>{let r=Ei(),[i,s]=(0,eo.useState)({status:"loading",issues:[],currentIndex:0,analysisCache:new Map,analyzingIds:new Set,message:"Fetching issues..."}),[a,c]=(0,eo.useState)("target"),[f,A]=(0,eo.useState)(0),[m,E]=(0,eo.useState)(!1),[C,p]=(0,eo.useState)(0),[g,b]=(0,eo.useState)(0),[v,w]=(0,eo.useState)(""),[T,_]=(0,eo.useState)([]),[M,U]=(0,eo.useState)(!1),[P,V]=(0,eo.useState)(0);(0,eo.useEffect)(()=>{f<P?V(f):f>=P+Km&&V(f-Km+1)},[f,P]);let te=async xe=>{try{let{stdout:J}=await Jo("gh",["issue","view",String(xe),"--json","number,title,body,state,stateReason,labels,url,comments,author,reactionGroups"]);return JSON.parse(J)}catch(J){return Ce.error(`Failed to fetch details for candidate #${xe}`,J),null}},G=(0,eo.useCallback)(async xe=>{let J=xe.comments.find(Qe=>Qe.body.includes("Found possible duplicate issues:"));if(!J)return null;let Re=J.body.split(`
733
733
  `),Oe=[];for(let Qe of Re){let bt=Qe.match(/#(\d+)/);if(bt){let Mt=parseInt(bt[1],10);Mt!==xe.number&&Oe.push(Mt)}}if(Oe.length===0)return null;let nt=[];for(let Qe of Oe){let bt=await te(Qe);bt&&nt.push(bt)}let St=e.getBaseLlmClient(),j=`
734
734
  I am triaging a GitHub issue labeled as 'possible-duplicate'. I need to decide if it should be marked as a duplicate of another issue, or if one of the other issues should be marked as a duplicate of this one.
735
735
 
@@ -1,5 +1,5 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
- import{$c as DR,$e as dH,$m as S3,Ab as kU,Al as XH,Am as _R,B as RU,Be as oH,Bf as Yre,Bl as $H,Bm as m3,Ce as vR,Cf as AH,Cm as p3,De as sH,Df as mH,Dl as RR,Ec as KU,Ee as xR,Ef as Zc,Fe as aH,Ff as ll,Fg as IH,Ge as lH,Gf as pH,Gg as DH,Gj as PA,Hf as gH,Hh as LH,Hl as ZH,Hm as g3,Ih as sc,Im as uv,Jl as e3,Jm as y3,K as QU,Le as T0,M as _U,Mb as MU,Mf as yH,Ne as nv,Nm as E3,Ob as JD,Oe as cH,Of as BR,Om as C3,Pb as XD,Rk as lv,S as Xo,Sb as CR,Si as PH,Ub as OU,Vb as SR,Vl as t3,Wb as LU,Wc as VU,Wg as oc,Wh as UH,Xb as UU,Xi as jH,Xl as QR,Yb as HU,Yk as zA,Zk as VH,Zl as n3,_e as uH,a as jre,ad as Gg,bd as WU,be as ZU,cd as JU,ci as HH,dh as vH,dk as jA,ef as fH,fa as qre,fc as $D,fe as ev,fj as zH,fm as r3,ga as NU,gi as GH,gj as qH,gm as i3,ha as Ug,hh as xH,hm as cv,ia as Hg,ik as KH,im as o3,je as eH,jg as EH,jh as Xi,jj as wR,ka as ai,kg as CH,kh as sv,km as s3,le as tH,lf as hH,lg as rv,lh as BH,lm as a3,mc as bR,me as nH,mg as SH,mh as av,nc as GU,ne as rH,ng as Kre,nh as wH,nk as TR,oc as PU,og as da,oh as TH,om as l3,pc as jU,pg as iv,ph as RH,pm as c3,q as vU,qc as zU,qf as Pg,qg as Vre,qh as QH,qm as u3,rc as qU,rd as XU,rg as Wre,rh as R0,rm as d3,s as xU,sc as YU,sd as $U,sh as Q0,sm as f3,t as YD,td as w0,th as _H,tl as WH,tm as h3,uh as FH,ui as fa,vh as NH,vn as b3,wd as ZD,we as iH,wg as bH,wh as kH,wl as JH,wm as qg,x as BU,xb as VD,xe as tv,xh as jg,xi as Gf,y as wU,yb as ER,yc as IR,yh as MH,yi as zg,ym as A3,z as TU,zb as WD,zg as ov,zh as OH}from"./chunk-ZF44RIRK.js";import{$ as Hf,$d as ic,A as pR,C as hd,Gd as KD,Id as _t,Od as B0,Pa as IU,Yc as DU,Zd as FU,a as vt,b as Ce,ba as Ni,be as gt,da as gR,ea as EU,ga as yR,ha as PD,ka as CU,la as jD,na as zre,pa as fr,ra as SU,sa as bU,tc as zD,te as YH,uc as qD}from"./chunk-5OV5S6OY.js";import{b as dv,c as Pf}from"./chunk-LP5C4GJE.js";import{a as $n,c as me,d as Pre,e as Se}from"./chunk-YUXORC52.js";var F3=me(Vt=>{"use strict";var kR=Symbol.for("react.transitional.element"),Jre=Symbol.for("react.portal"),Xre=Symbol.for("react.fragment"),$re=Symbol.for("react.strict_mode"),Zre=Symbol.for("react.profiler"),eie=Symbol.for("react.consumer"),tie=Symbol.for("react.context"),nie=Symbol.for("react.forward_ref"),rie=Symbol.for("react.suspense"),iie=Symbol.for("react.memo"),B3=Symbol.for("react.lazy"),oie=Symbol.for("react.activity"),I3=Symbol.iterator;function sie(e){return e===null||typeof e!="object"?null:(e=I3&&e[I3]||e["@@iterator"],typeof e=="function"?e:null)}var w3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T3=Object.assign,R3={};function Kg(e,t,n){this.props=e,this.context=t,this.refs=R3,this.updater=n||w3}Kg.prototype.isReactComponent={};Kg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Q3(){}Q3.prototype=Kg.prototype;function MR(e,t,n){this.props=e,this.context=t,this.refs=R3,this.updater=n||w3}var OR=MR.prototype=new Q3;OR.constructor=MR;T3(OR,Kg.prototype);OR.isPureReactComponent=!0;var D3=Array.isArray;function NR(){}var wr={H:null,A:null,T:null,S:null},_3=Object.prototype.hasOwnProperty;function LR(e,t,n){var r=n.ref;return{$$typeof:kR,type:e,key:t,ref:r!==void 0?r:null,props:n}}function aie(e,t){return LR(e.type,t,e.props)}function UR(e){return typeof e=="object"&&e!==null&&e.$$typeof===kR}function lie(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var v3=/\/+/g;function FR(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lie(""+e.key):t.toString(36)}function cie(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(NR,NR):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Yg(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case kR:case Jre:a=!0;break;case B3:return a=e._init,Yg(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+FR(e,0):r,D3(i)?(n="",a!=null&&(n=a.replace(v3,"$&/")+"/"),Yg(i,t,n,"",function(A){return A})):i!=null&&(UR(i)&&(i=aie(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(v3,"$&/")+"/")+a)),t.push(i)),1;a=0;var c=r===""?".":r+":";if(D3(e))for(var f=0;f<e.length;f++)r=e[f],s=c+FR(r,f),a+=Yg(r,t,n,s,i);else if(f=sie(e),typeof f=="function")for(e=f.call(e),f=0;!(r=e.next()).done;)r=r.value,s=c+FR(r,f++),a+=Yg(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return Yg(cie(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function fv(e,t,n){if(e==null)return e;var r=[],i=0;return Yg(e,r,"","",function(s){return t.call(n,s,i++)}),r}function uie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var x3=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},die={map:fv,forEach:function(e,t,n){fv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fv(e,function(){t++}),t},toArray:function(e){return fv(e,function(t){return t})||[]},only:function(e){if(!UR(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Vt.Activity=oie;Vt.Children=die;Vt.Component=Kg;Vt.Fragment=Xre;Vt.Profiler=Zre;Vt.PureComponent=MR;Vt.StrictMode=$re;Vt.Suspense=rie;Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=wr;Vt.__COMPILER_RUNTIME={__proto__:null,c:function(e){return wr.H.useMemoCache(e)}};Vt.cache=function(e){return function(){return e.apply(null,arguments)}};Vt.cacheSignal=function(){return null};Vt.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=T3({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!_3.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];r.children=a}return LR(e.type,i,r)};Vt.createContext=function(e){return e={$$typeof:tie,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:eie,_context:e},e};Vt.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)_3.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),f=0;f<a;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return LR(e,s,i)};Vt.createRef=function(){return{current:null}};Vt.forwardRef=function(e){return{$$typeof:nie,render:e}};Vt.isValidElement=UR;Vt.lazy=function(e){return{$$typeof:B3,_payload:{_status:-1,_result:e},_init:uie}};Vt.memo=function(e,t){return{$$typeof:iie,type:e,compare:t===void 0?null:t}};Vt.startTransition=function(e){var t=wr.T,n={};wr.T=n;try{var r=e(),i=wr.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(NR,x3)}catch(s){x3(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),wr.T=t}};Vt.unstable_useCacheRefresh=function(){return wr.H.useCacheRefresh()};Vt.use=function(e){return wr.H.use(e)};Vt.useActionState=function(e,t,n){return wr.H.useActionState(e,t,n)};Vt.useCallback=function(e,t){return wr.H.useCallback(e,t)};Vt.useContext=function(e){return wr.H.useContext(e)};Vt.useDebugValue=function(){};Vt.useDeferredValue=function(e,t){return wr.H.useDeferredValue(e,t)};Vt.useEffect=function(e,t){return wr.H.useEffect(e,t)};Vt.useEffectEvent=function(e){return wr.H.useEffectEvent(e)};Vt.useId=function(){return wr.H.useId()};Vt.useImperativeHandle=function(e,t,n){return wr.H.useImperativeHandle(e,t,n)};Vt.useInsertionEffect=function(e,t){return wr.H.useInsertionEffect(e,t)};Vt.useLayoutEffect=function(e,t){return wr.H.useLayoutEffect(e,t)};Vt.useMemo=function(e,t){return wr.H.useMemo(e,t)};Vt.useOptimistic=function(e,t){return wr.H.useOptimistic(e,t)};Vt.useReducer=function(e,t,n){return wr.H.useReducer(e,t,n)};Vt.useRef=function(e){return wr.H.useRef(e)};Vt.useState=function(e){return wr.H.useState(e)};Vt.useSyncExternalStore=function(e,t,n){return wr.H.useSyncExternalStore(e,t,n)};Vt.useTransition=function(){return wr.H.useTransition()};Vt.version="19.2.4"});var N3=me((jt,hv)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){function e(k,z){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",z[0],z[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=Ve&&k[Ve]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,z){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Le=k+"."+z;Qe[Le]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",z,k),Qe[Le]=!0)}function r(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function i(){}function s(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function a(){}function c(k){return""+k}function f(k){try{c(k);var z=!1}catch{z=!0}if(z){z=console;var Le=z.error,We=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Le.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",We),c(k)}}function A(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Gn?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Ze:return"Fragment";case J:return"Profiler";case xe:return"StrictMode";case St:return"Suspense";case j:return"SuspenseList";case Ae:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case ke:return"Portal";case Oe:return k.displayName||"Context";case Re:return(k._context.displayName||"Context")+".Consumer";case nt:var z=k.render;return k=k.displayName,k||(k=z.displayName||z.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case q:return z=k.displayName||null,z!==null?z:A(k.type)||"Memo";case Y:z=k._payload,k=k._init;try{return A(k(z))}catch{}}return null}function m(k){if(k===Ze)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===Y)return"<...>";try{var z=A(k);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function E(){var k=pt.A;return k===null?null:k.getOwner()}function C(){return Error("react-stack-top-frame")}function p(k){if(bi.call(k,"key")){var z=Object.getOwnPropertyDescriptor(k,"key").get;if(z&&z.isReactWarning)return!1}return k.key!==void 0}function g(k,z){function Le(){Jn||(Jn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z))}Le.isReactWarning=!0,Object.defineProperty(k,"key",{get:Le,configurable:!0})}function b(){var k=A(this.type);return no[k]||(no[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function v(k,z,Le,We,ee,le){var be=Le.ref;return k={$$typeof:pe,type:k,key:z,props:Le,_owner:We},(be!==void 0?be:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:b}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function w(k,z){return z=v(k.type,z,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(z._store.validated=k._store.validated),z}function T(k){_(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===Y&&(k._payload.status==="fulfilled"?_(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function _(k){return typeof k=="object"&&k!==null&&k.$$typeof===pe}function M(k){var z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Le){return z[Le]})}function U(k,z){return typeof k=="object"&&k!==null&&k.key!=null?(f(k.key),M(""+k.key)):z.toString(36)}function P(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(z){k.status==="pending"&&(k.status="fulfilled",k.value=z)},function(z){k.status==="pending"&&(k.status="rejected",k.reason=z)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function V(k,z,Le,We,ee){var le=typeof k;(le==="undefined"||le==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(le){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case pe:case ke:be=!0;break;case Y:return be=k._init,V(be(k._payload),z,Le,We,ee)}}if(be){be=k,ee=ee(be);var $e=We===""?"."+U(be,0):We;return Fr(ee)?(Le="",$e!=null&&(Le=$e.replace(Li,"$&/")+"/"),V(ee,z,Le,"",function(mr){return mr})):ee!=null&&(_(ee)&&(ee.key!=null&&(be&&be.key===ee.key||f(ee.key)),Le=w(ee,Le+(ee.key==null||be&&be.key===ee.key?"":(""+ee.key).replace(Li,"$&/")+"/")+$e),We!==""&&be!=null&&_(be)&&be.key==null&&be._store&&!be._store.validated&&(Le._store.validated=2),ee=Le),z.push(ee)),1}if(be=0,$e=We===""?".":We+":",Fr(k))for(var Et=0;Et<k.length;Et++)We=k[Et],le=$e+U(We,Et),be+=V(We,z,Le,le,ee);else if(Et=t(k),typeof Et=="function")for(Et===k.entries&&(Nr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Nr=!0),k=Et.call(k),Et=0;!(We=k.next()).done;)We=We.value,le=$e+U(We,Et++),be+=V(We,z,Le,le,ee);else if(le==="object"){if(typeof k.then=="function")return V(P(k),z,Le,We,ee);throw z=String(k),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return be}function te(k,z,Le){if(k==null)return k;var We=[],ee=0;return V(k,We,"","",function(le){return z.call(Le,le,ee++)}),We}function G(k){if(k._status===-1){var z=k._ioInfo;z!=null&&(z.start=z.end=performance.now()),z=k._result;var Le=z();if(Le.then(function(ee){if(k._status===0||k._status===-1){k._status=1,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="fulfilled",Le.value=ee)}},function(ee){if(k._status===0||k._status===-1){k._status=2,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="rejected",Le.reason=ee)}}),z=k._ioInfo,z!=null){z.value=Le;var We=Le.displayName;typeof We=="string"&&(z.name=We)}k._status===-1&&(k._status=0,k._result=Le)}if(k._status===1)return z=k._result,z===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+ import{$c as DR,$e as dH,$m as S3,Ab as kU,Al as XH,Am as _R,B as RU,Be as oH,Bf as Yre,Bl as $H,Bm as m3,Ce as vR,Cf as AH,Cm as p3,De as sH,Df as mH,Dl as RR,Ec as KU,Ee as xR,Ef as Zc,Fe as aH,Ff as ll,Fg as IH,Ge as lH,Gf as pH,Gg as DH,Gj as PA,Hf as gH,Hh as LH,Hl as ZH,Hm as g3,Ih as sc,Im as uv,Jl as e3,Jm as y3,K as QU,Le as T0,M as _U,Mb as MU,Mf as yH,Ne as nv,Nm as E3,Ob as JD,Oe as cH,Of as BR,Om as C3,Pb as XD,Rk as lv,S as Xo,Sb as CR,Si as PH,Ub as OU,Vb as SR,Vl as t3,Wb as LU,Wc as VU,Wg as oc,Wh as UH,Xb as UU,Xi as jH,Xl as QR,Yb as HU,Yk as zA,Zk as VH,Zl as n3,_e as uH,a as jre,ad as Gg,bd as WU,be as ZU,cd as JU,ci as HH,dh as vH,dk as jA,ef as fH,fa as qre,fc as $D,fe as ev,fj as zH,fm as r3,ga as NU,gi as GH,gj as qH,gm as i3,ha as Ug,hh as xH,hm as cv,ia as Hg,ik as KH,im as o3,je as eH,jg as EH,jh as Xi,jj as wR,ka as ai,kg as CH,kh as sv,km as s3,le as tH,lf as hH,lg as rv,lh as BH,lm as a3,mc as bR,me as nH,mg as SH,mh as av,nc as GU,ne as rH,ng as Kre,nh as wH,nk as TR,oc as PU,og as da,oh as TH,om as l3,pc as jU,pg as iv,ph as RH,pm as c3,q as vU,qc as zU,qf as Pg,qg as Vre,qh as QH,qm as u3,rc as qU,rd as XU,rg as Wre,rh as R0,rm as d3,s as xU,sc as YU,sd as $U,sh as Q0,sm as f3,t as YD,td as w0,th as _H,tl as WH,tm as h3,uh as FH,ui as fa,vh as NH,vn as b3,wd as ZD,we as iH,wg as bH,wh as kH,wl as JH,wm as qg,x as BU,xb as VD,xe as tv,xh as jg,xi as Gf,y as wU,yb as ER,yc as IR,yh as MH,yi as zg,ym as A3,z as TU,zb as WD,zg as ov,zh as OH}from"./chunk-EBB2IYKE.js";import{$ as Hf,$d as ic,A as pR,C as hd,Gd as KD,Id as _t,Od as B0,Pa as IU,Yc as DU,Zd as FU,a as vt,b as Ce,ba as Ni,be as gt,da as gR,ea as EU,ga as yR,ha as PD,ka as CU,la as jD,na as zre,pa as fr,ra as SU,sa as bU,tc as zD,te as YH,uc as qD}from"./chunk-5OV5S6OY.js";import{b as dv,c as Pf}from"./chunk-LP5C4GJE.js";import{a as $n,c as me,d as Pre,e as Se}from"./chunk-YUXORC52.js";var F3=me(Vt=>{"use strict";var kR=Symbol.for("react.transitional.element"),Jre=Symbol.for("react.portal"),Xre=Symbol.for("react.fragment"),$re=Symbol.for("react.strict_mode"),Zre=Symbol.for("react.profiler"),eie=Symbol.for("react.consumer"),tie=Symbol.for("react.context"),nie=Symbol.for("react.forward_ref"),rie=Symbol.for("react.suspense"),iie=Symbol.for("react.memo"),B3=Symbol.for("react.lazy"),oie=Symbol.for("react.activity"),I3=Symbol.iterator;function sie(e){return e===null||typeof e!="object"?null:(e=I3&&e[I3]||e["@@iterator"],typeof e=="function"?e:null)}var w3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T3=Object.assign,R3={};function Kg(e,t,n){this.props=e,this.context=t,this.refs=R3,this.updater=n||w3}Kg.prototype.isReactComponent={};Kg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Q3(){}Q3.prototype=Kg.prototype;function MR(e,t,n){this.props=e,this.context=t,this.refs=R3,this.updater=n||w3}var OR=MR.prototype=new Q3;OR.constructor=MR;T3(OR,Kg.prototype);OR.isPureReactComponent=!0;var D3=Array.isArray;function NR(){}var wr={H:null,A:null,T:null,S:null},_3=Object.prototype.hasOwnProperty;function LR(e,t,n){var r=n.ref;return{$$typeof:kR,type:e,key:t,ref:r!==void 0?r:null,props:n}}function aie(e,t){return LR(e.type,t,e.props)}function UR(e){return typeof e=="object"&&e!==null&&e.$$typeof===kR}function lie(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var v3=/\/+/g;function FR(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lie(""+e.key):t.toString(36)}function cie(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(NR,NR):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Yg(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case kR:case Jre:a=!0;break;case B3:return a=e._init,Yg(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+FR(e,0):r,D3(i)?(n="",a!=null&&(n=a.replace(v3,"$&/")+"/"),Yg(i,t,n,"",function(A){return A})):i!=null&&(UR(i)&&(i=aie(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(v3,"$&/")+"/")+a)),t.push(i)),1;a=0;var c=r===""?".":r+":";if(D3(e))for(var f=0;f<e.length;f++)r=e[f],s=c+FR(r,f),a+=Yg(r,t,n,s,i);else if(f=sie(e),typeof f=="function")for(e=f.call(e),f=0;!(r=e.next()).done;)r=r.value,s=c+FR(r,f++),a+=Yg(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return Yg(cie(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function fv(e,t,n){if(e==null)return e;var r=[],i=0;return Yg(e,r,"","",function(s){return t.call(n,s,i++)}),r}function uie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var x3=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},die={map:fv,forEach:function(e,t,n){fv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fv(e,function(){t++}),t},toArray:function(e){return fv(e,function(t){return t})||[]},only:function(e){if(!UR(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Vt.Activity=oie;Vt.Children=die;Vt.Component=Kg;Vt.Fragment=Xre;Vt.Profiler=Zre;Vt.PureComponent=MR;Vt.StrictMode=$re;Vt.Suspense=rie;Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=wr;Vt.__COMPILER_RUNTIME={__proto__:null,c:function(e){return wr.H.useMemoCache(e)}};Vt.cache=function(e){return function(){return e.apply(null,arguments)}};Vt.cacheSignal=function(){return null};Vt.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=T3({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!_3.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];r.children=a}return LR(e.type,i,r)};Vt.createContext=function(e){return e={$$typeof:tie,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:eie,_context:e},e};Vt.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)_3.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),f=0;f<a;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return LR(e,s,i)};Vt.createRef=function(){return{current:null}};Vt.forwardRef=function(e){return{$$typeof:nie,render:e}};Vt.isValidElement=UR;Vt.lazy=function(e){return{$$typeof:B3,_payload:{_status:-1,_result:e},_init:uie}};Vt.memo=function(e,t){return{$$typeof:iie,type:e,compare:t===void 0?null:t}};Vt.startTransition=function(e){var t=wr.T,n={};wr.T=n;try{var r=e(),i=wr.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(NR,x3)}catch(s){x3(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),wr.T=t}};Vt.unstable_useCacheRefresh=function(){return wr.H.useCacheRefresh()};Vt.use=function(e){return wr.H.use(e)};Vt.useActionState=function(e,t,n){return wr.H.useActionState(e,t,n)};Vt.useCallback=function(e,t){return wr.H.useCallback(e,t)};Vt.useContext=function(e){return wr.H.useContext(e)};Vt.useDebugValue=function(){};Vt.useDeferredValue=function(e,t){return wr.H.useDeferredValue(e,t)};Vt.useEffect=function(e,t){return wr.H.useEffect(e,t)};Vt.useEffectEvent=function(e){return wr.H.useEffectEvent(e)};Vt.useId=function(){return wr.H.useId()};Vt.useImperativeHandle=function(e,t,n){return wr.H.useImperativeHandle(e,t,n)};Vt.useInsertionEffect=function(e,t){return wr.H.useInsertionEffect(e,t)};Vt.useLayoutEffect=function(e,t){return wr.H.useLayoutEffect(e,t)};Vt.useMemo=function(e,t){return wr.H.useMemo(e,t)};Vt.useOptimistic=function(e,t){return wr.H.useOptimistic(e,t)};Vt.useReducer=function(e,t,n){return wr.H.useReducer(e,t,n)};Vt.useRef=function(e){return wr.H.useRef(e)};Vt.useState=function(e){return wr.H.useState(e)};Vt.useSyncExternalStore=function(e,t,n){return wr.H.useSyncExternalStore(e,t,n)};Vt.useTransition=function(){return wr.H.useTransition()};Vt.version="19.2.4"});var N3=me((jt,hv)=>{"use strict";process.env.NODE_ENV!=="production"&&function(){function e(k,z){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",z[0],z[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=Ve&&k[Ve]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,z){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Le=k+"."+z;Qe[Le]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",z,k),Qe[Le]=!0)}function r(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function i(){}function s(k,z,Le){this.props=k,this.context=z,this.refs=yt,this.updater=Le||bt}function a(){}function c(k){return""+k}function f(k){try{c(k);var z=!1}catch{z=!0}if(z){z=console;var Le=z.error,We=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Le.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",We),c(k)}}function A(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Gn?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Ze:return"Fragment";case J:return"Profiler";case xe:return"StrictMode";case St:return"Suspense";case j:return"SuspenseList";case Ae:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case ke:return"Portal";case Oe:return k.displayName||"Context";case Re:return(k._context.displayName||"Context")+".Consumer";case nt:var z=k.render;return k=k.displayName,k||(k=z.displayName||z.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case q:return z=k.displayName||null,z!==null?z:A(k.type)||"Memo";case Y:z=k._payload,k=k._init;try{return A(k(z))}catch{}}return null}function m(k){if(k===Ze)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===Y)return"<...>";try{var z=A(k);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function E(){var k=pt.A;return k===null?null:k.getOwner()}function C(){return Error("react-stack-top-frame")}function p(k){if(bi.call(k,"key")){var z=Object.getOwnPropertyDescriptor(k,"key").get;if(z&&z.isReactWarning)return!1}return k.key!==void 0}function g(k,z){function Le(){Jn||(Jn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z))}Le.isReactWarning=!0,Object.defineProperty(k,"key",{get:Le,configurable:!0})}function b(){var k=A(this.type);return no[k]||(no[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function v(k,z,Le,We,ee,le){var be=Le.ref;return k={$$typeof:pe,type:k,key:z,props:Le,_owner:We},(be!==void 0?be:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:b}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function w(k,z){return z=v(k.type,z,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(z._store.validated=k._store.validated),z}function T(k){_(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===Y&&(k._payload.status==="fulfilled"?_(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function _(k){return typeof k=="object"&&k!==null&&k.$$typeof===pe}function M(k){var z={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Le){return z[Le]})}function U(k,z){return typeof k=="object"&&k!==null&&k.key!=null?(f(k.key),M(""+k.key)):z.toString(36)}function P(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(z){k.status==="pending"&&(k.status="fulfilled",k.value=z)},function(z){k.status==="pending"&&(k.status="rejected",k.reason=z)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function V(k,z,Le,We,ee){var le=typeof k;(le==="undefined"||le==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(le){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case pe:case ke:be=!0;break;case Y:return be=k._init,V(be(k._payload),z,Le,We,ee)}}if(be){be=k,ee=ee(be);var $e=We===""?"."+U(be,0):We;return Fr(ee)?(Le="",$e!=null&&(Le=$e.replace(Li,"$&/")+"/"),V(ee,z,Le,"",function(mr){return mr})):ee!=null&&(_(ee)&&(ee.key!=null&&(be&&be.key===ee.key||f(ee.key)),Le=w(ee,Le+(ee.key==null||be&&be.key===ee.key?"":(""+ee.key).replace(Li,"$&/")+"/")+$e),We!==""&&be!=null&&_(be)&&be.key==null&&be._store&&!be._store.validated&&(Le._store.validated=2),ee=Le),z.push(ee)),1}if(be=0,$e=We===""?".":We+":",Fr(k))for(var Et=0;Et<k.length;Et++)We=k[Et],le=$e+U(We,Et),be+=V(We,z,Le,le,ee);else if(Et=t(k),typeof Et=="function")for(Et===k.entries&&(Nr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Nr=!0),k=Et.call(k),Et=0;!(We=k.next()).done;)We=We.value,le=$e+U(We,Et++),be+=V(We,z,Le,le,ee);else if(le==="object"){if(typeof k.then=="function")return V(P(k),z,Le,We,ee);throw z=String(k),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return be}function te(k,z,Le){if(k==null)return k;var We=[],ee=0;return V(k,We,"","",function(le){return z.call(Le,le,ee++)}),We}function G(k){if(k._status===-1){var z=k._ioInfo;z!=null&&(z.start=z.end=performance.now()),z=k._result;var Le=z();if(Le.then(function(ee){if(k._status===0||k._status===-1){k._status=1,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="fulfilled",Le.value=ee)}},function(ee){if(k._status===0||k._status===-1){k._status=2,k._result=ee;var le=k._ioInfo;le!=null&&(le.end=performance.now()),Le.status===void 0&&(Le.status="rejected",Le.reason=ee)}}),z=k._ioInfo,z!=null){z.value=Le;var We=Le.displayName;typeof We=="string"&&(z.name=We)}k._status===-1&&(k._status=0,k._result=Le)}if(k._status===1)return z=k._result,z===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
3
 
4
4
  Your code should look like:
5
5
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -671,7 +671,7 @@ Update your environment and try again (no reload needed if using .env)!`:null}re
671
671
  - `)}`);else for(let w of e)try{let T=Yee.resolve(wu(w));C===1&&await g.setValue(T,"TRUST_FOLDER"),p.addDirectory(T),v.push(w)}catch(T){let _=T;b.push(`Error adding '${w}': ${_.message}`)}await i(s,a,v,b),t()};return(0,xc.jsxs)(ce,{flexDirection:"column",width:"100%",children:[(0,xc.jsxs)(ce,{flexDirection:"column",borderStyle:"round",borderColor:oe.status.warning,padding:1,marginLeft:1,marginRight:1,children:[(0,xc.jsxs)(ce,{flexDirection:"column",marginBottom:1,children:[(0,xc.jsx)(H,{bold:!0,color:oe.text.primary,children:"Do you trust the following folders being added to this workspace?"}),(0,xc.jsx)(H,{color:oe.text.secondary,children:e.map(C=>`- ${C}`).join(`
672
672
  `)}),(0,xc.jsx)(H,{color:oe.text.primary,children:"Trusting a folder allows Gemini to read and perform auto-edits when in auto-approval mode. This is a security feature to prevent accidental execution in untrusted directories."})]}),(0,xc.jsx)(oI,{items:m,onSelect:E,isFocused:!c})]}),c&&(0,xc.jsx)(ce,{marginLeft:1,marginTop:1,children:(0,xc.jsx)(H,{color:oe.text.primary,children:"Applying trust settings..."})})]})};var IE=Se(ut(),1);var $ee=Se(Xee(),1);function owe({type:e="dots"}){let[t,n]=(0,IE.useState)(0),r=$ee.default[e];return(0,IE.useEffect)(()=>{let i=setInterval(()=>{n(s=>s===r.frames.length-1?0:s+1)},r.interval);return()=>{clearInterval(i)}},[r]),IE.default.createElement(H,null,r.frames[t])}var Vd=owe;var Zee=Se(ut(),1);var tte=Se(It(),1);var ete=e=>{let n=rh().merged.ui?.showSpinner!==!1;return(0,Zee.useEffect)(()=>{if(n)return FS.debugNumAnimatedComponents++,()=>{FS.debugNumAnimatedComponents--}},[n]),n?(0,tte.jsx)(Vd,{...e}):null};var nte=Se(ut(),1);var sI=Se(It(),1);var swe=150,awe=({label:e,matchedIndex:t,userInput:n="",textColor:r=oe.text.primary,isExpanded:i=!1,maxWidth:s=swe,maxLines:a})=>{if(!(t!==void 0&&t>=0&&t<e.length&&n.length>0)){let C=e;if(!i)if(a!==void 0){let p=e.split(`
673
673
  `),g=p.slice(0,a).join(`
674
- `),b=p.length>a;g.length>s?g=g.slice(0,s)+"...":b&&(g+="..."),C=g}else e.length>s&&(C=e.slice(0,s)+"...");return(0,sI.jsx)(H,{wrap:"wrap",color:r,children:C})}let f=n.length,A="",m="",E="";if(i||e.length<=s)A=e.slice(0,t),m=e.slice(t,t+f),E=e.slice(t+f);else if(f>=s)m=e.slice(t,t+s-1)+"...";else{let C=s-f,p=Math.floor(C/2),g=Math.ceil(C/2),b=t-p,v=t+f+g;b<0&&(v+=-b,b=0),v>e.length&&(b-=v-e.length,v=e.length),b=Math.max(0,b);let w=t-b,T=e.slice(b,v);A=T.slice(0,w),m=T.slice(w,w+f),E=T.slice(w+f),b>0&&(A=A.length>=3?"..."+A.slice(3):"..."),v<e.length&&(E=E.length>=3?E.slice(0,-3)+"...":"...")}return(0,sI.jsxs)(H,{color:r,wrap:"wrap",children:[A,m?m.split(/(\s+)/).map((C,p)=>(0,sI.jsx)(H,{inverse:!0,color:r,children:C},`match-${p}`)):null,E]})},rte=nte.default.memo(awe);import Ym from"node:process";var ite={name:"about",description:"Show version info",kind:"built-in",autoExecute:!0,isSafeConcurrent:!0,action:async e=>{let t=Ym.platform,n="no sandbox";Ym.env.SANDBOX&&Ym.env.SANDBOX!=="sandbox-exec"?n=Ym.env.SANDBOX:Ym.env.SANDBOX==="sandbox-exec"&&(n=`sandbox-exec (${Ym.env.SEATBELT_PROFILE||"unknown"})`);let r=e.services.agentContext?.config.getModel()||"Unknown",i=await ov(),s=e.services.settings.merged.security.auth.selectedType||"",a=Ym.env.GOOGLE_CLOUD_PROJECT||"",c=await lwe(e),A=new Hg().getCachedGoogleAccount();Ce.log("AboutCommand: Retrieved cached Google account",{cachedAccount:A});let m=A??void 0,E=e.services.agentContext?.config.getUserTierName(),C={type:"about",cliVersion:i,osVersion:t,sandboxEnv:n,modelVersion:r,selectedAuthType:s,gcpProject:a,ideClient:c,userEmail:m,tier:E};e.ui.addItem(C)}};async function lwe(e){return e.services.agentContext?.config.getIdeMode()?(await ll.getInstance())?.getDetectedIdeDisplayName()??"":""}function KT(e,t,n){let r=["Workspace","User"],i=[],s=[];for(let c of r)if(ml(c)){let f=e.forScope(c).path;n.needsEnabling(e,c,t)?i.push({scope:c,path:f}):s.push({scope:c,path:f})}if(i.length===0)return{status:"no-op",featureName:t,action:"enable",modifiedScopes:[],alreadyInStateScopes:s};let a=[];for(let{scope:c,path:f}of i)ml(c)&&(n.enable(e,c,t),a.push({scope:c,path:f}));return{status:"success",featureName:t,action:"enable",modifiedScopes:a,alreadyInStateScopes:s}}function VT(e,t,n,r){if(!ml(n))return{status:"error",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[],error:`Invalid settings scope: ${n}`};let i=e.forScope(n).path;if(r.isExplicitlyDisabled(e,n,t))return{status:"no-op",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[{scope:n,path:i}]};let s=n==="Workspace"?"User":"Workspace",a=[];return ml(s)&&r.isExplicitlyDisabled(e,s,t)&&a.push({scope:s,path:e.forScope(s).path}),r.disable(e,n,t),{status:"success",featureName:t,action:"disable",modifiedScopes:[{scope:n,path:i}],alreadyInStateScopes:a}}var ote={needsEnabling:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled!==!0,enable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!0)},isExplicitlyDisabled:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled===!1,disable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!1)}};function ste(e,t){let{featureName:n,...r}=KT(e,t,ote);return{...r,agentName:n}}function ate(e,t,n){let{featureName:r,...i}=VT(e,t,n,ote);return{...i,agentName:r}}function aI(e,t){let{agentName:n,action:r,status:i,error:s}=e;if(i==="error")return s||`An error occurred while attempting to ${r} agent "${n}".`;if(i==="no-op")return`Agent "${n}" is already ${r==="enable"?"enabled":"disabled"}.`;let a=r==="enable",c=a?"enabled":"disabled",f=a?"by setting it to enabled in":"by setting it to disabled in",A=C=>{let p=C.scope==="Workspace"?"project":C.scope.toLowerCase();return t(p,C.path)},m=[...e.modifiedScopes,...e.alreadyInStateScopes];if(m.length===2){let C=A(m[0]),p=A(m[1]);return a?`Agent "${n}" ${c} ${f} ${C} and ${p} settings.`:`Agent "${n}" is now disabled in both ${C} and ${p} settings.`}let E=A(m[0]);return`Agent "${n}" ${c} ${f} ${E} settings.`}var lte={name:"list",description:"List available local and remote agents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return{type:"message",messageType:"error",content:"Config not loaded."};let n=t.getAgentRegistry();if(!n)return{type:"message",messageType:"error",content:"Agent registry not found."};let r=n.getAllDefinitions().map(s=>({name:s.name,displayName:s.displayName,description:s.description,kind:s.kind})),i={type:"agents_list",agents:r};e.ui.addItem(i)}};async function cwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents enable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides,f=Object.keys(c).filter(m=>c[m]?.enabled===!1);if(a.includes(i)&&!f.includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already enabled.`};if(!f.includes(i)&&!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=ste(r,i);return A.status==="no-op"?{type:"message",messageType:"info",content:aI(A,(m,E)=>`${m} (${E})`)}:(e.ui.addItem({type:"info",text:`Enabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:aI(A,(m,E)=>`${m} (${E})`)})}async function uwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents disable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides;if(Object.keys(c).filter(E=>c[E]?.enabled===!1).includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already disabled.`};if(!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=e.services.settings.workspace.path?"Workspace":"User",m=ate(r,i,A);return m.status==="no-op"?{type:"message",messageType:"info",content:aI(m,(E,C)=>`${E} (${C})`)}:(e.ui.addItem({type:"info",text:`Disabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:aI(m,(E,C)=>`${E} (${C})`)})}async function dwe(e,t){let n=e.services.agentContext?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=t.trim();if(!r)return{type:"message",messageType:"error",content:"Usage: /agents config <agent-name>"};let i=n.getAgentRegistry();if(!i)return{type:"message",messageType:"error",content:"Agent registry not found."};let s=i.getDiscoveredDefinition(r);if(!s)return{type:"message",messageType:"error",content:`Agent '${r}' not found.`};let a=s.displayName||r;return{type:"dialog",dialog:"agentConfig",props:{name:r,displayName:a,definition:s}}}function fwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return[];let i=r.merged.agents.overrides;return Object.entries(i).filter(([a,c])=>c?.enabled===!1).map(([a])=>a).filter(a=>a.startsWith(t))}function hwe(e,t){let n=e.services.agentContext?.config;if(!n)return[];let r=n.getAgentRegistry();return(r?r.getAllAgentNames():[]).filter(s=>s.startsWith(t))}function Awe(e,t){let n=e.services.agentContext?.config;return n?(n.getAgentRegistry()?.getAllDiscoveredAgentNames()??[]).filter(s=>s.startsWith(t)):[]}var mwe={name:"enable",description:"Enable a disabled agent",kind:"built-in",autoExecute:!1,action:cwe,completion:fwe},pwe={name:"disable",description:"Disable an enabled agent",kind:"built-in",autoExecute:!1,action:uwe,completion:hwe},gwe={name:"config",description:"Configure an agent",kind:"built-in",autoExecute:!1,action:dwe,completion:Awe},ywe={name:"reload",altNames:["refresh"],description:"Reload the agent registry",kind:"built-in",action:async e=>{let n=e.services.agentContext?.config?.getAgentRegistry();return n?(e.ui.addItem({type:"info",text:"Reloading agent registry..."}),await n.reload(),{type:"message",messageType:"info",content:"Agents reloaded successfully"}):{type:"message",messageType:"error",content:"Agent registry not found."}}},cte={name:"agents",description:"Manage agents",kind:"built-in",subCommands:[lte,ywe,mwe,pwe,gwe],action:async(e,t)=>lte.action(e,t)};var ute={name:"signin",altNames:["login"],description:"Sign in or change the authentication method",kind:"built-in",autoExecute:!0,action:(e,t)=>({type:"dialog",dialog:"auth"})},Ewe={name:"signout",altNames:["logout"],description:"Sign out and clear all cached credentials",kind:"built-in",action:async(e,t)=>(await KU(),e.services.settings.setValue("User","security.auth.selectedType",void 0),e.services.agentContext?.geminiClient.stripThoughtsFromHistory(),{type:"logout"})},dte={name:"auth",description:"Manage authentication",kind:"built-in",subCommands:[ute,Ewe],action:(e,t)=>ute.action(e,t)};import _h from"node:process";var fte="f8e1854";import*as WT from"node:fs/promises";import hte from"node:path";function Cwe(e){return e.map(t=>{let n=t.parts?.map(i=>i.text?i.text:i.functionCall?"**Tool Command**:\n```json\n"+JSON.stringify(i.functionCall,null,2)+"\n```":i.functionResponse?"**Tool Response**:\n```json\n"+JSON.stringify(i.functionResponse,null,2)+"\n```":"").join("")||"",r=t.role==="user"?"\u{1F9D1}\u200D\u{1F4BB}":"\u2728";return`## ${(t.role||"model").toUpperCase()} ${r}
674
+ `),b=p.length>a;g.length>s?g=g.slice(0,s)+"...":b&&(g+="..."),C=g}else e.length>s&&(C=e.slice(0,s)+"...");return(0,sI.jsx)(H,{wrap:"wrap",color:r,children:C})}let f=n.length,A="",m="",E="";if(i||e.length<=s)A=e.slice(0,t),m=e.slice(t,t+f),E=e.slice(t+f);else if(f>=s)m=e.slice(t,t+s-1)+"...";else{let C=s-f,p=Math.floor(C/2),g=Math.ceil(C/2),b=t-p,v=t+f+g;b<0&&(v+=-b,b=0),v>e.length&&(b-=v-e.length,v=e.length),b=Math.max(0,b);let w=t-b,T=e.slice(b,v);A=T.slice(0,w),m=T.slice(w,w+f),E=T.slice(w+f),b>0&&(A=A.length>=3?"..."+A.slice(3):"..."),v<e.length&&(E=E.length>=3?E.slice(0,-3)+"...":"...")}return(0,sI.jsxs)(H,{color:r,wrap:"wrap",children:[A,m?m.split(/(\s+)/).map((C,p)=>(0,sI.jsx)(H,{inverse:!0,color:r,children:C},`match-${p}`)):null,E]})},rte=nte.default.memo(awe);import Ym from"node:process";var ite={name:"about",description:"Show version info",kind:"built-in",autoExecute:!0,isSafeConcurrent:!0,action:async e=>{let t=Ym.platform,n="no sandbox";Ym.env.SANDBOX&&Ym.env.SANDBOX!=="sandbox-exec"?n=Ym.env.SANDBOX:Ym.env.SANDBOX==="sandbox-exec"&&(n=`sandbox-exec (${Ym.env.SEATBELT_PROFILE||"unknown"})`);let r=e.services.agentContext?.config.getModel()||"Unknown",i=await ov(),s=e.services.settings.merged.security.auth.selectedType||"",a=Ym.env.GOOGLE_CLOUD_PROJECT||"",c=await lwe(e),A=new Hg().getCachedGoogleAccount();Ce.log("AboutCommand: Retrieved cached Google account",{cachedAccount:A});let m=A??void 0,E=e.services.agentContext?.config.getUserTierName(),C={type:"about",cliVersion:i,osVersion:t,sandboxEnv:n,modelVersion:r,selectedAuthType:s,gcpProject:a,ideClient:c,userEmail:m,tier:E};e.ui.addItem(C)}};async function lwe(e){return e.services.agentContext?.config.getIdeMode()?(await ll.getInstance())?.getDetectedIdeDisplayName()??"":""}function KT(e,t,n){let r=["Workspace","User"],i=[],s=[];for(let c of r)if(ml(c)){let f=e.forScope(c).path;n.needsEnabling(e,c,t)?i.push({scope:c,path:f}):s.push({scope:c,path:f})}if(i.length===0)return{status:"no-op",featureName:t,action:"enable",modifiedScopes:[],alreadyInStateScopes:s};let a=[];for(let{scope:c,path:f}of i)ml(c)&&(n.enable(e,c,t),a.push({scope:c,path:f}));return{status:"success",featureName:t,action:"enable",modifiedScopes:a,alreadyInStateScopes:s}}function VT(e,t,n,r){if(!ml(n))return{status:"error",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[],error:`Invalid settings scope: ${n}`};let i=e.forScope(n).path;if(r.isExplicitlyDisabled(e,n,t))return{status:"no-op",featureName:t,action:"disable",modifiedScopes:[],alreadyInStateScopes:[{scope:n,path:i}]};let s=n==="Workspace"?"User":"Workspace",a=[];return ml(s)&&r.isExplicitlyDisabled(e,s,t)&&a.push({scope:s,path:e.forScope(s).path}),r.disable(e,n,t),{status:"success",featureName:t,action:"disable",modifiedScopes:[{scope:n,path:i}],alreadyInStateScopes:a}}var ote={needsEnabling:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled!==!0,enable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!0)},isExplicitlyDisabled:(e,t,n)=>e.forScope(t).settings.agents?.overrides?.[n]?.enabled===!1,disable:(e,t,n)=>{e.setValue(t,`agents.overrides.${n}.enabled`,!1)}};function ste(e,t){let{featureName:n,...r}=KT(e,t,ote);return{...r,agentName:n}}function ate(e,t,n){let{featureName:r,...i}=VT(e,t,n,ote);return{...i,agentName:r}}function aI(e,t){let{agentName:n,action:r,status:i,error:s}=e;if(i==="error")return s||`An error occurred while attempting to ${r} agent "${n}".`;if(i==="no-op")return`Agent "${n}" is already ${r==="enable"?"enabled":"disabled"}.`;let a=r==="enable",c=a?"enabled":"disabled",f=a?"by setting it to enabled in":"by setting it to disabled in",A=C=>{let p=C.scope==="Workspace"?"project":C.scope.toLowerCase();return t(p,C.path)},m=[...e.modifiedScopes,...e.alreadyInStateScopes];if(m.length===2){let C=A(m[0]),p=A(m[1]);return a?`Agent "${n}" ${c} ${f} ${C} and ${p} settings.`:`Agent "${n}" is now disabled in both ${C} and ${p} settings.`}let E=A(m[0]);return`Agent "${n}" ${c} ${f} ${E} settings.`}var lte={name:"list",description:"List available local and remote agents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return{type:"message",messageType:"error",content:"Config not loaded."};let n=t.getAgentRegistry();if(!n)return{type:"message",messageType:"error",content:"Agent registry not found."};let r=n.getAllDefinitions().map(s=>({name:s.name,displayName:s.displayName,description:s.description,kind:s.kind})),i={type:"agents_list",agents:r};e.ui.addItem(i)}};async function cwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents enable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides,f=Object.keys(c).filter(m=>c[m]?.enabled===!1);if(a.includes(i)&&!f.includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already enabled.`};if(!f.includes(i)&&!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=ste(r,i);return A.status==="no-op"?{type:"message",messageType:"info",content:aI(A,(m,E)=>`${m} (${E})`)}:(e.ui.addItem({type:"info",text:`Enabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:aI(A,(m,E)=>`${m} (${E})`)})}async function uwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let i=t.trim();if(!i)return{type:"message",messageType:"error",content:"Usage: /agents disable <agent-name>"};let s=n.getAgentRegistry();if(!s)return{type:"message",messageType:"error",content:"Agent registry not found."};let a=s.getAllAgentNames(),c=r.merged.agents.overrides;if(Object.keys(c).filter(E=>c[E]?.enabled===!1).includes(i))return{type:"message",messageType:"info",content:`Agent '${i}' is already disabled.`};if(!a.includes(i))return{type:"message",messageType:"error",content:`Agent '${i}' not found.`};let A=e.services.settings.workspace.path?"Workspace":"User",m=ate(r,i,A);return m.status==="no-op"?{type:"message",messageType:"info",content:aI(m,(E,C)=>`${E} (${C})`)}:(e.ui.addItem({type:"info",text:`Disabling ${i}...`}),await s.reload(),{type:"message",messageType:"info",content:aI(m,(E,C)=>`${E} (${C})`)})}async function dwe(e,t){let n=e.services.agentContext?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=t.trim();if(!r)return{type:"message",messageType:"error",content:"Usage: /agents config <agent-name>"};let i=n.getAgentRegistry();if(!i)return{type:"message",messageType:"error",content:"Agent registry not found."};let s=i.getDiscoveredDefinition(r);if(!s)return{type:"message",messageType:"error",content:`Agent '${r}' not found.`};let a=s.displayName||r;return{type:"dialog",dialog:"agentConfig",props:{name:r,displayName:a,definition:s}}}function fwe(e,t){let n=e.services.agentContext?.config,{settings:r}=e.services;if(!n)return[];let i=r.merged.agents.overrides;return Object.entries(i).filter(([a,c])=>c?.enabled===!1).map(([a])=>a).filter(a=>a.startsWith(t))}function hwe(e,t){let n=e.services.agentContext?.config;if(!n)return[];let r=n.getAgentRegistry();return(r?r.getAllAgentNames():[]).filter(s=>s.startsWith(t))}function Awe(e,t){let n=e.services.agentContext?.config;return n?(n.getAgentRegistry()?.getAllDiscoveredAgentNames()??[]).filter(s=>s.startsWith(t)):[]}var mwe={name:"enable",description:"Enable a disabled agent",kind:"built-in",autoExecute:!1,action:cwe,completion:fwe},pwe={name:"disable",description:"Disable an enabled agent",kind:"built-in",autoExecute:!1,action:uwe,completion:hwe},gwe={name:"config",description:"Configure an agent",kind:"built-in",autoExecute:!1,action:dwe,completion:Awe},ywe={name:"reload",altNames:["refresh"],description:"Reload the agent registry",kind:"built-in",action:async e=>{let n=e.services.agentContext?.config?.getAgentRegistry();return n?(e.ui.addItem({type:"info",text:"Reloading agent registry..."}),await n.reload(),{type:"message",messageType:"info",content:"Agents reloaded successfully"}):{type:"message",messageType:"error",content:"Agent registry not found."}}},cte={name:"agents",description:"Manage agents",kind:"built-in",subCommands:[lte,ywe,mwe,pwe,gwe],action:async(e,t)=>lte.action(e,t)};var ute={name:"signin",altNames:["login"],description:"Sign in or change the authentication method",kind:"built-in",autoExecute:!0,action:(e,t)=>({type:"dialog",dialog:"auth"})},Ewe={name:"signout",altNames:["logout"],description:"Sign out and clear all cached credentials",kind:"built-in",action:async(e,t)=>(await KU(),e.services.settings.setValue("User","security.auth.selectedType",void 0),e.services.agentContext?.geminiClient.stripThoughtsFromHistory(),{type:"logout"})},dte={name:"auth",description:"Manage authentication",kind:"built-in",subCommands:[ute,Ewe],action:(e,t)=>ute.action(e,t)};import _h from"node:process";var fte="0dace6f";import*as WT from"node:fs/promises";import hte from"node:path";function Cwe(e){return e.map(t=>{let n=t.parts?.map(i=>i.text?i.text:i.functionCall?"**Tool Command**:\n```json\n"+JSON.stringify(i.functionCall,null,2)+"\n```":i.functionResponse?"**Tool Response**:\n```json\n"+JSON.stringify(i.functionResponse,null,2)+"\n```":"").join("")||"",r=t.role==="user"?"\u{1F9D1}\u200D\u{1F4BB}":"\u2728";return`## ${(t.role||"model").toUpperCase()} ${r}
675
675
 
676
676
  ${n}`}).join(`
677
677
 
@@ -729,7 +729,7 @@ ${e.map(i=>{let s=i1.basename(i.path),a=(t.get(s)||0)>1,c=i1.basename(i1.dirname
729
729
  ${m.map(E=>` - ${E}`).join(`
730
730
  `)}
731
731
 
732
- Use /mcp auth <server-name> to authenticate.`}}let a=s[n];if(!a)return{type:"message",messageType:"error",content:`MCP server '${n}' not found.`};let c=f=>{e.ui.addItem({type:"info",text:f})};gt.on(ic.OauthDisplayMessage,c);try{e.ui.addItem({type:"info",text:`Starting OAuth authentication for MCP server '${n}'...`});let{MCPOAuthProvider:f}=await import("./dist-I4ITZJCU.js"),A=a.oauth;A||(A={enabled:!1});let m=a.httpUrl||a.url;await new f(new TR).authenticate(n,A,m),e.ui.addItem({type:"info",text:`\u2705 Successfully authenticated with MCP server '${n}'!`});let C=i.getMcpClientManager();C&&(e.ui.addItem({type:"info",text:`Restarting MCP server '${n}'...`}),await C.restartServer(n));let p=e.services.agentContext?.geminiClient;return p?.isInitialized()&&await p.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:`Successfully authenticated and reloaded tools for '${n}'`}}catch(f){return{type:"message",messageType:"error",content:`Failed to authenticate with MCP server '${n}': ${_t(f)}`}}finally{gt.removeListener(ic.OauthDisplayMessage,c)}},completion:async(e,t)=>{let r=e.services.agentContext?.config;if(!r)return[];let i=r.getMcpClientManager()?.getMcpServers()||{};return Object.keys(i).filter(s=>s.startsWith(t))}},fI=async(e,t=!1,n=!1,r)=>{let i=e.services.agentContext,s=i?.config;if(!s)return{type:"message",messageType:"error",content:"Config not loaded."};s.setUserInteractedWithMcp();let a=i.toolRegistry;if(!a)return{type:"message",messageType:"error",content:"Could not retrieve tool registry."};let c=s.getMcpClientManager()?.getMcpServers()||{},f=s.getMcpClientManager()?.getBlockedMcpServers()||[];if(r){let G=r.trim().toLowerCase();G&&(c=Object.fromEntries(Object.entries(c).filter(([W])=>W.toLowerCase().includes(G)||zs(W).includes(G))))}let A=Object.keys(c),m=A.filter(G=>ZH(G)===XH.CONNECTING),C=e3()===$H.IN_PROGRESS||m.length>0,g=a.getAllTools().filter(G=>G instanceof DU),v=s.getPromptRegistry().getAllPrompts().filter(G=>"serverName"in G&&A.includes(G.serverName)),T=s.getResourceRegistry().getAllResources().filter(G=>A.includes(G.serverName)),_={},M=new TR;for(let G of A)if(c[G].oauth?.enabled||RR.has(G)){let ye=await M.getCredentials(G);ye?ye.token.expiresAt&&ye.token.expiresAt<Date.now()?_[G]="expired":_[G]="authenticated":_[G]="unauthenticated"}else _[G]="not-configured";let U=Rh.getInstance(),P={};for(let G of A)P[G]=await U.getDisplayState(G);let V={};for(let G of A){let W=s.getMcpClientManager()?.getLastError(G);W&&(V[G]=W)}let te={type:"mcp_status",servers:c,tools:g.map(G=>({serverName:G.serverName,name:G.name,description:G.description,schema:G.schema})),prompts:v.map(G=>({serverName:G.serverName,name:G.name,description:G.description})),resources:T.map(G=>({serverName:G.serverName,name:G.name,uri:G.uri,mimeType:G.mimeType,description:G.description})),authStatus:_,enablementState:P,errors:V,blockedServers:f.map(G=>({name:G.name,extensionName:G.extensionName})),discoveryInProgress:C,connectingServers:m,showDescriptions:!!t,showSchema:!!n};e.ui.addItem(te)},Ine={name:"list",altNames:["ls","nodesc","nodescription"],description:"List configured MCP servers and tools",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!1,!1,t)},bTe={name:"desc",altNames:["description"],description:"List configured MCP servers and tools with descriptions",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!0,!1,t)},ITe={name:"schema",description:"List configured MCP servers and tools with descriptions and schemas",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!0,!0,t)},DTe={name:"reload",altNames:["refresh"],description:"Reloads MCP servers",kind:"built-in",autoExecute:!0,takesArgs:!1,action:async e=>{let t=e.services.agentContext,n=t?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=n.getMcpClientManager();if(!r)return{type:"message",messageType:"error",content:"Could not retrieve mcp client manager."};e.ui.addItem({type:"info",text:"Reloading MCP servers..."}),await r.restart();let i=t.geminiClient;return i?.isInitialized()&&await i.setTools(),e.ui.reloadCommands(),Ine.action(e,"")}};async function Dne(e,t,n){let r=e.services.agentContext,i=r?.config;if(!i)return{type:"message",messageType:"error",content:"Config not loaded."};i.setUserInteractedWithMcp();let s=t.trim().split(/\s+/),a=s.includes("--session"),c=s.filter(b=>b!=="--session")[0],f=n?"enable":"disable";if(!c)return{type:"message",messageType:"error",content:`Server name required. Usage: /mcp ${f} <server-name> [--session]`};let A=zs(c),m=i.getMcpClientManager()?.getMcpServers()||{};if(!Object.keys(m).map(zs).includes(A))return{type:"message",messageType:"error",content:`Server '${c}' not found. Use /mcp list to see available servers.`};let C=Rh.getInstance();if(n){let b=By(),v=await Oee(A,{adminMcpEnabled:b.merged.admin?.mcp?.enabled??!0,allowedList:b.merged.mcp?.allowed,excludedList:b.merged.mcp?.excluded});if(!v.allowed&&(v.blockType==="allowlist"||v.blockType==="excludelist"))return{type:"message",messageType:"error",content:v.reason??"Blocked by settings."};a?C.clearSessionDisable(A):await C.enable(A),v.blockType==="admin"&&e.ui.addItem({type:"warning",text:"MCP disabled by admin. Will load when enabled."},Date.now())}else a?C.disableForSession(A):await C.disable(A);let p=`MCP server '${A}' ${n?"enabled":"disabled"}${a?" for this session":""}.`,g=i.getMcpClientManager();return g&&(e.ui.addItem({type:"info",text:"Reloading MCP servers..."},Date.now()),await g.restart()),r.geminiClient?.isInitialized()&&await r.geminiClient.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:p}}async function vne(e,t,n){let i=e.services.agentContext?.config;if(!i)return[];let s=Object.keys(i.getMcpClientManager()?.getMcpServers()||{}),a=Rh.getInstance(),c=[];for(let f of s)(await a.getDisplayState(f)).enabled===n&&f.startsWith(t)&&c.push(f);return c}var vTe={name:"enable",description:"Enable a disabled MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Dne(e,t,!0),completion:(e,t)=>vne(e,t,!1)},xTe={name:"disable",description:"Disable an MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Dne(e,t,!1),completion:(e,t)=>vne(e,t,!0)},HO={name:"mcp",description:"Manage configured Model Context Protocol (MCP) servers",kind:"built-in",autoExecute:!1,subCommands:[Ine,bTe,ITe,STe,DTe,vTe,xTe],action:async(e,t)=>{if(t){let n=wh(`/${t}`,HO.subCommands);return n.commandToExecute?.action?n.commandToExecute.action(e,n.args):fI(e,!1,!1,t)}return fI(e)}};var xne={name:"memory",description:"Commands for interacting with memory",kind:"built-in",autoExecute:!1,subCommands:[{name:"show",description:"Show the current memory contents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=u3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}},{name:"add",description:"Add content to the memory",kind:"built-in",autoExecute:!1,action:(e,t)=>{let n=d3(t);return n.type==="message"||e.ui.addItem({type:"info",text:`Attempting to save to memory: "${t.trim()}"`},Date.now()),n}},{name:"reload",altNames:["refresh"],description:"Reload the memory from the source",kind:"built-in",autoExecute:!0,action:async e=>{e.ui.addItem({type:"info",text:"Reloading memory from source files..."},Date.now());try{let t=e.services.agentContext?.config;if(t){let n=await f3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}catch(t){e.ui.addItem({type:"error",text:`Error reloading memory: ${t.message}`},Date.now())}}},{name:"list",description:"Lists the paths of the GEMINI.md files in use",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=h3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}]};var BTe={name:"set",description:"Set the model to use. Usage: /model set <model-name> [--persist]",kind:"built-in",autoExecute:!1,action:async(e,t)=>{let n=t.trim().split(/\s+/).filter(Boolean);if(n.length===0){e.ui.addItem({type:"error",text:"Usage: /model set <model-name> [--persist]"});return}let r=n[0],i=n.includes("--persist");if(e.services.agentContext?.config){e.services.agentContext.config.setModel(r,!i);let s=new UU(r);oH(e.services.agentContext.config,s),e.ui.addItem({type:"info",text:`Model set to ${r}${i?" (persisted)":""}`})}}},Bne={name:"manage",description:"Opens a dialog to configure the model",kind:"built-in",autoExecute:!0,action:async e=>(e.services.agentContext?.config&&await e.services.agentContext.config.refreshUserQuota(),{type:"dialog",dialog:"model"})},wne={name:"model",description:"Manage model configuration",kind:"built-in",autoExecute:!1,subCommands:[Bne,BTe],action:async(e,t)=>Bne.action(e,t)};var to=Se(ut(),1);var ot=Se(It(),1);var GO=6,PO=20,s1=25,$m=5,Tne=10,hI=e=>!e||!e.reactionGroups?0:e.reactionGroups.reduce((t,n)=>t+n.users.totalCount,0),wTe=(e,t)=>t?.toLowerCase()==="duplicate"?"magenta":e==="OPEN"?"green":"red",Rne=({config:e,onExit:t,initialLimit:n=50})=>{let r=Ci(),[i,s]=(0,to.useState)({status:"loading",issues:[],currentIndex:0,analysisCache:new Map,analyzingIds:new Set,message:"Fetching issues..."}),[a,c]=(0,to.useState)("target"),[f,A]=(0,to.useState)(0),[m,E]=(0,to.useState)(!1),[C,p]=(0,to.useState)(0),[g,b]=(0,to.useState)(0),[v,w]=(0,to.useState)(""),[T,_]=(0,to.useState)([]),[M,U]=(0,to.useState)(!1),[P,V]=(0,to.useState)(0);(0,to.useEffect)(()=>{f<P?V(f):f>=P+$m&&V(f-$m+1)},[f,P]);let te=async xe=>{try{let{stdout:J}=await Xo("gh",["issue","view",String(xe),"--json","number,title,body,state,stateReason,labels,url,comments,author,reactionGroups"]);return JSON.parse(J)}catch(J){return Ce.error(`Failed to fetch details for candidate #${xe}`,J),null}},G=(0,to.useCallback)(async xe=>{let J=xe.comments.find(Qe=>Qe.body.includes("Found possible duplicate issues:"));if(!J)return null;let Re=J.body.split(`
732
+ Use /mcp auth <server-name> to authenticate.`}}let a=s[n];if(!a)return{type:"message",messageType:"error",content:`MCP server '${n}' not found.`};let c=f=>{e.ui.addItem({type:"info",text:f})};gt.on(ic.OauthDisplayMessage,c);try{e.ui.addItem({type:"info",text:`Starting OAuth authentication for MCP server '${n}'...`});let{MCPOAuthProvider:f}=await import("./dist-EZT2EOAT.js"),A=a.oauth;A||(A={enabled:!1});let m=a.httpUrl||a.url;await new f(new TR).authenticate(n,A,m),e.ui.addItem({type:"info",text:`\u2705 Successfully authenticated with MCP server '${n}'!`});let C=i.getMcpClientManager();C&&(e.ui.addItem({type:"info",text:`Restarting MCP server '${n}'...`}),await C.restartServer(n));let p=e.services.agentContext?.geminiClient;return p?.isInitialized()&&await p.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:`Successfully authenticated and reloaded tools for '${n}'`}}catch(f){return{type:"message",messageType:"error",content:`Failed to authenticate with MCP server '${n}': ${_t(f)}`}}finally{gt.removeListener(ic.OauthDisplayMessage,c)}},completion:async(e,t)=>{let r=e.services.agentContext?.config;if(!r)return[];let i=r.getMcpClientManager()?.getMcpServers()||{};return Object.keys(i).filter(s=>s.startsWith(t))}},fI=async(e,t=!1,n=!1,r)=>{let i=e.services.agentContext,s=i?.config;if(!s)return{type:"message",messageType:"error",content:"Config not loaded."};s.setUserInteractedWithMcp();let a=i.toolRegistry;if(!a)return{type:"message",messageType:"error",content:"Could not retrieve tool registry."};let c=s.getMcpClientManager()?.getMcpServers()||{},f=s.getMcpClientManager()?.getBlockedMcpServers()||[];if(r){let G=r.trim().toLowerCase();G&&(c=Object.fromEntries(Object.entries(c).filter(([W])=>W.toLowerCase().includes(G)||zs(W).includes(G))))}let A=Object.keys(c),m=A.filter(G=>ZH(G)===XH.CONNECTING),C=e3()===$H.IN_PROGRESS||m.length>0,g=a.getAllTools().filter(G=>G instanceof DU),v=s.getPromptRegistry().getAllPrompts().filter(G=>"serverName"in G&&A.includes(G.serverName)),T=s.getResourceRegistry().getAllResources().filter(G=>A.includes(G.serverName)),_={},M=new TR;for(let G of A)if(c[G].oauth?.enabled||RR.has(G)){let ye=await M.getCredentials(G);ye?ye.token.expiresAt&&ye.token.expiresAt<Date.now()?_[G]="expired":_[G]="authenticated":_[G]="unauthenticated"}else _[G]="not-configured";let U=Rh.getInstance(),P={};for(let G of A)P[G]=await U.getDisplayState(G);let V={};for(let G of A){let W=s.getMcpClientManager()?.getLastError(G);W&&(V[G]=W)}let te={type:"mcp_status",servers:c,tools:g.map(G=>({serverName:G.serverName,name:G.name,description:G.description,schema:G.schema})),prompts:v.map(G=>({serverName:G.serverName,name:G.name,description:G.description})),resources:T.map(G=>({serverName:G.serverName,name:G.name,uri:G.uri,mimeType:G.mimeType,description:G.description})),authStatus:_,enablementState:P,errors:V,blockedServers:f.map(G=>({name:G.name,extensionName:G.extensionName})),discoveryInProgress:C,connectingServers:m,showDescriptions:!!t,showSchema:!!n};e.ui.addItem(te)},Ine={name:"list",altNames:["ls","nodesc","nodescription"],description:"List configured MCP servers and tools",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!1,!1,t)},bTe={name:"desc",altNames:["description"],description:"List configured MCP servers and tools with descriptions",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!0,!1,t)},ITe={name:"schema",description:"List configured MCP servers and tools with descriptions and schemas",kind:"built-in",autoExecute:!0,action:(e,t)=>fI(e,!0,!0,t)},DTe={name:"reload",altNames:["refresh"],description:"Reloads MCP servers",kind:"built-in",autoExecute:!0,takesArgs:!1,action:async e=>{let t=e.services.agentContext,n=t?.config;if(!n)return{type:"message",messageType:"error",content:"Config not loaded."};let r=n.getMcpClientManager();if(!r)return{type:"message",messageType:"error",content:"Could not retrieve mcp client manager."};e.ui.addItem({type:"info",text:"Reloading MCP servers..."}),await r.restart();let i=t.geminiClient;return i?.isInitialized()&&await i.setTools(),e.ui.reloadCommands(),Ine.action(e,"")}};async function Dne(e,t,n){let r=e.services.agentContext,i=r?.config;if(!i)return{type:"message",messageType:"error",content:"Config not loaded."};i.setUserInteractedWithMcp();let s=t.trim().split(/\s+/),a=s.includes("--session"),c=s.filter(b=>b!=="--session")[0],f=n?"enable":"disable";if(!c)return{type:"message",messageType:"error",content:`Server name required. Usage: /mcp ${f} <server-name> [--session]`};let A=zs(c),m=i.getMcpClientManager()?.getMcpServers()||{};if(!Object.keys(m).map(zs).includes(A))return{type:"message",messageType:"error",content:`Server '${c}' not found. Use /mcp list to see available servers.`};let C=Rh.getInstance();if(n){let b=By(),v=await Oee(A,{adminMcpEnabled:b.merged.admin?.mcp?.enabled??!0,allowedList:b.merged.mcp?.allowed,excludedList:b.merged.mcp?.excluded});if(!v.allowed&&(v.blockType==="allowlist"||v.blockType==="excludelist"))return{type:"message",messageType:"error",content:v.reason??"Blocked by settings."};a?C.clearSessionDisable(A):await C.enable(A),v.blockType==="admin"&&e.ui.addItem({type:"warning",text:"MCP disabled by admin. Will load when enabled."},Date.now())}else a?C.disableForSession(A):await C.disable(A);let p=`MCP server '${A}' ${n?"enabled":"disabled"}${a?" for this session":""}.`,g=i.getMcpClientManager();return g&&(e.ui.addItem({type:"info",text:"Reloading MCP servers..."},Date.now()),await g.restart()),r.geminiClient?.isInitialized()&&await r.geminiClient.setTools(),e.ui.reloadCommands(),{type:"message",messageType:"info",content:p}}async function vne(e,t,n){let i=e.services.agentContext?.config;if(!i)return[];let s=Object.keys(i.getMcpClientManager()?.getMcpServers()||{}),a=Rh.getInstance(),c=[];for(let f of s)(await a.getDisplayState(f)).enabled===n&&f.startsWith(t)&&c.push(f);return c}var vTe={name:"enable",description:"Enable a disabled MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Dne(e,t,!0),completion:(e,t)=>vne(e,t,!1)},xTe={name:"disable",description:"Disable an MCP server",kind:"built-in",autoExecute:!0,action:(e,t)=>Dne(e,t,!1),completion:(e,t)=>vne(e,t,!0)},HO={name:"mcp",description:"Manage configured Model Context Protocol (MCP) servers",kind:"built-in",autoExecute:!1,subCommands:[Ine,bTe,ITe,STe,DTe,vTe,xTe],action:async(e,t)=>{if(t){let n=wh(`/${t}`,HO.subCommands);return n.commandToExecute?.action?n.commandToExecute.action(e,n.args):fI(e,!1,!1,t)}return fI(e)}};var xne={name:"memory",description:"Commands for interacting with memory",kind:"built-in",autoExecute:!1,subCommands:[{name:"show",description:"Show the current memory contents",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=u3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}},{name:"add",description:"Add content to the memory",kind:"built-in",autoExecute:!1,action:(e,t)=>{let n=d3(t);return n.type==="message"||e.ui.addItem({type:"info",text:`Attempting to save to memory: "${t.trim()}"`},Date.now()),n}},{name:"reload",altNames:["refresh"],description:"Reload the memory from the source",kind:"built-in",autoExecute:!0,action:async e=>{e.ui.addItem({type:"info",text:"Reloading memory from source files..."},Date.now());try{let t=e.services.agentContext?.config;if(t){let n=await f3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}catch(t){e.ui.addItem({type:"error",text:`Error reloading memory: ${t.message}`},Date.now())}}},{name:"list",description:"Lists the paths of the GEMINI.md files in use",kind:"built-in",autoExecute:!0,action:async e=>{let t=e.services.agentContext?.config;if(!t)return;let n=h3(t);e.ui.addItem({type:"info",text:n.content},Date.now())}}]};var BTe={name:"set",description:"Set the model to use. Usage: /model set <model-name> [--persist]",kind:"built-in",autoExecute:!1,action:async(e,t)=>{let n=t.trim().split(/\s+/).filter(Boolean);if(n.length===0){e.ui.addItem({type:"error",text:"Usage: /model set <model-name> [--persist]"});return}let r=n[0],i=n.includes("--persist");if(e.services.agentContext?.config){e.services.agentContext.config.setModel(r,!i);let s=new UU(r);oH(e.services.agentContext.config,s),e.ui.addItem({type:"info",text:`Model set to ${r}${i?" (persisted)":""}`})}}},Bne={name:"manage",description:"Opens a dialog to configure the model",kind:"built-in",autoExecute:!0,action:async e=>(e.services.agentContext?.config&&await e.services.agentContext.config.refreshUserQuota(),{type:"dialog",dialog:"model"})},wne={name:"model",description:"Manage model configuration",kind:"built-in",autoExecute:!1,subCommands:[Bne,BTe],action:async(e,t)=>Bne.action(e,t)};var to=Se(ut(),1);var ot=Se(It(),1);var GO=6,PO=20,s1=25,$m=5,Tne=10,hI=e=>!e||!e.reactionGroups?0:e.reactionGroups.reduce((t,n)=>t+n.users.totalCount,0),wTe=(e,t)=>t?.toLowerCase()==="duplicate"?"magenta":e==="OPEN"?"green":"red",Rne=({config:e,onExit:t,initialLimit:n=50})=>{let r=Ci(),[i,s]=(0,to.useState)({status:"loading",issues:[],currentIndex:0,analysisCache:new Map,analyzingIds:new Set,message:"Fetching issues..."}),[a,c]=(0,to.useState)("target"),[f,A]=(0,to.useState)(0),[m,E]=(0,to.useState)(!1),[C,p]=(0,to.useState)(0),[g,b]=(0,to.useState)(0),[v,w]=(0,to.useState)(""),[T,_]=(0,to.useState)([]),[M,U]=(0,to.useState)(!1),[P,V]=(0,to.useState)(0);(0,to.useEffect)(()=>{f<P?V(f):f>=P+$m&&V(f-$m+1)},[f,P]);let te=async xe=>{try{let{stdout:J}=await Xo("gh",["issue","view",String(xe),"--json","number,title,body,state,stateReason,labels,url,comments,author,reactionGroups"]);return JSON.parse(J)}catch(J){return Ce.error(`Failed to fetch details for candidate #${xe}`,J),null}},G=(0,to.useCallback)(async xe=>{let J=xe.comments.find(Qe=>Qe.body.includes("Found possible duplicate issues:"));if(!J)return null;let Re=J.body.split(`
733
733
  `),Oe=[];for(let Qe of Re){let bt=Qe.match(/#(\d+)/);if(bt){let Mt=parseInt(bt[1],10);Mt!==xe.number&&Oe.push(Mt)}}if(Oe.length===0)return null;let nt=[];for(let Qe of Oe){let bt=await te(Qe);bt&&nt.push(bt)}let St=e.getBaseLlmClient(),j=`
734
734
  I am triaging a GitHub issue labeled as 'possible-duplicate'. I need to decide if it should be marked as a duplicate of another issue, or if one of the other issues should be marked as a duplicate of this one.
735
735