@ycodium-ai/agent-antigravity 0.2.5004 → 0.2.5093
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.
- package/assets/ui.js +2 -20
- package/dist/index.js +805 -615
- package/package.json +6 -3
package/assets/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-settings"];if(!j)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PROVIDER_SETTINGS_VIEW_CAPABILITY:J,accountDirectoryCandidates:Re,accountDirectorySlug:Be,accountProbeHasSignedInAccount:Ie,allocateAccountDirectory:Ae,providerInstanceAccountPaths:Te}=j;var xe=window.__ycodiumPluginHost.react;var{Activity:Ce,Children:Ee,Component:Ne,Fragment:Pe,Profiler:_e,PureComponent:Ue,StrictMode:Fe,Suspense:Me,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Ke,__COMPILER_RUNTIME:Le,act:Oe,cache:Ve,cacheSignal:ze,captureOwnerStack:He,cloneElement:De,createContext:Q,createElement:X,createRef:Ye,forwardRef:qe,isValidElement:We,lazy:Ge,memo:$e,startTransition:je,unstable_useCacheRefresh:Je,use:Qe,useActionState:Xe,useCallback:Ze,useContext:Z,useDebugValue:et,useDeferredValue:tt,useEffect:nt,useEffectEvent:rt,useId:it,useImperativeHandle:ot,useInsertionEffect:at,useLayoutEffect:lt,useMemo:st,useOptimistic:dt,useReducer:ut,useRef:ct,useState:c,useSyncExternalStore:mt,useTransition:pt,version:gt}=xe;var ee=Q(null),te=ee.Provider;function v(){let t=Z(ee);if(t===null)throw new Error("Antigravity UI has not been registered.");return t}var q={"insufficient-space":"runtime.errors.insufficientSpace","download-failed":"runtime.errors.downloadFailed",timeout:"runtime.errors.timeout","verification-failed":"runtime.errors.verificationFailed","extract-failed":"runtime.errors.extractFailed","validation-failed":"runtime.errors.validationFailed","activate-failed":"runtime.errors.activateFailed","install-failed":"runtime.errors.installFailed","runtime-damaged":"runtime.errors.damaged","unsupported-platform":"runtime.errors.unsupportedPlatform","no-instance":"runtime.errors.noInstance",busy:"runtime.errors.busy","remove-failed":"runtime.errors.removeFailed","runtime-installing":"runtime.removeBlocked.installing","runtime-in-use":"runtime.removeBlocked.inUse","runtime-custom-path":"runtime.removeBlocked.customPath"},ne={installing:"runtime.removeBlocked.installing","in-use":"runtime.removeBlocked.inUse","custom-path":"runtime.removeBlocked.customPath"},S={"program-unavailable":"auth.errors.programUnavailable","too-many-processes":"auth.errors.tooManyProcesses","process-exited":"auth.errors.processExited","agent-timeout":"auth.errors.agentTimeout","invalid-url":"auth.errors.invalidUrl","multiple-urls":"auth.errors.multipleUrls",expired:"auth.errors.expired",denied:"auth.errors.denied","subscription-required":"auth.errors.subscriptionRequired","sign-in-unsupported":"auth.errors.signInUnsupported","session-init-failed":"auth.errors.sessionInitFailed","sign-in-required":"auth.errors.signInRequired","callback-too-long":"auth.errors.callbackTooLong","callback-malformed":"auth.errors.callbackMalformed","callback-mismatch":"auth.errors.callbackMismatch","callback-no-response":"auth.errors.callbackNoResponse","callback-bad-issuer":"auth.errors.callbackBadIssuer","callback-already-sent":"auth.errors.callbackAlreadySent","callback-delivery-failed":"auth.errors.callbackDeliveryFailed","no-active-sign-in":"auth.errors.noActiveSignIn","sign-in-not-ready":"auth.errors.signInNotReady","logout-unsupported":"auth.errors.logoutUnsupported","logout-failed":"auth.errors.logoutFailed","refresh-failed":"auth.errors.refreshFailed",busy:"auth.errors.busy","instance-unavailable":"auth.errors.instanceUnavailable","instance-disposed":"auth.errors.instanceDisposed","sign-in-failed":"auth.errors.signInFailed"};function m(t,e,r,y={}){let d=r.code===void 0?void 0:e[r.code];return d===void 0?r.message:t(d,y)}function C(t){return(e=>X(v().ui[t],{...e,className:`ycodium-antigravity-ui ${typeof e.className=="string"?e.className:""}`}))}var s=C("Button"),re=C("Input"),ie=C("Badge"),oe=C("Alert"),ae=C("AlertDescription"),z=C("Spinner");function E(){let t=v().i18n.usePluginTranslation();return{t:(e,r)=>t(e,r)}}var{jsx:n,jsxs:o,Fragment:B}=window.__ycodiumPluginHost.jsxRuntime;function _(t){return o("section",{className:"grid gap-2",children:[n("h3",{className:"text-ui-md font-medium",children:t.title}),t.description===void 0?null:n("p",{className:"text-ui-sm text-muted-foreground",children:t.description}),t.children]})}function I(t){return n(oe,{variant:"error",children:n(ae,{"data-slot":"alert-description",children:t.text})})}function H(t){let[e,r]=c(!1);return e?o("div",{className:"grid gap-2",children:[n("p",{className:"text-ui-sm",children:t.prompt}),o("div",{className:"flex flex-wrap gap-2",children:[n(s,{size:"xs",variant:"destructive-outline",disabled:t.disabled,onClick:()=>{r(!1),t.onConfirm()},children:t.confirmLabel}),n(s,{size:"xs",variant:"ghost",onClick:()=>r(!1),children:t.cancelLabel})]})]}):n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",variant:"outline",disabled:t.disabled,onClick:()=>r(!0),children:t.label})})}var D=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);function le(t){return!D(t)||typeof t.phase!="string"||typeof t.installed!="boolean"?null:t}function se(t){return!D(t)||typeof t.phase!="string"||typeof t.signedIn!="boolean"?null:t}function de(t){return!D(t)||!Array.isArray(t.models)?null:t}function U(t){let r=(D(t)?t:void 0)?.pluginCode,y=t instanceof Error?t.message:String(t);return{code:typeof r=="string"?r:void 0,message:y}}function x(t){let e=t/1048576;return e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.max(1,Math.round(e))} MB`}function ue(t){let{t:e}=E(),r=v(),y=r.useFormatTimestamp(),d={environmentId:t.environmentId},p=r.commands.useSubscription("auth.state",{instanceId:t.instanceId},d),f=se(p.data),[N,F]=c(!1),[M,P]=c(null),[l,h]=c(""),[K,i]=c(null),[g,A]=c(null),w=async(a,u)=>{F(!0);try{return await r.commands.invoke(a,u,d)}finally{F(!1)}},b=async(a,u={})=>{P(null);try{return await w(a,{instanceId:t.instanceId,...u}),!0}catch(k){let R=U(k);return P(R),r.notify(m(e,S,R),"error"),!1}},L=async()=>{await b("auth.complete",{callbackUrl:l.trim()})&&h("")},ye=async()=>{i(null),A(null);try{i(de(await w("models.refresh",{instanceId:t.instanceId})))}catch(a){let u=U(a);A(u),r.notify(m(e,S,u),"error")}},fe=async a=>{try{await r.writeClipboard(a),r.notify(e("auth.copied"),"success")}catch{r.notify(e("auth.copyFailed"),"error")}},he=a=>{let u=a.operation,k=u!==null,R=u==="sign-in",O=R&&a.phase==="waiting"?a.authorizationUrl:null,V=N||t.readOnly,T=k?null:a.programUnavailable,W=M??(k?null:a.error),G=T!==null&&W?.code===T.code?null:W,$=R?a.phase==="waiting"?"auth.state.waiting":a.phase==="verifying"?"auth.state.verifying":"auth.state.starting":u==="sign-out"?"auth.state.signingOut":u==="refresh-models"?"auth.state.refreshing":a.phase==="cancelled"&&!a.signedIn?"auth.state.cancelled":null;return o(B,{children:[o("p",{className:"flex items-center gap-2 text-ui-md",children:[k?n(z,{className:"size-3.5"}):n(ie,{variant:a.signedIn?"success":"outline",children:e(a.signedIn?"auth.badge.signedIn":"auth.badge.signedOut")}),$===null?null:n("span",{children:e($)})]}),G===null?null:n(I,{text:m(e,S,G)}),T===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:m(e,S,T)}),O===null?null:o("div",{className:"grid gap-2",children:[n("p",{className:"text-ui-sm text-muted-foreground",children:e("auth.linkIntro")}),n("p",{className:"break-all text-ui-xs select-text",children:O}),o("div",{className:"flex flex-wrap gap-2",children:[n(s,{size:"xs",variant:"outline",onClick:()=>r.openExternal(O),children:e("auth.open")}),n(s,{size:"xs",variant:"outline",onClick:()=>{fe(O)},children:e("auth.copy")})]}),o("label",{className:"grid gap-1",children:[n("span",{className:"text-ui-sm font-medium",children:e("auth.pasteLabel")}),n(re,{value:l,onChange:Y=>h(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&l.trim().length>0&&!V&&L()},placeholder:e("auth.pastePlaceholder"),spellCheck:!1,autoComplete:"off","aria-label":e("auth.pasteLabel")})]}),n("p",{className:"text-ui-sm text-muted-foreground",children:e("auth.pasteHint")}),n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",disabled:V||l.trim().length===0,onClick:()=>{L()},children:e("auth.complete")})})]}),a.expiresAt!==null&&R?n("p",{className:"text-ui-xs text-muted-foreground",children:e("auth.expiresAt",{time:y(a.expiresAt)})}):null,o("div",{className:"flex flex-wrap gap-2",children:[!k&&!a.signedIn?n(s,{size:"xs",disabled:V||T!==null,onClick:()=>{h(""),b("auth.start")},children:e("auth.start")}):null,R?n(s,{size:"xs",variant:"outline",disabled:t.readOnly,onClick:()=>{h(""),b("auth.cancel")},children:e("auth.cancel")}):null]}),!k&&a.signedIn?n(H,{label:e("auth.logout"),prompt:e("auth.logoutConfirm"),confirmLabel:e("auth.logoutConfirmAction"),cancelLabel:e("common.cancel"),disabled:V||T!==null,onConfirm:()=>{b("auth.logout")}}):null]})},ve=p.error!==null?null:p.isUnavailable?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.unavailable")}):n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.loading")});return o(B,{children:[o(_,{title:e("auth.title"),description:e("auth.description"),children:[p.error===null?null:n(I,{text:e("common.loadFailed",{message:p.error})}),f===null?ve:he(f)]}),o(_,{title:e("models.title"),description:e("models.description"),children:[n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",variant:"outline",disabled:f===null||f.operation!==null||f.programUnavailable!==null||N||t.readOnly,onClick:()=>{ye()},children:e("models.refresh")})}),K===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:e("models.result",{count:K.models.length})}),g===null?null:n(I,{text:m(e,S,g)})]})]})}var we=new Set(["downloading","extracting","verifying"]);function ce(t){let{t:e}=E(),r=v(),y={environmentId:t.environmentId},d=r.commands.useSubscription("runtime.state",{},y),p=le(d.data),[f,N]=c(!1),[F,M]=c(null),P=async(i,g)=>{M(null),N(!0);try{await r.commands.invoke(i,g,y)}catch(A){let w=U(A);M(w),r.notify(m(e,q,w,h),"error")}finally{N(!1)}},l=p?.release??null,h={download:l===null?"":x(l.archiveBytes),installed:l===null?"":x(l.installedBytes),free:l===null?"":x(l.requiredFreeBytes),size:l===null?"":x(l.requiredFreeBytes)},K=i=>{let g=we.has(i.phase),A=l!==null&&(!i.installed||i.updateAvailable),w=g?i.phase==="downloading"?i.totalBytes===null||i.totalBytes<=0?e("runtime.state.downloadingUnknown",{done:x(i.downloadedBytes)}):e("runtime.state.downloading",{done:x(i.downloadedBytes),total:x(i.totalBytes),percent:Math.min(100,Math.floor(i.downloadedBytes*100/i.totalBytes))}):e(i.phase==="extracting"?"runtime.state.extracting":"runtime.state.verifying"):i.installed?i.updateAvailable?e("runtime.state.updateAvailable",{version:i.installedVersion??"",latest:l?.version??""}):e("runtime.state.installed",{version:i.installedVersion??""}):e(l===null?"runtime.state.unsupported":"runtime.state.notInstalled"),b=F??i.error,L=i.canRemove||i.removeBlocked!==null;return o(B,{children:[o("p",{className:"flex items-center gap-2 text-ui-md",children:[g?n(z,{className:"size-3.5"}):null,n("span",{children:w})]}),b===null||g?null:n(I,{text:m(e,q,b,h)}),A&&!g?o(B,{children:[n("p",{className:"text-ui-sm text-muted-foreground",children:e("runtime.sizes",h)}),n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",disabled:f||t.readOnly,onClick:()=>{P("runtime.install",{instanceId:t.instanceId})},children:e(i.installed?"runtime.update":"runtime.install")})})]}):null,L?o(B,{children:[n(H,{label:e("runtime.remove"),prompt:e("runtime.removeConfirm"),confirmLabel:e("runtime.removeConfirmAction"),cancelLabel:e("common.cancel"),disabled:f||t.readOnly||!i.canRemove,onConfirm:()=>{P("runtime.remove",{})}}),i.removeBlocked===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:m(e,ne,i.removeBlocked)})]}):null]})};return o(_,{title:e("runtime.title"),description:e("runtime.description"),children:[d.error===null?null:n(I,{text:e("common.loadFailed",{message:d.error})}),p!==null?K(p):d.isUnavailable?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.unavailable")}):d.error===null?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.loading")}):null]})}function me(t){let{t:e}=E();return t.placement==="add"||t.instanceId===null?n("p",{className:"ycodium-antigravity-ui text-ui-sm text-muted-foreground",children:e("add.hint")}):o("div",{className:"ycodium-antigravity-ui grid gap-6",children:[n(ce,{instanceId:t.instanceId,environmentId:t.environmentId,readOnly:t.readOnly}),n(ue,{instanceId:t.instanceId,environmentId:t.environmentId,readOnly:t.readOnly})]})}var pe=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
1
|
+
var j=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-settings"];if(!j)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PROVIDER_SETTINGS_VIEW_CAPABILITY:J,accountDirectoryCandidates:Re,accountDirectorySlug:Be,accountProbeHasSignedInAccount:Ie,allocateAccountDirectory:Ae,providerInstanceAccountPaths:Te}=j;var xe=window.__ycodiumPluginHost.react;var{Activity:Ce,Children:Ee,Component:Ne,Fragment:Pe,Profiler:_e,PureComponent:Ue,StrictMode:Fe,Suspense:Me,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Ke,__COMPILER_RUNTIME:Le,act:Oe,cache:Ve,cacheSignal:ze,captureOwnerStack:He,cloneElement:De,createContext:Q,createElement:X,createRef:Ye,forwardRef:qe,isValidElement:We,lazy:Ge,memo:$e,startTransition:je,unstable_useCacheRefresh:Je,use:Qe,useActionState:Xe,useCallback:Ze,useContext:Z,useDebugValue:et,useDeferredValue:tt,useEffect:nt,useEffectEvent:rt,useId:ot,useImperativeHandle:it,useInsertionEffect:at,useLayoutEffect:lt,useMemo:st,useOptimistic:dt,useReducer:ut,useRef:ct,useState:c,useSyncExternalStore:mt,useTransition:pt,version:gt}=xe;var ee=Q(null),te=ee.Provider;function v(){let t=Z(ee);if(t===null)throw new Error("Antigravity UI has not been registered.");return t}var q={"insufficient-space":"runtime.errors.insufficientSpace","download-failed":"runtime.errors.downloadFailed",timeout:"runtime.errors.timeout","verification-failed":"runtime.errors.verificationFailed","extract-failed":"runtime.errors.extractFailed","validation-failed":"runtime.errors.validationFailed","activate-failed":"runtime.errors.activateFailed","install-failed":"runtime.errors.installFailed","runtime-damaged":"runtime.errors.damaged","unsupported-platform":"runtime.errors.unsupportedPlatform","no-instance":"runtime.errors.noInstance",busy:"runtime.errors.busy","remove-failed":"runtime.errors.removeFailed","runtime-installing":"runtime.removeBlocked.installing","runtime-in-use":"runtime.removeBlocked.inUse","runtime-custom-path":"runtime.removeBlocked.customPath"},ne={installing:"runtime.removeBlocked.installing","in-use":"runtime.removeBlocked.inUse","custom-path":"runtime.removeBlocked.customPath"},S={"program-unavailable":"auth.errors.programUnavailable","too-many-processes":"auth.errors.tooManyProcesses","process-exited":"auth.errors.processExited","agent-timeout":"auth.errors.agentTimeout","invalid-url":"auth.errors.invalidUrl","multiple-urls":"auth.errors.multipleUrls",expired:"auth.errors.expired",denied:"auth.errors.denied","subscription-required":"auth.errors.subscriptionRequired","sign-in-unsupported":"auth.errors.signInUnsupported","session-init-failed":"auth.errors.sessionInitFailed","sign-in-required":"auth.errors.signInRequired","callback-too-long":"auth.errors.callbackTooLong","callback-malformed":"auth.errors.callbackMalformed","callback-mismatch":"auth.errors.callbackMismatch","callback-no-response":"auth.errors.callbackNoResponse","callback-bad-issuer":"auth.errors.callbackBadIssuer","callback-already-sent":"auth.errors.callbackAlreadySent","callback-delivery-failed":"auth.errors.callbackDeliveryFailed","no-active-sign-in":"auth.errors.noActiveSignIn","sign-in-not-ready":"auth.errors.signInNotReady","logout-unsupported":"auth.errors.logoutUnsupported","logout-failed":"auth.errors.logoutFailed","refresh-failed":"auth.errors.refreshFailed",busy:"auth.errors.busy","instance-unavailable":"auth.errors.instanceUnavailable","instance-disposed":"auth.errors.instanceDisposed","sign-in-failed":"auth.errors.signInFailed"};function m(t,e,r,y={}){let d=r.code===void 0?void 0:e[r.code];return d===void 0?r.message:t(d,y)}function C(t){return(e=>X(v().ui[t],{...e,className:`ycodium-antigravity-ui ${typeof e.className=="string"?e.className:""}`}))}var s=C("Button"),re=C("Input"),oe=C("Badge"),ie=C("Alert"),ae=C("AlertDescription"),z=C("Spinner");function E(){let t=v().i18n.usePluginTranslation();return{t:(e,r)=>t(e,r)}}var{jsx:n,jsxs:i,Fragment:B}=window.__ycodiumPluginHost.jsxRuntime;function _(t){return i("section",{className:"grid gap-2",children:[n("h3",{className:"text-ui-md font-medium",children:t.title}),t.description===void 0?null:n("p",{className:"text-ui-sm text-muted-foreground",children:t.description}),t.children]})}function I(t){return n(ie,{variant:"error",children:n(ae,{"data-slot":"alert-description",children:t.text})})}function H(t){let[e,r]=c(!1);return e?i("div",{className:"grid gap-2",children:[n("p",{className:"text-ui-sm",children:t.prompt}),i("div",{className:"flex flex-wrap gap-2",children:[n(s,{size:"xs",variant:"destructive-outline",disabled:t.disabled,onClick:()=>{r(!1),t.onConfirm()},children:t.confirmLabel}),n(s,{size:"xs",variant:"ghost",onClick:()=>r(!1),children:t.cancelLabel})]})]}):n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",variant:"outline",disabled:t.disabled,onClick:()=>r(!0),children:t.label})})}var D=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);function le(t){return!D(t)||typeof t.phase!="string"||typeof t.installed!="boolean"?null:t}function se(t){return!D(t)||typeof t.phase!="string"||typeof t.signedIn!="boolean"?null:t}function de(t){return!D(t)||!Array.isArray(t.models)?null:t}function U(t){let r=(D(t)?t:void 0)?.pluginCode,y=t instanceof Error?t.message:String(t);return{code:typeof r=="string"?r:void 0,message:y}}function x(t){let e=t/1048576;return e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.max(1,Math.round(e))} MB`}function ue(t){let{t:e}=E(),r=v(),y=r.useFormatTimestamp(),d={environmentId:t.environmentId},p=r.commands.useSubscription("auth.state",{instanceId:t.instanceId},d),f=se(p.data),[N,F]=c(!1),[M,P]=c(null),[l,h]=c(""),[K,o]=c(null),[g,A]=c(null),b=async(a,u)=>{F(!0);try{return await r.commands.invoke(a,u,d)}finally{F(!1)}},w=async(a,u={})=>{P(null);try{return await b(a,{instanceId:t.instanceId,...u}),!0}catch(k){let R=U(k);return P(R),r.notify(m(e,S,R),"error"),!1}},L=async()=>{await w("auth.complete",{callbackUrl:l.trim()})&&h("")},ye=async()=>{o(null),A(null);try{o(de(await b("models.refresh",{instanceId:t.instanceId})))}catch(a){let u=U(a);A(u),r.notify(m(e,S,u),"error")}},fe=async a=>{try{await r.writeClipboard(a),r.notify(e("auth.copied"),"success")}catch{r.notify(e("auth.copyFailed"),"error")}},he=a=>{let u=a.operation,k=u!==null,R=u==="sign-in",O=R&&a.phase==="waiting"?a.authorizationUrl:null,V=N||t.readOnly,T=k?null:a.programUnavailable,W=M??(k?null:a.error),G=T!==null&&W?.code===T.code?null:W,$=R?a.phase==="waiting"?"auth.state.waiting":a.phase==="verifying"?"auth.state.verifying":"auth.state.starting":u==="sign-out"?"auth.state.signingOut":u==="refresh-models"?"auth.state.refreshing":a.phase==="cancelled"&&!a.signedIn?"auth.state.cancelled":null;return i(B,{children:[i("p",{className:"flex items-center gap-2 text-ui-md",children:[k?n(z,{className:"size-3.5"}):n(oe,{variant:a.signedIn?"success":"outline",children:e(a.signedIn?"auth.badge.signedIn":"auth.badge.signedOut")}),$===null?null:n("span",{children:e($)})]}),G===null?null:n(I,{text:m(e,S,G)}),T===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:m(e,S,T)}),O===null?null:i("div",{className:"grid gap-2",children:[n("p",{className:"text-ui-sm text-muted-foreground",children:e("auth.linkIntro")}),n("p",{className:"break-all text-ui-xs select-text",children:O}),i("div",{className:"flex flex-wrap gap-2",children:[n(s,{size:"xs",variant:"outline",onClick:()=>r.openExternal(O),children:e("auth.open")}),n(s,{size:"xs",variant:"outline",onClick:()=>{fe(O)},children:e("auth.copy")})]}),i("label",{className:"grid gap-1",children:[n("span",{className:"text-ui-sm font-medium",children:e("auth.pasteLabel")}),n(re,{value:l,onChange:Y=>h(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&l.trim().length>0&&!V&&L()},placeholder:e("auth.pastePlaceholder"),spellCheck:!1,autoComplete:"off","aria-label":e("auth.pasteLabel")})]}),n("p",{className:"text-ui-sm text-muted-foreground",children:e("auth.pasteHint")}),n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",disabled:V||l.trim().length===0,onClick:()=>{L()},children:e("auth.complete")})})]}),a.expiresAt!==null&&R?n("p",{className:"text-ui-xs text-muted-foreground",children:e("auth.expiresAt",{time:y(a.expiresAt)})}):null,i("div",{className:"flex flex-wrap gap-2",children:[!k&&!a.signedIn?n(s,{size:"xs",disabled:V||T!==null,onClick:()=>{h(""),w("auth.start")},children:e("auth.start")}):null,R?n(s,{size:"xs",variant:"outline",disabled:t.readOnly,onClick:()=>{h(""),w("auth.cancel")},children:e("auth.cancel")}):null]}),!k&&a.signedIn?n(H,{label:e("auth.logout"),prompt:e("auth.logoutConfirm"),confirmLabel:e("auth.logoutConfirmAction"),cancelLabel:e("common.cancel"),disabled:V||T!==null,onConfirm:()=>{w("auth.logout")}}):null]})},ve=p.error!==null?null:p.isUnavailable?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.unavailable")}):n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.loading")});return i(B,{children:[i(_,{title:e("auth.title"),description:e("auth.description"),children:[p.error===null?null:n(I,{text:e("common.loadFailed",{message:p.error})}),f===null?ve:he(f)]}),i(_,{title:e("models.title"),description:e("models.description"),children:[n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",variant:"outline",disabled:f===null||f.operation!==null||f.programUnavailable!==null||N||t.readOnly,onClick:()=>{ye()},children:e("models.refresh")})}),K===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:e("models.result",{count:K.models.length})}),g===null?null:n(I,{text:m(e,S,g)})]})]})}var be=new Set(["downloading","extracting","verifying"]);function ce(t){let{t:e}=E(),r=v(),y={environmentId:t.environmentId},d=r.commands.useSubscription("runtime.state",{},y),p=le(d.data),[f,N]=c(!1),[F,M]=c(null),P=async(o,g)=>{M(null),N(!0);try{await r.commands.invoke(o,g,y)}catch(A){let b=U(A);M(b),r.notify(m(e,q,b,h),"error")}finally{N(!1)}},l=p?.release??null,h={download:l===null?"":x(l.archiveBytes),installed:l===null?"":x(l.installedBytes),free:l===null?"":x(l.requiredFreeBytes),size:l===null?"":x(l.requiredFreeBytes)},K=o=>{let g=be.has(o.phase),A=l!==null&&(!o.installed||o.updateAvailable),b=g?o.phase==="downloading"?o.totalBytes===null||o.totalBytes<=0?e("runtime.state.downloadingUnknown",{done:x(o.downloadedBytes)}):e("runtime.state.downloading",{done:x(o.downloadedBytes),total:x(o.totalBytes),percent:Math.min(100,Math.floor(o.downloadedBytes*100/o.totalBytes))}):e(o.phase==="extracting"?"runtime.state.extracting":"runtime.state.verifying"):o.installed?o.updateAvailable?e("runtime.state.updateAvailable",{version:o.installedVersion??"",latest:l?.version??""}):e("runtime.state.installed",{version:o.installedVersion??""}):e(l===null?"runtime.state.unsupported":"runtime.state.notInstalled"),w=F??o.error,L=o.canRemove||o.removeBlocked!==null;return i(B,{children:[i("p",{className:"flex items-center gap-2 text-ui-md",children:[g?n(z,{className:"size-3.5"}):null,n("span",{children:b})]}),w===null||g?null:n(I,{text:m(e,q,w,h)}),A&&!g?i(B,{children:[n("p",{className:"text-ui-sm text-muted-foreground",children:e("runtime.sizes",h)}),n("div",{className:"flex flex-wrap gap-2",children:n(s,{size:"xs",disabled:f||t.readOnly,onClick:()=>{P("runtime.install",{instanceId:t.instanceId})},children:e(o.installed?"runtime.update":"runtime.install")})})]}):null,L?i(B,{children:[n(H,{label:e("runtime.remove"),prompt:e("runtime.removeConfirm"),confirmLabel:e("runtime.removeConfirmAction"),cancelLabel:e("common.cancel"),disabled:f||t.readOnly||!o.canRemove,onConfirm:()=>{P("runtime.remove",{})}}),o.removeBlocked===null?null:n("p",{className:"text-ui-sm text-muted-foreground",children:m(e,ne,o.removeBlocked)})]}):null]})};return i(_,{title:e("runtime.title"),description:e("runtime.description"),children:[d.error===null?null:n(I,{text:e("common.loadFailed",{message:d.error})}),p!==null?K(p):d.isUnavailable?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.unavailable")}):d.error===null?n("p",{className:"text-ui-sm text-muted-foreground",children:e("common.loading")}):null]})}function me(t){let{t:e}=E();return t.placement==="add"||t.instanceId===null?n("p",{className:"ycodium-antigravity-ui text-ui-sm text-muted-foreground",children:e("add.hint")}):i("div",{className:"ycodium-antigravity-ui grid gap-6",children:[n(ce,{instanceId:t.instanceId,environmentId:t.environmentId,readOnly:t.readOnly}),n(ue,{instanceId:t.instanceId,environmentId:t.environmentId,readOnly:t.readOnly})]})}var pe=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties, theme, base, components, utilities;
|
|
3
3
|
@layer properties;
|
|
4
4
|
@layer utilities {
|
|
@@ -6,24 +6,6 @@ var j=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-sett
|
|
|
6
6
|
.fixed:where(:scope, *) {
|
|
7
7
|
position: fixed;
|
|
8
8
|
}
|
|
9
|
-
.container:where(:scope, *) {
|
|
10
|
-
width: 100%;
|
|
11
|
-
@media (width >= 40rem) {
|
|
12
|
-
max-width: 40rem;
|
|
13
|
-
}
|
|
14
|
-
@media (width >= 48rem) {
|
|
15
|
-
max-width: 48rem;
|
|
16
|
-
}
|
|
17
|
-
@media (width >= 64rem) {
|
|
18
|
-
max-width: 64rem;
|
|
19
|
-
}
|
|
20
|
-
@media (width >= 80rem) {
|
|
21
|
-
max-width: 80rem;
|
|
22
|
-
}
|
|
23
|
-
@media (width >= 96rem) {
|
|
24
|
-
max-width: 96rem;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
9
|
.flex:where(:scope, *) {
|
|
28
10
|
display: flex;
|
|
29
11
|
}
|
|
@@ -92,4 +74,4 @@ var j=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-sett
|
|
|
92
74
|
}
|
|
93
75
|
}
|
|
94
76
|
}
|
|
95
|
-
`;var ge="setup";function ke(t){let e=r=>
|
|
77
|
+
`;var ge="setup";function ke(t){let e=r=>i(te,{value:t,children:[n("style",{children:pe}),n(me,{...r})]});return{pages:{},panels:{},views:{[ge]:e},viewCapabilities:{[ge]:[J]}}}export{ge as ANTIGRAVITY_SETUP_SECTION_ID,ke as default};
|