conductor-oss 0.3.0 → 0.3.1
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/node_modules/@conductor-oss/core/dist/types.d.ts.map +1 -1
- package/node_modules/@conductor-oss/core/dist/types.js +3 -1
- package/node_modules/@conductor-oss/core/dist/types.js.map +1 -1
- package/node_modules/@conductor-oss/plugin-agent-amp/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-ccr/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-claude-code/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-codex/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-cursor-cli/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-droid/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-gemini/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-github-copilot/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-opencode/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-agent-qwen-code/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-mcp-server/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-notifier-desktop/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-notifier-discord/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-runtime-tmux/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-scm-github/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-terminal-web/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-tracker-github/package.json +1 -1
- package/node_modules/@conductor-oss/plugin-workspace-worktree/package.json +1 -1
- package/package.json +23 -23
- package/web/.next/standalone/packages/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/packages/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/packages/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found/page/server-reference-manifest.json +7 -7
- package/web/.next/standalone/packages/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.rsc +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/index.rsc +3 -3
- package/web/.next/standalone/packages/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/web/.next/standalone/packages/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/web/.next/standalone/packages/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/page/server-reference-manifest.json +7 -7
- package/web/.next/standalone/packages/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sessions/[id]/page/server-reference-manifest.json +7 -7
- package/web/.next/standalone/packages/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/[[...sign-in]]/page/server-reference-manifest.json +7 -7
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/[[...sign-in]]/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/[[...sign-in]]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/unlock/page/server-reference-manifest.json +7 -7
- package/web/.next/standalone/packages/web/.next/server/app/unlock/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/unlock/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/[root-of-the-server]__14949257._.js +4 -4
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/[root-of-the-server]__6622b514._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/[root-of-the-server]__869d9ac0._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/[root-of-the-server]__b388693f._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/{[root-of-the-server]__3fa9033c._.js → [root-of-the-server]__c3eb4913._.js} +2 -2
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_0e1412de._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/{_7677a7eb._.js → _3acfb388._.js} +2 -2
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/{_fbb4738c._.js → _668c9201._.js} +2 -2
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_69e05fca._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_80efe193._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_b6d31783._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_c0f0e227._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/_f36ddaa9._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/{node_modules_@clerk_nextjs_dist_esm_app-router_a7198aa1._.js → node_modules_@clerk_nextjs_dist_esm_app-router_129dde21._.js} +2 -2
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_1776df7f._.js +3 -0
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/node_modules_f2ebd7a9._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/{packages_web_src_components_73b876ad._.js → packages_web_src_components_aad7de7c._.js} +1 -1
- package/web/.next/standalone/packages/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/packages/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/packages/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/server-reference-manifest.json +8 -8
- package/web/.next/standalone/packages/web/.next/static/chunks/{b3d2f9a3c2a31b09.js → 07a5ac7389686572.js} +1 -1
- package/web/.next/{static/chunks/9f7a0f79147b60c8.js → standalone/packages/web/.next/static/chunks/3603312f8407bd12.js} +1 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/{edb1bf1dd617f3d6.js → 382be8f0b30c5f08.js} +1 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/53e4f3b495e423c9.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/{f83c5e5b4a7ece08.js → 5c5637796e242130.js} +2 -2
- package/web/.next/standalone/packages/web/.next/static/chunks/{1b825c5c6412ffea.js → 5e05e67a26b7ecbc.js} +1 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/c7c1bd729f17c8bf.js +1 -0
- package/web/.next/{static/chunks/677af9130f0e0430.js → standalone/packages/web/.next/static/chunks/e8d146cc2723147b.js} +1 -1
- package/web/.next/standalone/packages/web/src/features/dashboard/DashboardClient.tsx +0 -14
- package/web/.next/standalone/packages/web/src/lib/runtimeAgentModels.ts +1 -1
- package/web/.next/standalone/packages/web/src/lib/rustBackendProxy.ts +61 -1
- package/web/.next/static/chunks/{b3d2f9a3c2a31b09.js → 07a5ac7389686572.js} +1 -1
- package/web/.next/{standalone/packages/web/.next/static/chunks/9f7a0f79147b60c8.js → static/chunks/3603312f8407bd12.js} +1 -1
- package/web/.next/static/chunks/{edb1bf1dd617f3d6.js → 382be8f0b30c5f08.js} +1 -1
- package/web/.next/static/chunks/53e4f3b495e423c9.js +1 -0
- package/web/.next/static/chunks/{f83c5e5b4a7ece08.js → 5c5637796e242130.js} +2 -2
- package/web/.next/static/chunks/{1b825c5c6412ffea.js → 5e05e67a26b7ecbc.js} +1 -1
- package/web/.next/static/chunks/c7c1bd729f17c8bf.js +1 -0
- package/web/.next/{standalone/packages/web/.next/static/chunks/677af9130f0e0430.js → static/chunks/e8d146cc2723147b.js} +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_be826890._.js +0 -3
- package/web/.next/standalone/packages/web/.next/static/chunks/6060a9e792ca20e9.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/9442ca926d25e16d.js +0 -1
- package/web/.next/static/chunks/6060a9e792ca20e9.js +0 -1
- package/web/.next/static/chunks/9442ca926d25e16d.js +0 -1
- /package/web/.next/standalone/packages/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_buildManifest.js +0 -0
- /package/web/.next/standalone/packages/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/packages/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_ssgManifest.js +0 -0
- /package/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_buildManifest.js +0 -0
- /package/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{e49CDY4d0gPQtcy9IRzk2 → oFTStwDpHHac4pinj0rAJ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}function i(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>i])},30030,e=>{"use strict";var t=e.i(71645),r=e.i(18050);function n(e,i=[]){let o=[],s=()=>{let r=o.map(e=>t.createContext(e));return function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return s.scopeName=e,[function(n,i){let s=t.createContext(i),a=o.length;o=[...o,i];let l=n=>{let{scope:i,children:o,...l}=n,c=i?.[e]?.[a]||s,u=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(r,o){let l=o?.[e]?.[a]||s,c=t.useContext(l);if(c)return c;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}(s,...i)]}e.s(["createContextScope",()=>n])},34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r])},69340,e=>{"use strict";var t=e.i(71645),r=e.i(34620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function i({prop:e,defaultProp:r,onChange:i=()=>{},caller:o}){let[s,a,l]=function({defaultProp:e,onChange:r}){let[i,o]=t.useState(e),s=t.useRef(i),a=t.useRef(r);return n(()=>{a.current=r},[r]),t.useEffect(()=>{s.current!==i&&(a.current?.(i),s.current=i)},[i,s]),[i,o,a]}({defaultProp:r,onChange:i}),c=void 0!==e,u=c?e:s;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=c},[c,o])}return[u,t.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else a(t)},[c,e,a,l])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>i],69340)},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(20783),i=e.i(18050),o=Symbol("radix.slottable");function s(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var o,a;let l,c,u,d=(a=o=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,c)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,c=l,(u=t.forwardRef((e,r)=>{let{children:n,...o}=e,a=t.Children.toArray(n),l=a.find(s);if(l){let e=l.props.children,n=a.map(r=>r!==l?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(c,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(c,{...o,ref:r,children:n})})).displayName=`${o}.Slot`,u),f=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?d:r,{...o,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});function l(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>a,"dispatchDiscreteCustomEvent",()=>l],48425)},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),i=e.i(18050);function o(e){var r;let o,s=(r=e,(o=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,c)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,o),l=t.forwardRef((e,r)=>{let{children:n,...o}=e,l=t.Children.toArray(n),c=l.find(a);if(c){let e=c.props.children,n=l.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(s,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...o,ref:r,children:n})});return l.displayName=`${e}.Slot`,l}var s=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}function l(e){let s=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(s),[c,u]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:s,collectionRef:o,children:n})};d.displayName=s;let f=e+"CollectionSlot",p=o(f),m=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,s=u(f,r),a=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(p,{ref:a,children:o})});m.displayName=f;let h=e+"CollectionItemSlot",g="data-radix-collection-item",y=o(h),v=t.default.forwardRef((e,r)=>{let{scope:o,children:s,...a}=e,l=t.default.useRef(null),c=(0,n.useComposedRefs)(r,l),d=u(h,o);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),(0,i.jsx)(y,{...{[g]:""},ref:c,children:s})});return v.displayName=h,[{Provider:d,Slot:m,ItemSlot:v},function(r){let n=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var c=new WeakMap;function u(e,t){var r,n;let i,o,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(s=(o=d(n))>=0?o:i+o)<0||s>=i?-1:s);return -1===a?void 0:e[a]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],c.set(this,!0)}set(e,t){return c.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,s=d(e),a=s>=0?s:o+s,l=a<0||a>=o?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!i;s<0&&a++;let u=[...this.#e],f=!1;for(let e=a;e<c;e++)if(a===e){let o=u[e];u[e]===t&&(o=u[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=u(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=u(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return u(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l],75830)},86318,e=>{"use strict";var t=e.i(71645);e.i(18050);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},30207,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},10772,e=>{"use strict";var t=e.i(71645),r=e.i(34620),n=t[" useId ".trim().toString()]||(()=>void 0),i=0;function o(e){let[o,s]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||s(e=>e??String(i++))},[e]),e||(o?`radix-${o}`:"")}e.s(["useId",()=>o])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),i=e=>{var i;let s,a,{present:l,children:c}=e,u=function(e){var r,i;let[s,a]=t.useState(),l=t.useRef(null),c=t.useRef(e),u=t.useRef("none"),[d,f]=(r=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>i[e][t]??e,r));return t.useEffect(()=>{let e=o(l.current);u.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=c.current;if(r!==e){let n=u.current,i=o(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let n=o(l.current).includes(CSS.escape(r.animationName));if(r.target===s&&n&&(f("ANIMATION_END"),!c.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},n=e=>{e.target===s&&(u.current=o(l.current))};return s.addEventListener("animationstart",n),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",n),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}f("ANIMATION_END")},[s,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(l),d="function"==typeof c?c({present:u.isPresent}):t.Children.only(c),f=(0,r.useComposedRefs)(u.ref,(i=d,(a=(s=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.ref:(a=(s=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.props.ref:i.props.ref||i.ref));return"function"==typeof c||u.isPresent?t.cloneElement(d,{ref:f}):null};function o(e){return e?.animationName||"none"}i.displayName="Presence",e.s(["Presence",()=>i])},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(75830),i=e.i(20783),o=e.i(30030),s=e.i(10772),a=e.i(48425),l=e.i(30207),c=e.i(69340),u=e.i(86318),d=e.i(18050),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[h,g,y]=(0,n.createCollection)(m),[v,x]=(0,o.createContextScope)(m,[y]),[w,C]=v(m),b=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(A,{...e,ref:t})})}));b.displayName=m;var A=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:h=!1,dir:y,currentTabStopId:v,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:C,onEntryFocus:b,preventScrollOnEntryFocus:A=!1,...k}=e,R=t.useRef(null),S=(0,i.useComposedRefs)(n,R),P=(0,u.useDirection)(y),[M,O]=(0,c.useControllableState)({prop:v,defaultProp:x??null,onChange:C,caller:m}),[T,N]=t.useState(!1),I=(0,l.useCallbackRef)(b),G=g(o),j=t.useRef(!1),[D,B]=t.useState(0);return t.useEffect(()=>{let e=R.current;if(e)return e.addEventListener(f,I),()=>e.removeEventListener(f,I)},[I]),(0,d.jsx)(w,{scope:o,orientation:s,dir:P,loop:h,currentTabStopId:M,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>B(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>B(e=>e-1),[]),children:(0,d.jsx)(a.Primitive.div,{tabIndex:T||0===D?-1:0,"data-orientation":s,...k,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!T){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=G().filter(e=>e.focusable);E([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),A)}}j.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>N(!1))})})}),k="RovingFocusGroupItem",R=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:u,...f}=e,p=(0,s.useId)(),m=c||p,y=C(k,i),v=y.currentTabStopId===m,x=g(i),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:A}=y;return t.useEffect(()=>{if(o)return w(),()=>b()},[o,w,b]),(0,d.jsx)(h.ItemSlot,{scope:i,id:m,focusable:o,active:l,children:(0,d.jsx)(a.Primitive.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?y.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return S[i]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=y.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>E(i))}}),children:"function"==typeof u?u({isCurrentTabStop:v,hasTabStop:null!=A}):u})})});R.displayName=k;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>R,"Root",()=>b,"createRovingFocusGroupScope",()=>x])},37766,e=>{"use strict";let t=["claude-code","codex","gemini","qwen-code"],r={claudeCode:"pro",codex:"chatgpt",gemini:"oauth",qwenCode:"oauth"},n={"claude-code":{agent:"claude-code",label:"Claude Code",accessKey:"claudeCode",defaultAccess:"pro",accessOptions:[{id:"pro",label:"Claude Pro",description:"Shows the current Sonnet models that Claude Code documents for Pro usage."},{id:"max",label:"Claude Max",description:"Unlocks both Sonnet and Opus model choices in Claude Code."},{id:"api",label:"Anthropic API",description:"Use direct Anthropic API credentials instead of a Claude subscription."}]},codex:{agent:"codex",label:"Codex",accessKey:"codex",defaultAccess:"chatgpt",accessOptions:[{id:"chatgpt",label:"ChatGPT Plan",description:"Use the ChatGPT-backed Codex login flow for paid ChatGPT workspaces."},{id:"api",label:"OpenAI API",description:"Use direct OpenAI API credentials when Codex is pointed at the API."}]},gemini:{agent:"gemini",label:"Gemini",accessKey:"gemini",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Google Login",description:"Use the built-in Google account flow that Gemini CLI ships with."},{id:"api",label:"Gemini API",description:"Use a Gemini API key or Vertex AI project for broader model control."}]},"qwen-code":{agent:"qwen-code",label:"Qwen Code",accessKey:"qwenCode",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Qwen OAuth",description:"Use Qwen Code's built-in browser login and bundled provider defaults."},{id:"api",label:"DashScope / Custom API",description:"Use DashScope or another OpenAI-compatible endpoint configured for Qwen Code."}]}},i=[{id:"low",label:"Low",description:"Fast responses with lighter reasoning."},{id:"medium",label:"Medium",description:"Balanced speed and reasoning depth for everyday tasks."},{id:"high",label:"High",description:"Deeper reasoning for more complex tasks."}],o=[...i,{id:"xhigh",label:"Extra High",description:"Maximum reasoning depth for the hardest tasks."}];function s(e,t,r,n=function(e){return e.trim().split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":e[0]?.toUpperCase()+e.slice(1)).join(" ")}(e)){return{id:e,label:n,description:t,access:r}}let a={"claude-code":{modelsByAccess:{pro:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6")],max:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6")],api:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude API model for lightweight tasks.",["api"],"Claude Haiku 4.5")]},defaultModelByAccess:{pro:"claude-sonnet-4-6",max:"claude-opus-4-6",api:"claude-sonnet-4-6"},reasoningOptionsByAccess:{pro:i,max:i,api:i},defaultReasoningByAccess:{pro:"medium",max:"high",api:"medium"}},codex:{modelsByAccess:{chatgpt:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.3-codex-spark","Fast Codex model optimized for rapid iteration.",["chatgpt"],"GPT-5.3-Codex-Spark"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")],api:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")]},defaultModelByAccess:{chatgpt:"gpt-5.4",api:"gpt-5.4"},reasoningOptionsByAccess:{chatgpt:o,api:o},defaultReasoningByAccess:{chatgpt:"high",api:"high"}},gemini:{modelsByAccess:{oauth:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")],api:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")]},defaultModelByAccess:{oauth:"gemini-3.1-pro-preview",api:"gemini-3.1-pro-preview"}},"qwen-code":{modelsByAccess:{oauth:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")],api:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")]},defaultModelByAccess:{oauth:"coder-model",api:"coder-model"}}};function l(e){let r=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return t.includes(r)?r:null}function c(){return{...r}}function u(e){return null!==l(e)}function d(e){let t=l(e);return t?n[t]:null}function f(e,t){let r=d(e);if(!r)return null;let n=t?.[r.accessKey];return"string"==typeof n&&r.accessOptions.some(e=>e.id===n)?n:r.defaultAccess}function p(e,t){let r=l(e);if(!r)return[];let n=f(r,t);if(!n)return[];let i=a[r],o=i.modelsByAccess[n]??[];if(o.length>0)return[...o];let s=[],c=new Set;for(let e of Object.values(i.modelsByAccess))if(Array.isArray(e))for(let t of e)c.has(t.id)||(c.add(t.id),s.push(t));return s}function m(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultModelByAccess[n]??null:null}function h(e,t){let r=l(e);if(!r)return[];let n=f(r,t);return n?a[r].reasoningOptionsByAccess?.[n]??[]:[]}function g(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultReasoningByAccess?.[n]??null:null}e.s(["getAgentModelCatalog",()=>d,"getAvailableAgentModels",()=>p,"getAvailableAgentReasoningEfforts",()=>h,"getDefaultAgentModel",()=>m,"getDefaultAgentReasoningEffort",()=>g,"getDefaultModelAccessPreferences",()=>c,"resolveAgentModelAccess",()=>f,"supportsAgentModelSelection",()=>u])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},75505,e=>{"use strict";let t=(0,e.i(75254).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],75505)},90272,e=>{"use strict";let t=(0,e.i(75254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],90272)},82735,e=>{"use strict";let t=(0,e.i(75254).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",()=>t],82735)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},81633,e=>{"use strict";function t(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}e.s(["normalizeAgentName",()=>t])},97878,e=>{"use strict";let t=new Set,r=null,n=null;function i(e){return Array.isArray(e)?{type:"snapshot",sessions:e}:e&&"object"==typeof e&&"snapshot"===e.type&&Array.isArray(e.sessions)?e:null}function o(e){for(let r of t)r(e)}async function s(){if("function"!=typeof fetch)return;let e=(async()=>{try{let e=await fetch("/api/sessions");if(!e.ok)return;let t=await e.json().catch(()=>null),r=i(t);if(!r)return;o(r)}catch{}})();n=e.finally(()=>{n===e&&(n=null)}),await e}function a(e){return t.add(e),!r&&"u">typeof EventSource&&((r=new EventSource("/api/events")).onmessage=e=>{try{let t=i(JSON.parse(e.data));if(!t)return;o(t)}catch{}},r.addEventListener("refresh",()=>{n||s()}),r.onerror=()=>{0===t.size&&(r?.close(),r=null)}),()=>{t.delete(e),0===t.size&&r&&(r.close(),r=null)}}e.s(["subscribeToSnapshotEvents",()=>a])},78818,e=>{"use strict";var t=e.i(71645);let r=new Set,n=[],i=!0,o=0,s=null,a=null;function l(){for(let e of r)e()}function c(){return{agents:n,loading:i}}function u(){return n.length>0&&Date.now()-o<3e4}function d(){null===a&&(a=window.setTimeout(()=>{a=null,f(!0)},1e4))}async function f(e=!1){if(!e&&u()){i&&(i=!1,l());return}return s||(i=!0,l(),s=(async()=>{try{var e;let t=await fetch("/api/agents",{cache:"no-store"});if(!t.ok)throw Error(`Failed to fetch agents: ${t.status}`);let r=(e=await t.json(),Array.isArray(e)?e:e&&"object"==typeof e&&"agents"in e&&Array.isArray(e.agents)?e.agents:[]);r.length>0?(n=r,o=Date.now(),null!==a&&(window.clearTimeout(a),a=null)):d()}catch{d()}finally{i=!1,s=null,l()}})())}function p(){let[e,n]=(0,t.useState)(()=>c());return(0,t.useEffect)(()=>{let e=()=>n(c());r.add(e),e(),f();let t=()=>{u()||f(!0)},i=()=>{"visible"!==document.visibilityState||u()||f(!0)};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",i),()=>{r.delete(e),window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",i)}},[]),e}e.s(["useAgents",()=>p])},52808,e=>{"use strict";let t=new Set(["archived","done","killed","errored","terminated","merged","cleanup"]);function r(e){return"merged"===e.status||"archived"===e.status||"killed"===e.status||"errored"===e.status||"cleanup"===e.status||"done"===e.status||"terminated"===e.status||e.pr&&("merged"===e.pr.state||"closed"===e.pr.state)?"done":"mergeable"===e.status||"approved"===e.status||e.pr?.mergeability.mergeable?"merge":"waiting_input"===e.activity||"blocked"===e.activity||"needs_input"===e.status||"stuck"===e.status||"exited"===e.activity?"respond":"ci_failed"===e.status||"changes_requested"===e.status||e.pr&&("failing"===e.pr.ciStatus||"changes_requested"===e.pr.reviewDecision||!e.pr.mergeability.noConflicts)?"review":"review_pending"===e.status||e.pr&&!e.pr.isDraft&&("pending"===e.pr.reviewDecision||"none"===e.pr.reviewDecision)?"pending":"working"}e.s(["TERMINAL_STATUSES",0,t,"getAttentionLevel",()=>r])},55716,e=>{"use strict";let t=(0,e.i(75254).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",()=>t],55716)},17442,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)]",success:"border-transparent bg-transparent text-[var(--vk-green)]",warning:"border-transparent bg-transparent text-[var(--vk-orange)]",error:"border-transparent bg-transparent text-[var(--vk-red)]",info:"border-transparent bg-transparent text-[var(--vk-text-muted)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-muted)]"};function i({variant:e="default",className:i,children:o}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-flex items-center gap-1 rounded-[3px] border px-1.5 py-0.5 text-[11px] leading-none",n[e],i),children:o})}e.s(["Badge",()=>i])},90993,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n=(0,e.i(71645).forwardRef)(({className:e,...n},i)=>(0,t.jsx)("div",{ref:i,className:(0,r.cn)("surface-card rounded-[var(--radius-md)] border",e),...n}));function i({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center gap-2 border-b border-[var(--vk-border)] px-3 py-2",e),...n})}function o({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("px-3 py-2",e),...n})}n.displayName="Card",e.s(["Card",0,n,"CardContent",()=>o,"CardHeader",()=>i])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}function i(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>i])},30030,e=>{"use strict";var t=e.i(71645),r=e.i(18050);function n(e,i=[]){let o=[],s=()=>{let r=o.map(e=>t.createContext(e));return function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return s.scopeName=e,[function(n,i){let s=t.createContext(i),a=o.length;o=[...o,i];let l=n=>{let{scope:i,children:o,...l}=n,u=i?.[e]?.[a]||s,c=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(u.Provider,{value:c,children:o})};return l.displayName=n+"Provider",[l,function(r,o){let l=o?.[e]?.[a]||s,u=t.useContext(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}(s,...i)]}e.s(["createContextScope",()=>n])},34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r])},69340,e=>{"use strict";var t=e.i(71645),r=e.i(34620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function i({prop:e,defaultProp:r,onChange:i=()=>{},caller:o}){let[s,a,l]=function({defaultProp:e,onChange:r}){let[i,o]=t.useState(e),s=t.useRef(i),a=t.useRef(r);return n(()=>{a.current=r},[r]),t.useEffect(()=>{s.current!==i&&(a.current?.(i),s.current=i)},[i,s]),[i,o,a]}({defaultProp:r,onChange:i}),u=void 0!==e,c=u?e:s;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==u){let t=u?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=u},[u,o])}return[c,t.useCallback(t=>{if(u){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else a(t)},[u,e,a,l])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>i],69340)},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(20783),i=e.i(18050),o=Symbol("radix.slottable");function s(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var o,a;let l,u,c,d=(a=o=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(u.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,u=l,(c=t.forwardRef((e,r)=>{let{children:n,...o}=e,a=t.Children.toArray(n),l=a.find(s);if(l){let e=l.props.children,n=a.map(r=>r!==l?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(u,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(u,{...o,ref:r,children:n})})).displayName=`${o}.Slot`,c),f=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?d:r,{...o,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});function l(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>a,"dispatchDiscreteCustomEvent",()=>l],48425)},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),i=e.i(18050);function o(e){var r;let o,s=(r=e,(o=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(u.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,o),l=t.forwardRef((e,r)=>{let{children:n,...o}=e,l=t.Children.toArray(n),u=l.find(a);if(u){let e=u.props.children,n=l.map(r=>r!==u?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(s,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...o,ref:r,children:n})});return l.displayName=`${e}.Slot`,l}var s=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}function l(e){let s=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(s),[u,c]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(u,{scope:r,itemMap:s,collectionRef:o,children:n})};d.displayName=s;let f=e+"CollectionSlot",p=o(f),m=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,s=c(f,r),a=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(p,{ref:a,children:o})});m.displayName=f;let h=e+"CollectionItemSlot",g="data-radix-collection-item",y=o(h),v=t.default.forwardRef((e,r)=>{let{scope:o,children:s,...a}=e,l=t.default.useRef(null),u=(0,n.useComposedRefs)(r,l),d=c(h,o);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),(0,i.jsx)(y,{...{[g]:""},ref:u,children:s})});return v.displayName=h,[{Provider:d,Slot:m,ItemSlot:v},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var u=new WeakMap;function c(e,t){var r,n;let i,o,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(s=(o=d(n))>=0?o:i+o)<0||s>=i?-1:s);return -1===a?void 0:e[a]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],u.set(this,!0)}set(e,t){return u.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,s=d(e),a=s>=0?s:o+s,l=a<0||a>=o?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!i;s<0&&a++;let c=[...this.#e],f=!1;for(let e=a;e<u;e++)if(a===e){let o=c[e];c[e]===t&&(o=c[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||c[e-1]!==t||(f=!0);let r=c[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=c(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=c(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return c(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l],75830)},86318,e=>{"use strict";var t=e.i(71645);e.i(18050);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},30207,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},10772,e=>{"use strict";var t=e.i(71645),r=e.i(34620),n=t[" useId ".trim().toString()]||(()=>void 0),i=0;function o(e){let[o,s]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||s(e=>e??String(i++))},[e]),e||(o?`radix-${o}`:"")}e.s(["useId",()=>o])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),i=e=>{var i;let s,a,{present:l,children:u}=e,c=function(e){var r,i;let[s,a]=t.useState(),l=t.useRef(null),u=t.useRef(e),c=t.useRef("none"),[d,f]=(r=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>i[e][t]??e,r));return t.useEffect(()=>{let e=o(l.current);c.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=u.current;if(r!==e){let n=c.current,i=o(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let n=o(l.current).includes(CSS.escape(r.animationName));if(r.target===s&&n&&(f("ANIMATION_END"),!u.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},n=e=>{e.target===s&&(c.current=o(l.current))};return s.addEventListener("animationstart",n),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",n),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}f("ANIMATION_END")},[s,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(l),d="function"==typeof u?u({present:c.isPresent}):t.Children.only(u),f=(0,r.useComposedRefs)(c.ref,(i=d,(a=(s=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.ref:(a=(s=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.props.ref:i.props.ref||i.ref));return"function"==typeof u||c.isPresent?t.cloneElement(d,{ref:f}):null};function o(e){return e?.animationName||"none"}i.displayName="Presence",e.s(["Presence",()=>i])},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(75830),i=e.i(20783),o=e.i(30030),s=e.i(10772),a=e.i(48425),l=e.i(30207),u=e.i(69340),c=e.i(86318),d=e.i(18050),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[h,g,y]=(0,n.createCollection)(m),[v,x]=(0,o.createContextScope)(m,[y]),[w,C]=v(m),b=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(A,{...e,ref:t})})}));b.displayName=m;var A=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:h=!1,dir:y,currentTabStopId:v,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:C,onEntryFocus:b,preventScrollOnEntryFocus:A=!1,...k}=e,R=t.useRef(null),S=(0,i.useComposedRefs)(n,R),P=(0,c.useDirection)(y),[M,O]=(0,u.useControllableState)({prop:v,defaultProp:x??null,onChange:C,caller:m}),[T,N]=t.useState(!1),I=(0,l.useCallbackRef)(b),G=g(o),j=t.useRef(!1),[D,F]=t.useState(0);return t.useEffect(()=>{let e=R.current;if(e)return e.addEventListener(f,I),()=>e.removeEventListener(f,I)},[I]),(0,d.jsx)(w,{scope:o,orientation:s,dir:P,loop:h,currentTabStopId:M,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,d.jsx)(a.Primitive.div,{tabIndex:T||0===D?-1:0,"data-orientation":s,...k,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!T){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=G().filter(e=>e.focusable);E([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),A)}}j.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>N(!1))})})}),k="RovingFocusGroupItem",R=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...f}=e,p=(0,s.useId)(),m=u||p,y=C(k,i),v=y.currentTabStopId===m,x=g(i),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:A}=y;return t.useEffect(()=>{if(o)return w(),()=>b()},[o,w,b]),(0,d.jsx)(h.ItemSlot,{scope:i,id:m,focusable:o,active:l,children:(0,d.jsx)(a.Primitive.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?y.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return S[i]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=y.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>E(i))}}),children:"function"==typeof c?c({isCurrentTabStop:v,hasTabStop:null!=A}):c})})});R.displayName=k;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>R,"Root",()=>b,"createRovingFocusGroupScope",()=>x])},37766,e=>{"use strict";let t=["claude-code","codex","gemini","qwen-code"],r={claudeCode:"pro",codex:"chatgpt",gemini:"oauth",qwenCode:"oauth"},n={"claude-code":{agent:"claude-code",label:"Claude Code",accessKey:"claudeCode",defaultAccess:"pro",accessOptions:[{id:"pro",label:"Claude Pro",description:"Shows the current Sonnet models that Claude Code documents for Pro usage."},{id:"max",label:"Claude Max",description:"Unlocks both Sonnet and Opus model choices in Claude Code."},{id:"api",label:"Anthropic API",description:"Use direct Anthropic API credentials instead of a Claude subscription."}]},codex:{agent:"codex",label:"Codex",accessKey:"codex",defaultAccess:"chatgpt",accessOptions:[{id:"chatgpt",label:"ChatGPT Plan",description:"Use the ChatGPT-backed Codex login flow for paid ChatGPT workspaces."},{id:"api",label:"OpenAI API",description:"Use direct OpenAI API credentials when Codex is pointed at the API."}]},gemini:{agent:"gemini",label:"Gemini",accessKey:"gemini",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Google Login",description:"Use the built-in Google account flow that Gemini CLI ships with."},{id:"api",label:"Gemini API",description:"Use a Gemini API key or Vertex AI project for broader model control."}]},"qwen-code":{agent:"qwen-code",label:"Qwen Code",accessKey:"qwenCode",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Qwen OAuth",description:"Use Qwen Code's built-in browser login and bundled provider defaults."},{id:"api",label:"DashScope / Custom API",description:"Use DashScope or another OpenAI-compatible endpoint configured for Qwen Code."}]}},i=[{id:"low",label:"Low",description:"Fast responses with lighter reasoning."},{id:"medium",label:"Medium",description:"Balanced speed and reasoning depth for everyday tasks."},{id:"high",label:"High",description:"Deeper reasoning for more complex tasks."}],o=[...i,{id:"xhigh",label:"Extra High",description:"Maximum reasoning depth for the hardest tasks."}];function s(e,t,r,n=function(e){return e.trim().split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":e[0]?.toUpperCase()+e.slice(1)).join(" ")}(e)){return{id:e,label:n,description:t,access:r}}let a={"claude-code":{modelsByAccess:{pro:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")],max:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")],api:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")]},defaultModelByAccess:{pro:"claude-sonnet-4-6",max:"claude-opus-4-6",api:"claude-sonnet-4-6"},reasoningOptionsByAccess:{pro:i,max:i,api:i},defaultReasoningByAccess:{pro:"medium",max:"high",api:"medium"}},codex:{modelsByAccess:{chatgpt:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.3-codex-spark","Fast Codex model optimized for rapid iteration.",["chatgpt"],"GPT-5.3-Codex-Spark"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")],api:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")]},defaultModelByAccess:{chatgpt:"gpt-5.4",api:"gpt-5.4"},reasoningOptionsByAccess:{chatgpt:o,api:o},defaultReasoningByAccess:{chatgpt:"high",api:"high"}},gemini:{modelsByAccess:{oauth:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")],api:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")]},defaultModelByAccess:{oauth:"gemini-3.1-pro-preview",api:"gemini-3.1-pro-preview"}},"qwen-code":{modelsByAccess:{oauth:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")],api:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")]},defaultModelByAccess:{oauth:"coder-model",api:"coder-model"}}};function l(e){let r=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return t.includes(r)?r:null}function u(){return{...r}}function c(e){return null!==l(e)}function d(e){let t=l(e);return t?n[t]:null}function f(e,t){let r=d(e);if(!r)return null;let n=t?.[r.accessKey];return"string"==typeof n&&r.accessOptions.some(e=>e.id===n)?n:r.defaultAccess}function p(e,t){let r=l(e);if(!r)return[];let n=f(r,t);if(!n)return[];let i=a[r],o=i.modelsByAccess[n]??[];if(o.length>0)return[...o];let s=[],u=new Set;for(let e of Object.values(i.modelsByAccess))if(Array.isArray(e))for(let t of e)u.has(t.id)||(u.add(t.id),s.push(t));return s}function m(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultModelByAccess[n]??null:null}function h(e,t){let r=l(e);if(!r)return[];let n=f(r,t);return n?a[r].reasoningOptionsByAccess?.[n]??[]:[]}function g(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultReasoningByAccess?.[n]??null:null}e.s(["getAgentModelCatalog",()=>d,"getAvailableAgentModels",()=>p,"getAvailableAgentReasoningEfforts",()=>h,"getDefaultAgentModel",()=>m,"getDefaultAgentReasoningEffort",()=>g,"getDefaultModelAccessPreferences",()=>u,"resolveAgentModelAccess",()=>f,"supportsAgentModelSelection",()=>c])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},75505,e=>{"use strict";let t=(0,e.i(75254).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],75505)},90272,e=>{"use strict";let t=(0,e.i(75254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],90272)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},81633,e=>{"use strict";function t(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}e.s(["normalizeAgentName",()=>t])},97878,e=>{"use strict";let t=new Set,r=null,n=null;function i(e){return Array.isArray(e)?{type:"snapshot",sessions:e}:e&&"object"==typeof e&&"snapshot"===e.type&&Array.isArray(e.sessions)?e:null}function o(e){for(let r of t)r(e)}async function s(){if("function"!=typeof fetch)return;let e=(async()=>{try{let e=await fetch("/api/sessions");if(!e.ok)return;let t=await e.json().catch(()=>null),r=i(t);if(!r)return;o(r)}catch{}})();n=e.finally(()=>{n===e&&(n=null)}),await e}function a(e){return t.add(e),!r&&"u">typeof EventSource&&((r=new EventSource("/api/events")).onmessage=e=>{try{let t=i(JSON.parse(e.data));if(!t)return;o(t)}catch{}},r.addEventListener("refresh",()=>{n||s()}),r.onerror=()=>{0===t.size&&(r?.close(),r=null)}),()=>{t.delete(e),0===t.size&&r&&(r.close(),r=null)}}e.s(["subscribeToSnapshotEvents",()=>a])},78818,e=>{"use strict";var t=e.i(71645);let r=new Set,n=[],i=!0,o=0,s=null,a=null;function l(){for(let e of r)e()}function u(){return{agents:n,loading:i}}function c(){return n.length>0&&Date.now()-o<3e4}function d(){null===a&&(a=window.setTimeout(()=>{a=null,f(!0)},1e4))}async function f(e=!1){if(!e&&c()){i&&(i=!1,l());return}return s||(i=!0,l(),s=(async()=>{try{var e;let t=await fetch("/api/agents",{cache:"no-store"});if(!t.ok)throw Error(`Failed to fetch agents: ${t.status}`);let r=(e=await t.json(),Array.isArray(e)?e:e&&"object"==typeof e&&"agents"in e&&Array.isArray(e.agents)?e.agents:[]);r.length>0?(n=r,o=Date.now(),null!==a&&(window.clearTimeout(a),a=null)):d()}catch{d()}finally{i=!1,s=null,l()}})())}function p(){let[e,n]=(0,t.useState)(()=>u());return(0,t.useEffect)(()=>{let e=()=>n(u());r.add(e),e(),f();let t=()=>{c()||f(!0)},i=()=>{"visible"!==document.visibilityState||c()||f(!0)};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",i),()=>{r.delete(e),window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",i)}},[]),e}e.s(["useAgents",()=>p])},52808,e=>{"use strict";let t=new Set(["archived","done","killed","errored","terminated","merged","cleanup"]);function r(e){return"merged"===e.status||"archived"===e.status||"killed"===e.status||"errored"===e.status||"cleanup"===e.status||"done"===e.status||"terminated"===e.status||e.pr&&("merged"===e.pr.state||"closed"===e.pr.state)?"done":"mergeable"===e.status||"approved"===e.status||e.pr?.mergeability.mergeable?"merge":"waiting_input"===e.activity||"blocked"===e.activity||"needs_input"===e.status||"stuck"===e.status||"exited"===e.activity?"respond":"ci_failed"===e.status||"changes_requested"===e.status||e.pr&&("failing"===e.pr.ciStatus||"changes_requested"===e.pr.reviewDecision||!e.pr.mergeability.noConflicts)?"review":"review_pending"===e.status||e.pr&&!e.pr.isDraft&&("pending"===e.pr.reviewDecision||"none"===e.pr.reviewDecision)?"pending":"working"}e.s(["TERMINAL_STATUSES",0,t,"getAttentionLevel",()=>r])},55716,e=>{"use strict";let t=(0,e.i(75254).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",()=>t],55716)},17442,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)]",success:"border-transparent bg-transparent text-[var(--vk-green)]",warning:"border-transparent bg-transparent text-[var(--vk-orange)]",error:"border-transparent bg-transparent text-[var(--vk-red)]",info:"border-transparent bg-transparent text-[var(--vk-text-muted)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-muted)]"};function i({variant:e="default",className:i,children:o}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-flex items-center gap-1 rounded-[3px] border px-1.5 py-0.5 text-[11px] leading-none",n[e],i),children:o})}e.s(["Badge",()=>i])},90993,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n=(0,e.i(71645).forwardRef)(({className:e,...n},i)=>(0,t.jsx)("div",{ref:i,className:(0,r.cn)("surface-card rounded-[var(--radius-md)] border",e),...n}));function i({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center gap-2 border-b border-[var(--vk-border)] px-3 py-2",e),...n})}function o({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("px-3 py-2",e),...n})}n.displayName="Card",e.s(["Card",0,n,"CardContent",()=>o,"CardHeader",()=>i])}]);
|
|
@@ -36,7 +36,6 @@ import {
|
|
|
36
36
|
Hand,
|
|
37
37
|
List,
|
|
38
38
|
Loader2,
|
|
39
|
-
Paperclip,
|
|
40
39
|
PlugZap,
|
|
41
40
|
RefreshCcw,
|
|
42
41
|
Search,
|
|
@@ -2876,10 +2875,6 @@ const CreateWorkspacePanel = memo(function CreateWorkspacePanel({
|
|
|
2876
2875
|
</DropdownMenu.Portal>
|
|
2877
2876
|
</DropdownMenu.Root>
|
|
2878
2877
|
|
|
2879
|
-
<div className="inline-flex h-[29px] w-[29px] items-center justify-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-normal)]">
|
|
2880
|
-
<ChevronsRight className="h-[15px] w-[15px]" />
|
|
2881
|
-
</div>
|
|
2882
|
-
|
|
2883
2878
|
<DropdownMenu.Root>
|
|
2884
2879
|
<DropdownMenu.Trigger asChild>
|
|
2885
2880
|
<button
|
|
@@ -2910,15 +2905,6 @@ const CreateWorkspacePanel = memo(function CreateWorkspacePanel({
|
|
|
2910
2905
|
</DropdownMenu.Portal>
|
|
2911
2906
|
</DropdownMenu.Root>
|
|
2912
2907
|
|
|
2913
|
-
<button
|
|
2914
|
-
type="button"
|
|
2915
|
-
onClick={onOpenAddWorkspace}
|
|
2916
|
-
className="inline-flex h-[29px] w-[20px] items-center justify-center text-[var(--vk-text-muted)] hover:text-[var(--vk-text-normal)]"
|
|
2917
|
-
aria-label="Add workspace"
|
|
2918
|
-
>
|
|
2919
|
-
<Paperclip className="h-[18px] w-[18px]" />
|
|
2920
|
-
</button>
|
|
2921
|
-
|
|
2922
2908
|
<DropdownMenu.Root>
|
|
2923
2909
|
<DropdownMenu.Trigger asChild>
|
|
2924
2910
|
<button
|
|
@@ -362,7 +362,7 @@ function getClaudeAccessForModel(model: string): AgentModelAccess[] {
|
|
|
362
362
|
return ["max", "api"];
|
|
363
363
|
}
|
|
364
364
|
if (normalized === "haiku" || normalized.includes("claude-haiku")) {
|
|
365
|
-
return ["api"];
|
|
365
|
+
return ["pro", "max", "api"];
|
|
366
366
|
}
|
|
367
367
|
return ["pro", "max", "api"];
|
|
368
368
|
}
|
|
@@ -28,6 +28,66 @@ export function hasRustBackend(): boolean {
|
|
|
28
28
|
return backendUrl.length > 0;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function isEventStreamResponse(response: Response): boolean {
|
|
32
|
+
return response.headers.get("content-type")?.toLowerCase().includes("text/event-stream") ?? false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function isIgnorableStreamTermination(error: unknown): boolean {
|
|
36
|
+
if (!error || typeof error !== "object") {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const candidate = error as {
|
|
41
|
+
name?: string;
|
|
42
|
+
code?: string;
|
|
43
|
+
message?: string;
|
|
44
|
+
cause?: unknown;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
if (candidate.name === "AbortError" || candidate.code === "UND_ERR_SOCKET") {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (candidate.message?.toLowerCase().includes("terminated")) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return candidate.cause ? isIgnorableStreamTermination(candidate.cause) : false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function wrapEventStreamBody(body: ReadableStream<Uint8Array> | null): ReadableStream<Uint8Array> | null {
|
|
59
|
+
if (!body) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const reader = body.getReader();
|
|
64
|
+
return new ReadableStream<Uint8Array>({
|
|
65
|
+
async pull(controller) {
|
|
66
|
+
try {
|
|
67
|
+
const { done, value } = await reader.read();
|
|
68
|
+
if (done) {
|
|
69
|
+
controller.close();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
controller.enqueue(value);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if (!isIgnorableStreamTermination(error)) {
|
|
75
|
+
controller.error(error);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
controller.close();
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
async cancel(reason) {
|
|
82
|
+
try {
|
|
83
|
+
await reader.cancel(reason);
|
|
84
|
+
} catch {
|
|
85
|
+
// Ignore cancellations from an already-closed upstream SSE socket.
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
31
91
|
export async function proxyToRust(request: Request, pathname: string): Promise<Response> {
|
|
32
92
|
if (!hasRustBackend()) {
|
|
33
93
|
throw new Error("Rust backend URL is not configured");
|
|
@@ -68,7 +128,7 @@ export async function proxyToRust(request: Request, pathname: string): Promise<R
|
|
|
68
128
|
}
|
|
69
129
|
});
|
|
70
130
|
|
|
71
|
-
return new Response(response.body, {
|
|
131
|
+
return new Response(isEventStreamResponse(response) ? wrapEventStreamBody(response.body) : response.body, {
|
|
72
132
|
status: response.status,
|
|
73
133
|
statusText: response.statusText,
|
|
74
134
|
headers: responseHeaders,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,85153,e=>{"use strict";var l=e.i(95187);let t=(0,l.createServerReference)("00bb3e598d529d314ff41b96ac038ed48fc3f7d9be",l.callServer,void 0,l.findSourceMapURL,"createOrReadKeylessAction");e.s(["createOrReadKeylessAction",()=>t])},37572,e=>{"use strict";var l=e.i(18566),t=e.i(71645),s=e.i(85153);let a=e=>{var a;let{children:i}=e,r=(null==(a=(0,l.useSelectedLayoutSegments)()[0])?void 0:a.startsWith("/_not-found"))||!1,[n,c]=t.default.useActionState(s.createOrReadKeylessAction,null);return((0,t.useEffect)(()=>{r||t.default.startTransition(()=>{c()})},[r]),t.default.isValidElement(i))?t.default.cloneElement(i,{key:null==n?void 0:n.publishableKey,publishableKey:null==n?void 0:n.publishableKey,__internal_keyless_claimKeylessApplicationUrl:null==n?void 0:n.claimUrl,__internal_keyless_copyInstanceKeysUrl:null==n?void 0:n.apiKeysUrl,__internal_bypassMissingPublishableKey:!0}):i};e.s(["KeylessCreatorOrReader",()=>a])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89965,e=>{"use strict";var t=e.i(71645),r=e.i(97878);function a(e){let[a,n]=(0,t.useState)([]),[s,l]=(0,t.useState)(!0),[i,o]=(0,t.useState)(null),c=(0,t.useRef)(!0),d=(0,t.useCallback)(e=>{n(t=>!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){let a=e[r],n=t[r];if(!a||!n||a.id!==n.id||a.status!==n.status||a.activity!==n.activity||a.projectId!==n.projectId||a.issueId!==n.issueId||a.branch!==n.branch||a.lastActivityAt!==n.lastActivityAt||a.summary!==n.summary)return!1}return!0}(t,e)?e:t)},[]),u=(0,t.useCallback)(async()=>{try{let t="string"==typeof e&&e.trim().length>0?`?project=${encodeURIComponent(e.trim())}`:"",r=await fetch(`/api/sessions${t}`);if(!r.ok)throw Error(`Failed to fetch sessions: ${r.status}`);let a=await r.json(),n=Array.isArray(a)?a:Array.isArray(a.sessions)?a.sessions:[];if(!c.current)return;d(n),o(null)}catch(e){c.current&&o(e instanceof Error?e.message:"Unknown error")}finally{c.current&&l(!1)}},[d,e]);return(0,t.useEffect)(()=>{c.current=!0,l(!0),u();let t=null,a=()=>{null!==t&&(window.clearTimeout(t),t=null)},n=()=>{a(),t=window.setTimeout(async()=>{c.current&&(await u(),c.current&&n())},"visible"===document.visibilityState?15e3:45e3)};n();let s=(0,r.subscribeToSnapshotEvents)(t=>{var r;let a;c.current&&(d((r=t.sessions,(a=e?.trim())?r.filter(e=>e.projectId===a):r)),o(null),l(!1))}),i=()=>{u(),n()},v=()=>{"visible"===document.visibilityState?i():n()};return window.addEventListener("focus",i),document.addEventListener("visibilitychange",v),()=>{c.current=!1,s(),a(),window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",v)}},[d,u,e]),{sessions:a,loading:s,error:i,refresh:u}}e.s(["useSessions",()=>a])},2004,e=>{"use strict";var t=e.i(71645);function r(e,t){return{id:e,repo:"string"==typeof t?.repo?t.repo:null,path:"string"==typeof t?.path?t.path:null,iconUrl:"string"==typeof t?.iconUrl?t.iconUrl:null,boardDir:"string"==typeof t?.boardDir?t.boardDir:null,boardFile:"string"==typeof t?.boardFile?t.boardFile:null,description:"string"==typeof t?.description?t.description:null,defaultBranch:"string"==typeof t?.defaultBranch&&t.defaultBranch.trim().length>0?t.defaultBranch:"main",agent:"string"==typeof t?.agent&&t.agent.trim().length>0?t.agent:"claude-code",agentPermissions:"string"==typeof t?.agentPermissions&&t.agentPermissions.trim().length>0?t.agentPermissions:null,agentModel:"string"==typeof t?.agentModel&&t.agentModel.trim().length>0?t.agentModel:null,agentReasoningEffort:"string"==typeof t?.agentReasoningEffort&&t.agentReasoningEffort.trim().length>0?t.agentReasoningEffort:null}}function a(){let[e,a]=(0,t.useState)([]),[n,s]=(0,t.useState)(!0),[l,i]=(0,t.useState)(null),o=(0,t.useRef)(!1),c=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/config");if(!e.ok)throw Error(`Failed to fetch config: ${e.status}`);let t=await e.json();a(function(e){if(!e||"object"!=typeof e)return[];let t=e.projects;return t?Array.isArray(t)?t.map((e,t)=>e&&"object"==typeof e?r("string"==typeof e.id&&e.id.trim().length>0?e.id:`project-${t+1}`,e):r(`project-${t+1}`,null)):"object"==typeof t?Object.entries(t).map(([e,t])=>r(e,t&&"object"==typeof t?t:null)):[]:[]}(t)),i(null)}catch(e){a([]),i(e instanceof Error?e.message:"Failed to fetch config")}finally{s(!1)}},[]);return(0,t.useEffect)(()=>{o.current||(o.current=!0,c())},[c]),{projects:e,loading:n,error:l,refresh:c}}e.s(["useConfig",()=>a])},36832,80235,2758,11077,45241,e=>{"use strict";let t,r,a;var n=e.i(18050),s=e.i(71645),l=e.i(75254);let i=(0,l.default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),o=(0,l.default)("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);var c=e.i(18620);let d="conductor-workspace-sidebar-width";function u({sidebar:e,children:t,sidebarOpen:r,onToggleSidebar:a}){let[l,u]=(0,s.useState)(356),[v,x]=(0,s.useState)(!1);(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(d),t=e?Number.parseInt(e,10):NaN;Number.isFinite(t)&&u(Math.min(460,Math.max(296,t)))}catch{}},[]),(0,s.useEffect)(()=>{if(!v)return;let e=e=>{u(Math.min(460,Math.max(296,e.clientX)))},t=()=>{x(!1)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t),document.body.style.userSelect="",document.body.style.cursor="";try{window.localStorage.setItem(d,String(l))}catch{}}},[v,l]);let p={"--workspace-sidebar-width":`${l}px`};return(0,n.jsxs)("div",{style:p,className:"relative flex h-dvh min-h-[100dvh] w-full max-w-full overflow-hidden bg-[var(--vk-bg-main)] text-[var(--vk-text-normal)]",children:[r&&(0,n.jsx)("button",{type:"button",className:"absolute inset-0 z-20 bg-black/45 lg:hidden",onClick:a,"aria-label":"Close workspace panel"}),(0,n.jsx)("aside",{className:(0,c.cn)("absolute inset-y-0 left-0 z-30 flex h-full w-[min(90vw,var(--workspace-sidebar-width))] flex-col border-r border-[var(--vk-border)] bg-[var(--vk-bg-panel)] transition-transform duration-200 lg:relative lg:w-[var(--workspace-sidebar-width)]",r?"translate-x-0":"-translate-x-full lg:-translate-x-0 lg:w-0 lg:overflow-hidden lg:border-r-0","lg:left-auto"),children:e}),r?(0,n.jsx)("div",{className:"absolute bottom-0 left-[var(--workspace-sidebar-width)] top-0 z-30 hidden w-2 -translate-x-1/2 cursor-col-resize lg:block",onMouseDown:()=>x(!0),"aria-hidden":"true",children:(0,n.jsx)("div",{className:"mx-auto h-full w-px bg-transparent transition-colors hover:bg-[var(--vk-border)]"})}):null,r&&(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute left-[var(--workspace-sidebar-width)] top-2 z-40 hidden h-7 w-7 -translate-x-1/2 items-center justify-center rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)] shadow-[0_0_0_1px_rgba(0,0,0,0.25)] hover:bg-[var(--vk-bg-hover)] lg:inline-flex","aria-label":"Hide workspace panel",children:(0,n.jsx)(o,{className:"h-4 w-4"})}),(0,n.jsxs)("main",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden bg-[var(--vk-bg-main)]",children:[!r&&(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute left-2 top-2 z-40 inline-flex h-7 w-7 items-center justify-center rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Open workspace panel",children:(0,n.jsx)(i,{className:"h-4 w-4"})}),t]})]})}e.s(["AppShell",()=>u],36832);let v=(0,l.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),x=(0,s.memo)(function({title:e,onOpenPreferences:t}){return(0,n.jsxs)("header",{className:"flex h-12 items-center border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-4 text-[13px] text-[var(--vk-text-muted)] sm:h-14 sm:px-5 sm:text-[14px]",children:[(0,n.jsx)("div",{className:"min-w-0 flex-1 text-center",children:(0,n.jsx)("span",{className:"block truncate font-medium tracking-[0.01em] text-[var(--vk-text-normal)]",children:e??"All Projects"})}),t?(0,n.jsx)("div",{className:"ml-1 flex shrink-0",children:(0,n.jsx)("button",{type:"button",onClick:t,className:"inline-flex h-8 w-8 items-center justify-center rounded-[6px] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]","aria-label":"Open preferences",title:"Preferences",children:(0,n.jsx)(v,{className:"h-4 w-4"})})}):null]})});e.s(["TopBar",0,x],80235);let p=(0,l.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers3",()=>p],2758);var m=e.i(7233),h=e.i(37727),f=e.i(52808);let b=(0,l.default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var g=e.i(55436);let k=[{top:0,left:1,delay:"0ms",opacity:1},{top:0,left:9,delay:"120ms",opacity:.9},{top:6,left:1,delay:"240ms",opacity:.8},{top:6,left:9,delay:"360ms",opacity:.7},{top:12,left:1,delay:"480ms",opacity:.6},{top:12,left:9,delay:"600ms",opacity:.45}];function y(e){let t=e.metadata.worktree?.trim()??"";return t&&t.replace(/\\/g,"/").replace(/\/+$/,"").includes("/worktrees/")?"worktree":"local"}function j(e){let t=e.branch?.trim();if(t)return t;let r=e.summary?.trim()||e.metadata.summary?.trim();return r||(e.status?.trim()?e.status.replace(/[_-]+/g," "):e.id.slice(0,8))}function w({running:e}){return(0,n.jsx)("span",{className:"mt-1 inline-flex h-4 w-4 shrink-0 items-center justify-center text-[var(--vk-orange)]",children:(0,n.jsx)("span",{className:"relative h-[12px] w-[10px]",children:k.map((t,r)=>(0,n.jsx)("span",{className:(0,c.cn)("absolute h-[2px] w-[2px] rounded-full bg-current",e&&"animate-pulse"),style:{top:`${Math.round(.75*t.top)}px`,left:`${Math.round(.75*t.left)}px`,opacity:t.opacity,animationDelay:t.delay}},r))})})}function N({sessions:e,selectedId:t,onSelect:r,onArchive:a,onCreateWorkspace:l,showHeader:i=!0}){let[o,d]=(0,s.useState)(""),[u,v]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),m=(0,s.useMemo)(()=>{let t=e.filter(e=>"archived"!==e.status);if(!o.trim())return t;let r=o.toLowerCase();return t.filter(e=>{let t=e.summary??"",a=e.branch??"",n=e.metadata.agent??"",s=y(e),l=j(e);return e.id.toLowerCase().includes(r)||e.projectId.toLowerCase().includes(r)||t.toLowerCase().includes(r)||a.toLowerCase().includes(r)||n.toLowerCase().includes(r)||s.toLowerCase().includes(r)||l.toLowerCase().includes(r)})},[o,e]),h=async(e,t)=>{if(e.stopPropagation(),e.preventDefault(),a&&u!==t){v(t);try{await a(t)}catch(e){console.error("Failed to archive session",e),p(t),window.setTimeout(()=>p(null),3e3)}finally{v(e=>e===t?null:e)}}},k=(0,s.useMemo)(()=>[...m].sort((e,t)=>new Date(t.lastActivityAt).getTime()-new Date(e.lastActivityAt).getTime()),[m]);return(0,n.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[i&&(0,n.jsxs)("div",{className:"flex h-[33px] items-center gap-1 px-2",children:[(0,n.jsx)("p",{className:"text-[16px] text-[var(--vk-text-normal)]",children:"Workspaces"}),l&&(0,n.jsx)("button",{type:"button",onClick:l,className:"ml-auto inline-flex h-5 w-5 items-center justify-center rounded-[3px] text-[var(--vk-orange)] hover:bg-[var(--vk-bg-hover)] lg:hidden","aria-label":"New workspace",children:(0,n.jsx)("span",{className:"text-[14px]",children:"+"})})]}),(0,n.jsx)("div",{className:(0,c.cn)("flex h-[38px] items-center px-2 pb-1.5",!i&&"pt-1.5"),children:(0,n.jsxs)("label",{className:"flex h-[30px] flex-1 items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-2",children:[(0,n.jsx)(g.Search,{className:"h-3.5 w-3.5 text-[var(--vk-text-muted)]"}),(0,n.jsx)("input",{value:o,onChange:e=>d(e.target.value),placeholder:"Search...",className:"ml-1.5 w-full bg-transparent text-[14px] text-[var(--vk-text-normal)] outline-none placeholder:text-[var(--vk-text-muted)]"})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:0===k.length?(0,n.jsx)("p",{className:"px-2 py-2 text-[14px] text-[var(--vk-text-muted)]",children:"No sessions"}):(0,n.jsx)("div",{className:"space-y-2",children:k.map(e=>{let s=(0,f.getAttentionLevel)(e),l=function(e){for(let t of[e.metadata.lastStderr,e.metadata.summary,e.summary]){if(!t)continue;let e=t.match(/(\d+)\s+insertions?\(\+\),\s+(\d+)\s+deletions?\(-\)/i);if(!e)continue;let r=Number.parseInt(e[1]??"0",10),a=Number.parseInt(e[2]??"0",10);if(Number.isFinite(r)&&Number.isFinite(a))return{additions:r,deletions:a}}return null}(e),i=function(e,t){let r=`${e.summary??""} ${e.metadata.summary??""}`.toLowerCase();if("killed"===e.status||r.includes("interrupted"))return{label:"Interrupted",className:"text-[var(--vk-orange)]"};switch(t){case"merge":return{label:"Ready",className:"text-[var(--vk-green)]"};case"respond":return{label:"Needs input",className:"text-[var(--vk-red)]"};case"review":return{label:"Review",className:"text-[var(--vk-orange)]"};case"working":return{label:"Running",className:"text-[#4e87f3]"};case"done":return{label:"Done",className:"text-[var(--vk-text-muted)]"};default:return{label:"Queued",className:"text-[var(--vk-text-muted)]"}}}(e,s),o=e.id===t,d=u===e.id,v=x===e.id;return(0,n.jsxs)("div",{onClick:()=>r(e.id),onKeyDown:t=>{var a;return a=e.id,void(("Enter"===t.key||" "===t.key)&&(t.preventDefault(),r(a)))},role:"button",tabIndex:0,className:(0,c.cn)("group flex w-full items-start gap-3 rounded-[8px] border px-3 py-3 text-left transition-colors",o?"border-[rgba(234,122,42,0.28)] bg-[rgba(255,255,255,0.08)]":"border-[var(--vk-border)] bg-[rgba(255,255,255,0.02)] hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsx)(w,{running:"working"===s}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("span",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-[var(--vk-text-strong)]",children:y(e)}),(0,n.jsx)("span",{className:"shrink-0 rounded-[8px] bg-[rgba(255,255,255,0.06)] px-2.5 py-1 text-[11px] font-medium",children:l?(0,n.jsxs)("span",{className:"flex items-center gap-2",children:[(0,n.jsxs)("span",{className:"text-[#18c58f]",children:["+",l.additions]}),(0,n.jsxs)("span",{className:"text-[#f26d6d]",children:["-",l.deletions]})]}):(0,n.jsx)("span",{className:i.className,children:i.label})})]}),(0,n.jsx)("span",{className:"mt-1 block truncate text-[12px] text-[var(--vk-text-muted)]",children:j(e)})]}),a?(0,n.jsx)("button",{type:"button",onClick:t=>void h(t,e.id),disabled:d,className:(0,c.cn)("mt-0.5 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-[6px] border border-[var(--vk-border)] text-[var(--vk-text-muted)] transition","opacity-70 group-hover:opacity-100 focus-visible:opacity-100","hover:border-[var(--vk-border)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]",d&&"cursor-wait opacity-100"),"aria-label":`Archive session ${e.id}`,title:v?"Archive failed":"Archive session",children:(0,n.jsx)(b,{className:(0,c.cn)("h-3.5 w-3.5",v&&"text-red-400")})}):null]},e.id)})})})]})}var C=e.i(20783),S=Symbol.for("react.lazy"),A=s[" use ".trim().toString()];function E(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===S&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var M=((a=s.forwardRef((e,t)=>{let{children:r,...a}=e;if(E(r)&&"function"==typeof A&&(r=A(r._payload)),s.isValidElement(r)){var n;let e,l,i=(n=r,(l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.ref:(l=(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.props.ref:n.props.ref||n.ref),o=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==s.Fragment&&(o.ref=t?(0,C.composeRefs)(t,i):i),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null})).displayName="Slot.SlotClone",t=a,(r=s.forwardRef((e,r)=>{let{children:a,...l}=e;E(a)&&"function"==typeof A&&(a=A(a._payload));let i=s.Children.toArray(a),o=i.find(R);if(o){let e=o.props.children,a=i.map(t=>t!==o?t:s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null);return(0,n.jsx)(t,{...l,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,a):null})}return(0,n.jsx)(t,{...l,ref:r,children:a})})).displayName="Slot.Slot",r),L=Symbol("radix.slottable");function R(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===L}let P={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",primary:"border-[var(--vk-border)] bg-[var(--vk-bg-active)] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",ghost:"border-transparent bg-transparent text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]",danger:"border-[var(--vk-red)]/40 bg-[color:color-mix(in_srgb,var(--vk-red)_18%,transparent)] text-[var(--vk-red)] hover:bg-[color:color-mix(in_srgb,var(--vk-red)_24%,transparent)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]"},I={sm:"h-7 px-2.5 text-[12px] gap-1",md:"h-8 px-3 text-[13px] gap-1.5",lg:"h-9 px-3.5 text-[14px] gap-2",icon:"h-8 w-8 p-0"},_=(0,s.forwardRef)(({variant:e="default",size:t="md",asChild:r,className:a,children:s,...l},i)=>(0,n.jsx)(r?M:"button",{ref:i,className:(0,c.cn)("inline-flex items-center justify-center rounded-[var(--radius-sm)] border font-medium","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--vk-orange)]","disabled:pointer-events-none disabled:opacity-45",P[e],I[t],a),...l,children:s}));_.displayName="Button",e.s(["Button",0,_],11077);let $=(0,s.memo)(function({orgLabel:e,projects:t,selectedProjectId:r,onSelectProject:a,onUnlinkProject:l,sessions:i,selectedSessionId:o,onSelectSession:d,onArchiveSession:u,onCreateWorkspace:v}){let[x,b]=(0,s.useState)(null),[g,k]=(0,s.useState)(null),[y,j]=(0,s.useState)(null),w=(0,s.useMemo)(()=>{let e=new Map;for(let t of i){if("archived"===t.status)continue;let r=e.get(t.projectId)??{total:0,active:0};r.total+=1,"done"!==(0,f.getAttentionLevel)(t)&&(r.active+=1),e.set(t.projectId,r)}return e},[i]),C=(0,s.useMemo)(()=>i.filter(e=>"archived"!==e.status&&"done"!==(0,f.getAttentionLevel)(e)).length,[i]),S=(0,s.useMemo)(()=>t.find(e=>e.id===g)??null,[g,t]);async function A(){if(l&&g){b(g),j(null);try{await l(g),k(null)}catch(e){j(e instanceof Error?e.message:"Failed to unlink project.")}finally{b(null)}}}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col bg-[var(--vk-bg-panel)]",children:[(0,n.jsxs)("section",{className:"border-b border-[var(--vk-border)] px-4 py-4",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-[10px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] text-[var(--vk-text-normal)]",children:(0,n.jsx)(p,{className:"h-4 w-4"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-[15px] font-medium leading-[21px] text-[var(--vk-text-strong)]",children:e}),(0,n.jsxs)("p",{className:"mt-1 text-[12px] text-[var(--vk-text-muted)]",children:[t.length," projects, ",C," active sessions"]})]})]}),(0,n.jsxs)("button",{type:"button",onClick:v,className:"mt-3 inline-flex h-8 w-full items-center justify-center gap-1 rounded-[6px] border border-[var(--vk-border)] px-2 text-[12px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Add workspace",children:[(0,n.jsx)(m.Plus,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:"Add Workspace"})]})]}),(0,n.jsxs)("section",{className:"border-b border-[var(--vk-border)] pb-2 pt-1.5",children:[(0,n.jsx)("div",{className:"flex h-[28px] items-center px-3",children:(0,n.jsx)("p",{className:"text-[11px] uppercase tracking-[0.08em] text-[var(--vk-text-muted)]",children:"Projects"})}),(0,n.jsxs)("div",{className:"max-h-[260px] overflow-y-auto px-2",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>a(null),className:(0,c.cn)("mb-1.5 flex w-full items-center gap-3 rounded-[6px] px-3 py-2.5 text-left text-[14px] leading-[21px]",null===r?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[var(--vk-text-muted)]"}),(0,n.jsx)("span",{className:"truncate",children:"All projects"}),(0,n.jsx)("span",{className:"ml-auto text-[11px] text-[var(--vk-text-muted)]",children:t.length})]}),t.map(e=>{let t=r===e.id,s=w.get(e.id)??{total:0,active:0},i=x===e.id;return(0,n.jsxs)("div",{className:(0,c.cn)("group relative mb-1.5 flex items-center rounded-[6px]",t?"bg-[var(--vk-bg-hover)]":"hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>a(e.id),className:(0,c.cn)("flex min-w-0 flex-1 items-center gap-3 px-3 py-2.5 text-left text-[14px] leading-[21px]",t?"text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)]"),children:[(0,n.jsx)("span",{className:"mt-1 h-2.5 w-2.5 shrink-0 rounded-full bg-[#3c83f6]"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"block truncate",children:e.id}),e.description?(0,n.jsx)("span",{className:"block truncate text-[11px] text-[var(--vk-text-muted)]",children:e.description}):null]}),(0,n.jsxs)("span",{className:"shrink-0 text-right",children:[(0,n.jsxs)("span",{className:"block text-[11px] text-[var(--vk-text-normal)]",children:[s.active," active"]}),(0,n.jsxs)("span",{className:"block text-[10px] text-[var(--vk-text-muted)]",children:[s.total," total"]})]})]}),l&&(0,n.jsx)("button",{type:"button",disabled:i,onClick:t=>{t.stopPropagation(),j(null),k(e.id)},className:"mr-2 hidden shrink-0 items-center justify-center rounded-[4px] p-1 text-[var(--vk-text-muted)] hover:bg-[var(--vk-red)]/10 hover:text-[var(--vk-red)] group-hover:inline-flex disabled:opacity-50","aria-label":`Unlink ${e.id}`,title:"Unlink project",children:(0,n.jsx)(h.X,{className:"h-3.5 w-3.5"})})]},e.id)})]})]}),(0,n.jsx)("section",{className:"flex min-h-0 flex-1 flex-col pt-1.5",children:(0,n.jsx)(N,{sessions:i,selectedId:o,onSelect:d,onArchive:u,onCreateWorkspace:v,showHeader:!1})})]}),S&&(0,n.jsx)("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-black/60 px-4",onClick:()=>{x||(k(null),j(null))},children:(0,n.jsxs)("div",{className:"surface-card w-full max-w-md rounded-[var(--radius-lg)] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)]",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"unlink-project-title",children:[(0,n.jsxs)("div",{className:"border-b border-[var(--vk-border)] px-4 py-3",children:[(0,n.jsx)("h2",{id:"unlink-project-title",className:"text-[17px] font-medium text-[var(--vk-text-strong)]",children:"Unlink Project"}),(0,n.jsxs)("p",{className:"mt-1 text-[12px] text-[var(--vk-text-muted)]",children:["Remove ",(0,n.jsx)("span",{className:"font-medium text-[var(--vk-text-normal)]",children:S.id})," from this workspace configuration."]})]}),(0,n.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,n.jsx)("p",{className:"text-[13px] leading-5 text-[var(--vk-text-normal)]",children:"This only removes the project from Conductor. Repository files on disk are not deleted."}),y?(0,n.jsx)("div",{className:"rounded-[var(--radius-md)] border border-[var(--vk-red)]/35 bg-[color:color-mix(in_srgb,var(--vk-red)_12%,transparent)] px-3 py-2 text-[12px] text-[var(--vk-red)]",children:y}):null]}),(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--vk-border)] px-4 py-3",children:[(0,n.jsx)(_,{type:"button",variant:"ghost",onClick:()=>{k(null),j(null)},disabled:null!==x,children:"Cancel"}),(0,n.jsx)(_,{type:"button",variant:"danger",onClick:()=>void A(),disabled:null!==x,children:x===S.id?"Unlinking...":"Unlink Project"})]})]})})]})});e.s(["WorkspaceSidebarPanel",0,$],45241)},64816,e=>{e.v(t=>Promise.all(["static/chunks/38c2e6a114505dfb.js","static/chunks/1b825c5c6412ffea.js"].map(t=>e.l(t))).then(()=>t(31437)))},24629,e=>{e.v(t=>Promise.all(["static/chunks/870a993d28314a90.js"].map(t=>e.l(t))).then(()=>t(96933)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89965,e=>{"use strict";var t=e.i(71645),r=e.i(97878);function a(e){let[a,n]=(0,t.useState)([]),[s,l]=(0,t.useState)(!0),[i,o]=(0,t.useState)(null),c=(0,t.useRef)(!0),d=(0,t.useCallback)(e=>{n(t=>!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){let a=e[r],n=t[r];if(!a||!n||a.id!==n.id||a.status!==n.status||a.activity!==n.activity||a.projectId!==n.projectId||a.issueId!==n.issueId||a.branch!==n.branch||a.lastActivityAt!==n.lastActivityAt||a.summary!==n.summary)return!1}return!0}(t,e)?e:t)},[]),u=(0,t.useCallback)(async()=>{try{let t="string"==typeof e&&e.trim().length>0?`?project=${encodeURIComponent(e.trim())}`:"",r=await fetch(`/api/sessions${t}`);if(!r.ok)throw Error(`Failed to fetch sessions: ${r.status}`);let a=await r.json(),n=Array.isArray(a)?a:Array.isArray(a.sessions)?a.sessions:[];if(!c.current)return;d(n),o(null)}catch(e){c.current&&o(e instanceof Error?e.message:"Unknown error")}finally{c.current&&l(!1)}},[d,e]);return(0,t.useEffect)(()=>{c.current=!0,l(!0),u();let t=null,a=()=>{null!==t&&(window.clearTimeout(t),t=null)},n=()=>{a(),t=window.setTimeout(async()=>{c.current&&(await u(),c.current&&n())},"visible"===document.visibilityState?15e3:45e3)};n();let s=(0,r.subscribeToSnapshotEvents)(t=>{var r;let a;c.current&&(d((r=t.sessions,(a=e?.trim())?r.filter(e=>e.projectId===a):r)),o(null),l(!1))}),i=()=>{u(),n()},v=()=>{"visible"===document.visibilityState?i():n()};return window.addEventListener("focus",i),document.addEventListener("visibilitychange",v),()=>{c.current=!1,s(),a(),window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",v)}},[d,u,e]),{sessions:a,loading:s,error:i,refresh:u}}e.s(["useSessions",()=>a])},2004,e=>{"use strict";var t=e.i(71645);function r(e,t){return{id:e,repo:"string"==typeof t?.repo?t.repo:null,path:"string"==typeof t?.path?t.path:null,iconUrl:"string"==typeof t?.iconUrl?t.iconUrl:null,boardDir:"string"==typeof t?.boardDir?t.boardDir:null,boardFile:"string"==typeof t?.boardFile?t.boardFile:null,description:"string"==typeof t?.description?t.description:null,defaultBranch:"string"==typeof t?.defaultBranch&&t.defaultBranch.trim().length>0?t.defaultBranch:"main",agent:"string"==typeof t?.agent&&t.agent.trim().length>0?t.agent:"claude-code",agentPermissions:"string"==typeof t?.agentPermissions&&t.agentPermissions.trim().length>0?t.agentPermissions:null,agentModel:"string"==typeof t?.agentModel&&t.agentModel.trim().length>0?t.agentModel:null,agentReasoningEffort:"string"==typeof t?.agentReasoningEffort&&t.agentReasoningEffort.trim().length>0?t.agentReasoningEffort:null}}function a(){let[e,a]=(0,t.useState)([]),[n,s]=(0,t.useState)(!0),[l,i]=(0,t.useState)(null),o=(0,t.useRef)(!1),c=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/config");if(!e.ok)throw Error(`Failed to fetch config: ${e.status}`);let t=await e.json();a(function(e){if(!e||"object"!=typeof e)return[];let t=e.projects;return t?Array.isArray(t)?t.map((e,t)=>e&&"object"==typeof e?r("string"==typeof e.id&&e.id.trim().length>0?e.id:`project-${t+1}`,e):r(`project-${t+1}`,null)):"object"==typeof t?Object.entries(t).map(([e,t])=>r(e,t&&"object"==typeof t?t:null)):[]:[]}(t)),i(null)}catch(e){a([]),i(e instanceof Error?e.message:"Failed to fetch config")}finally{s(!1)}},[]);return(0,t.useEffect)(()=>{o.current||(o.current=!0,c())},[c]),{projects:e,loading:n,error:l,refresh:c}}e.s(["useConfig",()=>a])},36832,80235,2758,11077,45241,e=>{"use strict";let t,r,a;var n=e.i(18050),s=e.i(71645),l=e.i(75254);let i=(0,l.default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),o=(0,l.default)("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);var c=e.i(18620);let d="conductor-workspace-sidebar-width";function u({sidebar:e,children:t,sidebarOpen:r,onToggleSidebar:a}){let[l,u]=(0,s.useState)(356),[v,x]=(0,s.useState)(!1);(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(d),t=e?Number.parseInt(e,10):NaN;Number.isFinite(t)&&u(Math.min(460,Math.max(296,t)))}catch{}},[]),(0,s.useEffect)(()=>{if(!v)return;let e=e=>{u(Math.min(460,Math.max(296,e.clientX)))},t=()=>{x(!1)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t),document.body.style.userSelect="",document.body.style.cursor="";try{window.localStorage.setItem(d,String(l))}catch{}}},[v,l]);let p={"--workspace-sidebar-width":`${l}px`};return(0,n.jsxs)("div",{style:p,className:"relative flex h-dvh min-h-[100dvh] w-full max-w-full overflow-hidden bg-[var(--vk-bg-main)] text-[var(--vk-text-normal)]",children:[r&&(0,n.jsx)("button",{type:"button",className:"absolute inset-0 z-20 bg-black/45 lg:hidden",onClick:a,"aria-label":"Close workspace panel"}),(0,n.jsx)("aside",{className:(0,c.cn)("absolute inset-y-0 left-0 z-30 flex h-full w-[min(90vw,var(--workspace-sidebar-width))] flex-col border-r border-[var(--vk-border)] bg-[var(--vk-bg-panel)] transition-transform duration-200 lg:relative lg:w-[var(--workspace-sidebar-width)]",r?"translate-x-0":"-translate-x-full lg:-translate-x-0 lg:w-0 lg:overflow-hidden lg:border-r-0","lg:left-auto"),children:e}),r?(0,n.jsx)("div",{className:"absolute bottom-0 left-[var(--workspace-sidebar-width)] top-0 z-30 hidden w-2 -translate-x-1/2 cursor-col-resize lg:block",onMouseDown:()=>x(!0),"aria-hidden":"true",children:(0,n.jsx)("div",{className:"mx-auto h-full w-px bg-transparent transition-colors hover:bg-[var(--vk-border)]"})}):null,r&&(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute left-[var(--workspace-sidebar-width)] top-2 z-40 hidden h-7 w-7 -translate-x-1/2 items-center justify-center rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)] shadow-[0_0_0_1px_rgba(0,0,0,0.25)] hover:bg-[var(--vk-bg-hover)] lg:inline-flex","aria-label":"Hide workspace panel",children:(0,n.jsx)(o,{className:"h-4 w-4"})}),(0,n.jsxs)("main",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden bg-[var(--vk-bg-main)]",children:[!r&&(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute left-2 top-2 z-40 inline-flex h-7 w-7 items-center justify-center rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Open workspace panel",children:(0,n.jsx)(i,{className:"h-4 w-4"})}),t]})]})}e.s(["AppShell",()=>u],36832);let v=(0,l.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),x=(0,s.memo)(function({title:e,onOpenPreferences:t}){return(0,n.jsxs)("header",{className:"flex h-12 items-center border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-4 text-[13px] text-[var(--vk-text-muted)] sm:h-14 sm:px-5 sm:text-[14px]",children:[(0,n.jsx)("div",{className:"min-w-0 flex-1 text-center",children:(0,n.jsx)("span",{className:"block truncate font-medium tracking-[0.01em] text-[var(--vk-text-normal)]",children:e??"All Projects"})}),t?(0,n.jsx)("div",{className:"ml-1 flex shrink-0",children:(0,n.jsx)("button",{type:"button",onClick:t,className:"inline-flex h-8 w-8 items-center justify-center rounded-[6px] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]","aria-label":"Open preferences",title:"Preferences",children:(0,n.jsx)(v,{className:"h-4 w-4"})})}):null]})});e.s(["TopBar",0,x],80235);let p=(0,l.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers3",()=>p],2758);var m=e.i(7233),h=e.i(37727),b=e.i(52808);let f=(0,l.default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var g=e.i(55436);let k=[{top:0,left:1,delay:"0ms",opacity:1},{top:0,left:9,delay:"120ms",opacity:.9},{top:6,left:1,delay:"240ms",opacity:.8},{top:6,left:9,delay:"360ms",opacity:.7},{top:12,left:1,delay:"480ms",opacity:.6},{top:12,left:9,delay:"600ms",opacity:.45}];function y(e){let t=e.metadata.worktree?.trim()??"";return t&&t.replace(/\\/g,"/").replace(/\/+$/,"").includes("/worktrees/")?"worktree":"local"}function j(e){let t=e.branch?.trim();if(t)return t;let r=e.summary?.trim()||e.metadata.summary?.trim();return r||(e.status?.trim()?e.status.replace(/[_-]+/g," "):e.id.slice(0,8))}function w({running:e}){return(0,n.jsx)("span",{className:"mt-1 inline-flex h-4 w-4 shrink-0 items-center justify-center text-[var(--vk-orange)]",children:(0,n.jsx)("span",{className:"relative h-[12px] w-[10px]",children:k.map((t,r)=>(0,n.jsx)("span",{className:(0,c.cn)("absolute h-[2px] w-[2px] rounded-full bg-current",e&&"animate-pulse"),style:{top:`${Math.round(.75*t.top)}px`,left:`${Math.round(.75*t.left)}px`,opacity:t.opacity,animationDelay:t.delay}},r))})})}function N({sessions:e,selectedId:t,onSelect:r,onArchive:a,onCreateWorkspace:l,showHeader:i=!0}){let[o,d]=(0,s.useState)(""),[u,v]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),m=(0,s.useMemo)(()=>{let t=e.filter(e=>"archived"!==e.status);if(!o.trim())return t;let r=o.toLowerCase();return t.filter(e=>{let t=e.summary??"",a=e.branch??"",n=e.metadata.agent??"",s=y(e),l=j(e);return e.id.toLowerCase().includes(r)||e.projectId.toLowerCase().includes(r)||t.toLowerCase().includes(r)||a.toLowerCase().includes(r)||n.toLowerCase().includes(r)||s.toLowerCase().includes(r)||l.toLowerCase().includes(r)})},[o,e]),h=async(e,t)=>{if(e.stopPropagation(),e.preventDefault(),a&&u!==t){v(t);try{await a(t)}catch(e){console.error("Failed to archive session",e),p(t),window.setTimeout(()=>p(null),3e3)}finally{v(e=>e===t?null:e)}}},k=(0,s.useMemo)(()=>[...m].sort((e,t)=>new Date(t.lastActivityAt).getTime()-new Date(e.lastActivityAt).getTime()),[m]);return(0,n.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[i&&(0,n.jsxs)("div",{className:"flex h-[33px] items-center gap-1 px-2",children:[(0,n.jsx)("p",{className:"text-[16px] text-[var(--vk-text-normal)]",children:"Workspaces"}),l&&(0,n.jsx)("button",{type:"button",onClick:l,className:"ml-auto inline-flex h-5 w-5 items-center justify-center rounded-[3px] text-[var(--vk-orange)] hover:bg-[var(--vk-bg-hover)] lg:hidden","aria-label":"New workspace",children:(0,n.jsx)("span",{className:"text-[14px]",children:"+"})})]}),(0,n.jsx)("div",{className:(0,c.cn)("flex h-[38px] items-center px-2 pb-1.5",!i&&"pt-1.5"),children:(0,n.jsxs)("label",{className:"flex h-[30px] flex-1 items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-2",children:[(0,n.jsx)(g.Search,{className:"h-3.5 w-3.5 text-[var(--vk-text-muted)]"}),(0,n.jsx)("input",{value:o,onChange:e=>d(e.target.value),placeholder:"Search...",className:"ml-1.5 w-full bg-transparent text-[14px] text-[var(--vk-text-normal)] outline-none placeholder:text-[var(--vk-text-muted)]"})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:0===k.length?(0,n.jsx)("p",{className:"px-2 py-2 text-[14px] text-[var(--vk-text-muted)]",children:"No sessions"}):(0,n.jsx)("div",{className:"space-y-2",children:k.map(e=>{let s=(0,b.getAttentionLevel)(e),l=function(e){for(let t of[e.metadata.lastStderr,e.metadata.summary,e.summary]){if(!t)continue;let e=t.match(/(\d+)\s+insertions?\(\+\),\s+(\d+)\s+deletions?\(-\)/i);if(!e)continue;let r=Number.parseInt(e[1]??"0",10),a=Number.parseInt(e[2]??"0",10);if(Number.isFinite(r)&&Number.isFinite(a))return{additions:r,deletions:a}}return null}(e),i=function(e,t){let r=`${e.summary??""} ${e.metadata.summary??""}`.toLowerCase();if("killed"===e.status||r.includes("interrupted"))return{label:"Interrupted",className:"text-[var(--vk-orange)]"};switch(t){case"merge":return{label:"Ready",className:"text-[var(--vk-green)]"};case"respond":return{label:"Needs input",className:"text-[var(--vk-red)]"};case"review":return{label:"Review",className:"text-[var(--vk-orange)]"};case"working":return{label:"Running",className:"text-[#4e87f3]"};case"done":return{label:"Done",className:"text-[var(--vk-text-muted)]"};default:return{label:"Queued",className:"text-[var(--vk-text-muted)]"}}}(e,s),o=e.id===t,d=u===e.id,v=x===e.id;return(0,n.jsxs)("div",{onClick:()=>r(e.id),onKeyDown:t=>{var a;return a=e.id,void(("Enter"===t.key||" "===t.key)&&(t.preventDefault(),r(a)))},role:"button",tabIndex:0,className:(0,c.cn)("group flex w-full items-start gap-3 rounded-[8px] border px-3 py-3 text-left transition-colors",o?"border-[rgba(234,122,42,0.28)] bg-[rgba(255,255,255,0.08)]":"border-[var(--vk-border)] bg-[rgba(255,255,255,0.02)] hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsx)(w,{running:"working"===s}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("span",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-[var(--vk-text-strong)]",children:y(e)}),(0,n.jsx)("span",{className:"shrink-0 rounded-[8px] bg-[rgba(255,255,255,0.06)] px-2.5 py-1 text-[11px] font-medium",children:l?(0,n.jsxs)("span",{className:"flex items-center gap-2",children:[(0,n.jsxs)("span",{className:"text-[#18c58f]",children:["+",l.additions]}),(0,n.jsxs)("span",{className:"text-[#f26d6d]",children:["-",l.deletions]})]}):(0,n.jsx)("span",{className:i.className,children:i.label})})]}),(0,n.jsx)("span",{className:"mt-1 block truncate text-[12px] text-[var(--vk-text-muted)]",children:j(e)})]}),a?(0,n.jsx)("button",{type:"button",onClick:t=>void h(t,e.id),disabled:d,className:(0,c.cn)("mt-0.5 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-[6px] border border-[var(--vk-border)] text-[var(--vk-text-muted)] transition","opacity-70 group-hover:opacity-100 focus-visible:opacity-100","hover:border-[var(--vk-border)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]",d&&"cursor-wait opacity-100"),"aria-label":`Archive session ${e.id}`,title:v?"Archive failed":"Archive session",children:(0,n.jsx)(f,{className:(0,c.cn)("h-3.5 w-3.5",v&&"text-red-400")})}):null]},e.id)})})})]})}var C=e.i(20783),S=Symbol.for("react.lazy"),A=s[" use ".trim().toString()];function E(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===S&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var M=((a=s.forwardRef((e,t)=>{let{children:r,...a}=e;if(E(r)&&"function"==typeof A&&(r=A(r._payload)),s.isValidElement(r)){var n;let e,l,i=(n=r,(l=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.ref:(l=(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.props.ref:n.props.ref||n.ref),o=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==s.Fragment&&(o.ref=t?(0,C.composeRefs)(t,i):i),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null})).displayName="Slot.SlotClone",t=a,(r=s.forwardRef((e,r)=>{let{children:a,...l}=e;E(a)&&"function"==typeof A&&(a=A(a._payload));let i=s.Children.toArray(a),o=i.find(R);if(o){let e=o.props.children,a=i.map(t=>t!==o?t:s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null);return(0,n.jsx)(t,{...l,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,a):null})}return(0,n.jsx)(t,{...l,ref:r,children:a})})).displayName="Slot.Slot",r),L=Symbol("radix.slottable");function R(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===L}let P={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",primary:"border-[var(--vk-border)] bg-[var(--vk-bg-active)] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",ghost:"border-transparent bg-transparent text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-normal)]",danger:"border-[var(--vk-red)]/40 bg-[color:color-mix(in_srgb,var(--vk-red)_18%,transparent)] text-[var(--vk-red)] hover:bg-[color:color-mix(in_srgb,var(--vk-red)_24%,transparent)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]"},I={sm:"h-7 px-2.5 text-[12px] gap-1",md:"h-8 px-3 text-[13px] gap-1.5",lg:"h-9 px-3.5 text-[14px] gap-2",icon:"h-8 w-8 p-0"},_=(0,s.forwardRef)(({variant:e="default",size:t="md",asChild:r,className:a,children:s,...l},i)=>(0,n.jsx)(r?M:"button",{ref:i,className:(0,c.cn)("inline-flex items-center justify-center rounded-[var(--radius-sm)] border font-medium","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--vk-orange)]","disabled:pointer-events-none disabled:opacity-45",P[e],I[t],a),...l,children:s}));_.displayName="Button",e.s(["Button",0,_],11077);let $=(0,s.memo)(function({orgLabel:e,projects:t,selectedProjectId:r,onSelectProject:a,onUnlinkProject:l,sessions:i,selectedSessionId:o,onSelectSession:d,onArchiveSession:u,onCreateWorkspace:v}){let[x,f]=(0,s.useState)(null),[g,k]=(0,s.useState)(null),[y,j]=(0,s.useState)(null),w=(0,s.useMemo)(()=>{let e=new Map;for(let t of i){if("archived"===t.status)continue;let r=e.get(t.projectId)??{total:0,active:0};r.total+=1,"done"!==(0,b.getAttentionLevel)(t)&&(r.active+=1),e.set(t.projectId,r)}return e},[i]),C=(0,s.useMemo)(()=>i.filter(e=>"archived"!==e.status&&"done"!==(0,b.getAttentionLevel)(e)).length,[i]),S=(0,s.useMemo)(()=>t.find(e=>e.id===g)??null,[g,t]);async function A(){if(l&&g){f(g),j(null);try{await l(g),k(null)}catch(e){j(e instanceof Error?e.message:"Failed to unlink project.")}finally{f(null)}}}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col bg-[var(--vk-bg-panel)]",children:[(0,n.jsxs)("section",{className:"border-b border-[var(--vk-border)] px-4 py-4",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-[10px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] text-[var(--vk-text-normal)]",children:(0,n.jsx)(p,{className:"h-4 w-4"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-[15px] font-medium leading-[21px] text-[var(--vk-text-strong)]",children:e}),(0,n.jsxs)("p",{className:"mt-1 text-[12px] text-[var(--vk-text-muted)]",children:[t.length," projects, ",C," active sessions"]})]})]}),(0,n.jsxs)("button",{type:"button",onClick:v,className:"mt-3 inline-flex h-8 w-full items-center justify-center gap-1 rounded-[6px] border border-[var(--vk-border)] px-2 text-[12px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Add workspace",children:[(0,n.jsx)(m.Plus,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:"Add Workspace"})]})]}),(0,n.jsxs)("section",{className:"border-b border-[var(--vk-border)] pb-2 pt-1.5",children:[(0,n.jsx)("div",{className:"flex h-[28px] items-center px-3",children:(0,n.jsx)("p",{className:"text-[11px] uppercase tracking-[0.08em] text-[var(--vk-text-muted)]",children:"Projects"})}),(0,n.jsxs)("div",{className:"max-h-[260px] overflow-y-auto px-2",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>a(null),className:(0,c.cn)("mb-1.5 flex w-full items-center gap-3 rounded-[6px] px-3 py-2.5 text-left text-[14px] leading-[21px]",null===r?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[var(--vk-text-muted)]"}),(0,n.jsx)("span",{className:"truncate",children:"All projects"}),(0,n.jsx)("span",{className:"ml-auto text-[11px] text-[var(--vk-text-muted)]",children:t.length})]}),t.map(e=>{let t=r===e.id,s=w.get(e.id)??{total:0,active:0},i=x===e.id;return(0,n.jsxs)("div",{className:(0,c.cn)("group relative mb-1.5 flex items-center rounded-[6px]",t?"bg-[var(--vk-bg-hover)]":"hover:bg-[var(--vk-bg-hover)]"),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>a(e.id),className:(0,c.cn)("flex min-w-0 flex-1 items-center gap-3 px-3 py-2.5 text-left text-[14px] leading-[21px]",t?"text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)]"),children:[(0,n.jsx)("span",{className:"mt-1 h-2.5 w-2.5 shrink-0 rounded-full bg-[#3c83f6]"}),(0,n.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"block truncate",children:e.id}),e.description?(0,n.jsx)("span",{className:"block truncate text-[11px] text-[var(--vk-text-muted)]",children:e.description}):null]}),(0,n.jsxs)("span",{className:"shrink-0 text-right",children:[(0,n.jsxs)("span",{className:"block text-[11px] text-[var(--vk-text-normal)]",children:[s.active," active"]}),(0,n.jsxs)("span",{className:"block text-[10px] text-[var(--vk-text-muted)]",children:[s.total," total"]})]})]}),l&&(0,n.jsx)("button",{type:"button",disabled:i,onClick:t=>{t.stopPropagation(),j(null),k(e.id)},className:"mr-2 hidden shrink-0 items-center justify-center rounded-[4px] p-1 text-[var(--vk-text-muted)] hover:bg-[var(--vk-red)]/10 hover:text-[var(--vk-red)] group-hover:inline-flex disabled:opacity-50","aria-label":`Unlink ${e.id}`,title:"Unlink project",children:(0,n.jsx)(h.X,{className:"h-3.5 w-3.5"})})]},e.id)})]})]}),(0,n.jsx)("section",{className:"flex min-h-0 flex-1 flex-col pt-1.5",children:(0,n.jsx)(N,{sessions:i,selectedId:o,onSelect:d,onArchive:u,onCreateWorkspace:v,showHeader:!1})})]}),S&&(0,n.jsx)("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-black/60 px-4",onClick:()=>{x||(k(null),j(null))},children:(0,n.jsxs)("div",{className:"surface-card w-full max-w-md rounded-[var(--radius-lg)] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)]",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"unlink-project-title",children:[(0,n.jsxs)("div",{className:"border-b border-[var(--vk-border)] px-4 py-3",children:[(0,n.jsx)("h2",{id:"unlink-project-title",className:"text-[17px] font-medium text-[var(--vk-text-strong)]",children:"Unlink Project"}),(0,n.jsxs)("p",{className:"mt-1 text-[12px] text-[var(--vk-text-muted)]",children:["Remove ",(0,n.jsx)("span",{className:"font-medium text-[var(--vk-text-normal)]",children:S.id})," from this workspace configuration."]})]}),(0,n.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,n.jsx)("p",{className:"text-[13px] leading-5 text-[var(--vk-text-normal)]",children:"This only removes the project from Conductor. Repository files on disk are not deleted."}),y?(0,n.jsx)("div",{className:"rounded-[var(--radius-md)] border border-[var(--vk-red)]/35 bg-[color:color-mix(in_srgb,var(--vk-red)_12%,transparent)] px-3 py-2 text-[12px] text-[var(--vk-red)]",children:y}):null]}),(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--vk-border)] px-4 py-3",children:[(0,n.jsx)(_,{type:"button",variant:"ghost",onClick:()=>{k(null),j(null)},disabled:null!==x,children:"Cancel"}),(0,n.jsx)(_,{type:"button",variant:"danger",onClick:()=>void A(),disabled:null!==x,children:x===S.id?"Unlinking...":"Unlink Project"})]})]})})]})});e.s(["WorkspaceSidebarPanel",0,$],45241)},64816,e=>{e.v(t=>Promise.all(["static/chunks/38c2e6a114505dfb.js","static/chunks/5e05e67a26b7ecbc.js"].map(t=>e.l(t))).then(()=>t(31437)))},24629,e=>{e.v(t=>Promise.all(["static/chunks/870a993d28314a90.js"].map(t=>e.l(t))).then(()=>t(96933)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},52808,e=>{"use strict";let t=new Set(["archived","done","killed","errored","terminated","merged","cleanup"]);function r(e){return"merged"===e.status||"archived"===e.status||"killed"===e.status||"errored"===e.status||"cleanup"===e.status||"done"===e.status||"terminated"===e.status||e.pr&&("merged"===e.pr.state||"closed"===e.pr.state)?"done":"mergeable"===e.status||"approved"===e.status||e.pr?.mergeability.mergeable?"merge":"waiting_input"===e.activity||"blocked"===e.activity||"needs_input"===e.status||"stuck"===e.status||"exited"===e.activity?"respond":"ci_failed"===e.status||"changes_requested"===e.status||e.pr&&("failing"===e.pr.ciStatus||"changes_requested"===e.pr.reviewDecision||!e.pr.mergeability.noConflicts)?"review":"review_pending"===e.status||e.pr&&!e.pr.isDraft&&("pending"===e.pr.reviewDecision||"none"===e.pr.reviewDecision)?"pending":"working"}e.s(["TERMINAL_STATUSES",0,t,"getAttentionLevel",()=>r])},20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}function i(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>i])},81140,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},30030,e=>{"use strict";var t=e.i(71645),r=e.i(18050);function n(e,i=[]){let o=[],s=()=>{let r=o.map(e=>t.createContext(e));return function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return s.scopeName=e,[function(n,i){let s=t.createContext(i),a=o.length;o=[...o,i];let l=n=>{let{scope:i,children:o,...l}=n,c=i?.[e]?.[a]||s,u=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(r,o){let l=o?.[e]?.[a]||s,c=t.useContext(l);if(c)return c;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}(s,...i)]}e.s(["createContextScope",()=>n])},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),i=e.i(18050);function o(e){var r;let o,s=(r=e,(o=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,c)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,o),l=t.forwardRef((e,r)=>{let{children:n,...o}=e,l=t.Children.toArray(n),c=l.find(a);if(c){let e=c.props.children,n=l.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(s,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...o,ref:r,children:n})});return l.displayName=`${e}.Slot`,l}var s=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}function l(e){let s=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(s),[c,u]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:s,collectionRef:o,children:n})};d.displayName=s;let f=e+"CollectionSlot",p=o(f),m=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,s=u(f,r),a=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(p,{ref:a,children:o})});m.displayName=f;let h=e+"CollectionItemSlot",g="data-radix-collection-item",y=o(h),v=t.default.forwardRef((e,r)=>{let{scope:o,children:s,...a}=e,l=t.default.useRef(null),c=(0,n.useComposedRefs)(r,l),d=u(h,o);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),(0,i.jsx)(y,{...{[g]:""},ref:c,children:s})});return v.displayName=h,[{Provider:d,Slot:m,ItemSlot:v},function(r){let n=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var c=new WeakMap;function u(e,t){var r,n;let i,o,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(s=(o=d(n))>=0?o:i+o)<0||s>=i?-1:s);return -1===a?void 0:e[a]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],c.set(this,!0)}set(e,t){return c.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,s=d(e),a=s>=0?s:o+s,l=a<0||a>=o?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!i;s<0&&a++;let u=[...this.#e],f=!1;for(let e=a;e<c;e++)if(a===e){let o=u[e];u[e]===t&&(o=u[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=u(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=u(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return u(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l],75830)},34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r])},10772,e=>{"use strict";var t=e.i(71645),r=e.i(34620),n=t[" useId ".trim().toString()]||(()=>void 0),i=0;function o(e){let[o,s]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||s(e=>e??String(i++))},[e]),e||(o?`radix-${o}`:"")}e.s(["useId",()=>o])},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(20783),i=e.i(18050),o=Symbol("radix.slottable");function s(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var o,a;let l,c,u,d=(a=o=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,c)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,c=l,(u=t.forwardRef((e,r)=>{let{children:n,...o}=e,a=t.Children.toArray(n),l=a.find(s);if(l){let e=l.props.children,n=a.map(r=>r!==l?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(c,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(c,{...o,ref:r,children:n})})).displayName=`${o}.Slot`,u),f=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?d:r,{...o,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});function l(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>a,"dispatchDiscreteCustomEvent",()=>l],48425)},30207,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},69340,e=>{"use strict";var t=e.i(71645),r=e.i(34620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function i({prop:e,defaultProp:r,onChange:i=()=>{},caller:o}){let[s,a,l]=function({defaultProp:e,onChange:r}){let[i,o]=t.useState(e),s=t.useRef(i),a=t.useRef(r);return n(()=>{a.current=r},[r]),t.useEffect(()=>{s.current!==i&&(a.current?.(i),s.current=i)},[i,s]),[i,o,a]}({defaultProp:r,onChange:i}),c=void 0!==e,u=c?e:s;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=c},[c,o])}return[u,t.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else a(t)},[c,e,a,l])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>i],69340)},86318,e=>{"use strict";var t=e.i(71645);e.i(18050);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(75830),i=e.i(20783),o=e.i(30030),s=e.i(10772),a=e.i(48425),l=e.i(30207),c=e.i(69340),u=e.i(86318),d=e.i(18050),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[h,g,y]=(0,n.createCollection)(m),[v,x]=(0,o.createContextScope)(m,[y]),[w,C]=v(m),b=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(A,{...e,ref:t})})}));b.displayName=m;var A=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:h=!1,dir:y,currentTabStopId:v,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:C,onEntryFocus:b,preventScrollOnEntryFocus:A=!1,...k}=e,R=t.useRef(null),S=(0,i.useComposedRefs)(n,R),P=(0,u.useDirection)(y),[M,O]=(0,c.useControllableState)({prop:v,defaultProp:x??null,onChange:C,caller:m}),[T,N]=t.useState(!1),I=(0,l.useCallbackRef)(b),G=g(o),j=t.useRef(!1),[D,B]=t.useState(0);return t.useEffect(()=>{let e=R.current;if(e)return e.addEventListener(f,I),()=>e.removeEventListener(f,I)},[I]),(0,d.jsx)(w,{scope:o,orientation:s,dir:P,loop:h,currentTabStopId:M,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>B(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>B(e=>e-1),[]),children:(0,d.jsx)(a.Primitive.div,{tabIndex:T||0===D?-1:0,"data-orientation":s,...k,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!T){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=G().filter(e=>e.focusable);E([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),A)}}j.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>N(!1))})})}),k="RovingFocusGroupItem",R=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:u,...f}=e,p=(0,s.useId)(),m=c||p,y=C(k,i),v=y.currentTabStopId===m,x=g(i),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:A}=y;return t.useEffect(()=>{if(o)return w(),()=>b()},[o,w,b]),(0,d.jsx)(h.ItemSlot,{scope:i,id:m,focusable:o,active:l,children:(0,d.jsx)(a.Primitive.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?y.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return S[i]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=y.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>E(i))}}),children:"function"==typeof u?u({isCurrentTabStop:v,hasTabStop:null!=A}):u})})});R.displayName=k;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>R,"Root",()=>b,"createRovingFocusGroupScope",()=>x])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),i=e=>{var i;let s,a,{present:l,children:c}=e,u=function(e){var r,i;let[s,a]=t.useState(),l=t.useRef(null),c=t.useRef(e),u=t.useRef("none"),[d,f]=(r=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>i[e][t]??e,r));return t.useEffect(()=>{let e=o(l.current);u.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=c.current;if(r!==e){let n=u.current,i=o(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let n=o(l.current).includes(CSS.escape(r.animationName));if(r.target===s&&n&&(f("ANIMATION_END"),!c.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},n=e=>{e.target===s&&(u.current=o(l.current))};return s.addEventListener("animationstart",n),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",n),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}f("ANIMATION_END")},[s,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(l),d="function"==typeof c?c({present:u.isPresent}):t.Children.only(c),f=(0,r.useComposedRefs)(u.ref,(i=d,(a=(s=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.ref:(a=(s=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.props.ref:i.props.ref||i.ref));return"function"==typeof c||u.isPresent?t.cloneElement(d,{ref:f}):null};function o(e){return e?.animationName||"none"}i.displayName="Presence",e.s(["Presence",()=>i])},90993,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n=(0,e.i(71645).forwardRef)(({className:e,...n},i)=>(0,t.jsx)("div",{ref:i,className:(0,r.cn)("surface-card rounded-[var(--radius-md)] border",e),...n}));function i({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center gap-2 border-b border-[var(--vk-border)] px-3 py-2",e),...n})}function o({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("px-3 py-2",e),...n})}n.displayName="Card",e.s(["Card",0,n,"CardContent",()=>o,"CardHeader",()=>i])},17442,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)]",success:"border-transparent bg-transparent text-[var(--vk-green)]",warning:"border-transparent bg-transparent text-[var(--vk-orange)]",error:"border-transparent bg-transparent text-[var(--vk-red)]",info:"border-transparent bg-transparent text-[var(--vk-text-muted)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-muted)]"};function i({variant:e="default",className:i,children:o}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-flex items-center gap-1 rounded-[3px] border px-1.5 py-0.5 text-[11px] leading-none",n[e],i),children:o})}e.s(["Badge",()=>i])},97878,e=>{"use strict";let t=new Set,r=null,n=null;function i(e){return Array.isArray(e)?{type:"snapshot",sessions:e}:e&&"object"==typeof e&&"snapshot"===e.type&&Array.isArray(e.sessions)?e:null}function o(e){for(let r of t)r(e)}async function s(){if("function"!=typeof fetch)return;let e=(async()=>{try{let e=await fetch("/api/sessions");if(!e.ok)return;let t=await e.json().catch(()=>null),r=i(t);if(!r)return;o(r)}catch{}})();n=e.finally(()=>{n===e&&(n=null)}),await e}function a(e){return t.add(e),!r&&"u">typeof EventSource&&((r=new EventSource("/api/events")).onmessage=e=>{try{let t=i(JSON.parse(e.data));if(!t)return;o(t)}catch{}},r.addEventListener("refresh",()=>{n||s()}),r.onerror=()=>{0===t.size&&(r?.close(),r=null)}),()=>{t.delete(e),0===t.size&&r&&(r.close(),r=null)}}e.s(["subscribeToSnapshotEvents",()=>a])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},90272,e=>{"use strict";let t=(0,e.i(75254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],90272)},55716,e=>{"use strict";let t=(0,e.i(75254).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",()=>t],55716)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},75505,e=>{"use strict";let t=(0,e.i(75254).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],75505)},82735,e=>{"use strict";let t=(0,e.i(75254).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",()=>t],82735)},78818,e=>{"use strict";var t=e.i(71645);let r=new Set,n=[],i=!0,o=0,s=null,a=null;function l(){for(let e of r)e()}function c(){return{agents:n,loading:i}}function u(){return n.length>0&&Date.now()-o<3e4}function d(){null===a&&(a=window.setTimeout(()=>{a=null,f(!0)},1e4))}async function f(e=!1){if(!e&&u()){i&&(i=!1,l());return}return s||(i=!0,l(),s=(async()=>{try{var e;let t=await fetch("/api/agents",{cache:"no-store"});if(!t.ok)throw Error(`Failed to fetch agents: ${t.status}`);let r=(e=await t.json(),Array.isArray(e)?e:e&&"object"==typeof e&&"agents"in e&&Array.isArray(e.agents)?e.agents:[]);r.length>0?(n=r,o=Date.now(),null!==a&&(window.clearTimeout(a),a=null)):d()}catch{d()}finally{i=!1,s=null,l()}})())}function p(){let[e,n]=(0,t.useState)(()=>c());return(0,t.useEffect)(()=>{let e=()=>n(c());r.add(e),e(),f();let t=()=>{u()||f(!0)},i=()=>{"visible"!==document.visibilityState||u()||f(!0)};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",i),()=>{r.delete(e),window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",i)}},[]),e}e.s(["useAgents",()=>p])},81633,e=>{"use strict";function t(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}e.s(["normalizeAgentName",()=>t])},37766,e=>{"use strict";let t=["claude-code","codex","gemini","qwen-code"],r={claudeCode:"pro",codex:"chatgpt",gemini:"oauth",qwenCode:"oauth"},n={"claude-code":{agent:"claude-code",label:"Claude Code",accessKey:"claudeCode",defaultAccess:"pro",accessOptions:[{id:"pro",label:"Claude Pro",description:"Shows the current Sonnet models that Claude Code documents for Pro usage."},{id:"max",label:"Claude Max",description:"Unlocks both Sonnet and Opus model choices in Claude Code."},{id:"api",label:"Anthropic API",description:"Use direct Anthropic API credentials instead of a Claude subscription."}]},codex:{agent:"codex",label:"Codex",accessKey:"codex",defaultAccess:"chatgpt",accessOptions:[{id:"chatgpt",label:"ChatGPT Plan",description:"Use the ChatGPT-backed Codex login flow for paid ChatGPT workspaces."},{id:"api",label:"OpenAI API",description:"Use direct OpenAI API credentials when Codex is pointed at the API."}]},gemini:{agent:"gemini",label:"Gemini",accessKey:"gemini",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Google Login",description:"Use the built-in Google account flow that Gemini CLI ships with."},{id:"api",label:"Gemini API",description:"Use a Gemini API key or Vertex AI project for broader model control."}]},"qwen-code":{agent:"qwen-code",label:"Qwen Code",accessKey:"qwenCode",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Qwen OAuth",description:"Use Qwen Code's built-in browser login and bundled provider defaults."},{id:"api",label:"DashScope / Custom API",description:"Use DashScope or another OpenAI-compatible endpoint configured for Qwen Code."}]}},i=[{id:"low",label:"Low",description:"Fast responses with lighter reasoning."},{id:"medium",label:"Medium",description:"Balanced speed and reasoning depth for everyday tasks."},{id:"high",label:"High",description:"Deeper reasoning for more complex tasks."}],o=[...i,{id:"xhigh",label:"Extra High",description:"Maximum reasoning depth for the hardest tasks."}];function s(e,t,r,n=function(e){return e.trim().split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":e[0]?.toUpperCase()+e.slice(1)).join(" ")}(e)){return{id:e,label:n,description:t,access:r}}let a={"claude-code":{modelsByAccess:{pro:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6")],max:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6")],api:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude API model for lightweight tasks.",["api"],"Claude Haiku 4.5")]},defaultModelByAccess:{pro:"claude-sonnet-4-6",max:"claude-opus-4-6",api:"claude-sonnet-4-6"},reasoningOptionsByAccess:{pro:i,max:i,api:i},defaultReasoningByAccess:{pro:"medium",max:"high",api:"medium"}},codex:{modelsByAccess:{chatgpt:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.3-codex-spark","Fast Codex model optimized for rapid iteration.",["chatgpt"],"GPT-5.3-Codex-Spark"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")],api:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")]},defaultModelByAccess:{chatgpt:"gpt-5.4",api:"gpt-5.4"},reasoningOptionsByAccess:{chatgpt:o,api:o},defaultReasoningByAccess:{chatgpt:"high",api:"high"}},gemini:{modelsByAccess:{oauth:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")],api:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")]},defaultModelByAccess:{oauth:"gemini-3.1-pro-preview",api:"gemini-3.1-pro-preview"}},"qwen-code":{modelsByAccess:{oauth:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")],api:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")]},defaultModelByAccess:{oauth:"coder-model",api:"coder-model"}}};function l(e){let r=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return t.includes(r)?r:null}function c(){return{...r}}function u(e){return null!==l(e)}function d(e){let t=l(e);return t?n[t]:null}function f(e,t){let r=d(e);if(!r)return null;let n=t?.[r.accessKey];return"string"==typeof n&&r.accessOptions.some(e=>e.id===n)?n:r.defaultAccess}function p(e,t){let r=l(e);if(!r)return[];let n=f(r,t);if(!n)return[];let i=a[r],o=i.modelsByAccess[n]??[];if(o.length>0)return[...o];let s=[],c=new Set;for(let e of Object.values(i.modelsByAccess))if(Array.isArray(e))for(let t of e)c.has(t.id)||(c.add(t.id),s.push(t));return s}function m(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultModelByAccess[n]??null:null}function h(e,t){let r=l(e);if(!r)return[];let n=f(r,t);return n?a[r].reasoningOptionsByAccess?.[n]??[]:[]}function g(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultReasoningByAccess?.[n]??null:null}e.s(["getAgentModelCatalog",()=>d,"getAvailableAgentModels",()=>p,"getAvailableAgentReasoningEfforts",()=>h,"getDefaultAgentModel",()=>m,"getDefaultAgentReasoningEffort",()=>g,"getDefaultModelAccessPreferences",()=>c,"resolveAgentModelAccess",()=>f,"supportsAgentModelSelection",()=>u])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},52808,e=>{"use strict";let t=new Set(["archived","done","killed","errored","terminated","merged","cleanup"]);function r(e){return"merged"===e.status||"archived"===e.status||"killed"===e.status||"errored"===e.status||"cleanup"===e.status||"done"===e.status||"terminated"===e.status||e.pr&&("merged"===e.pr.state||"closed"===e.pr.state)?"done":"mergeable"===e.status||"approved"===e.status||e.pr?.mergeability.mergeable?"merge":"waiting_input"===e.activity||"blocked"===e.activity||"needs_input"===e.status||"stuck"===e.status||"exited"===e.activity?"respond":"ci_failed"===e.status||"changes_requested"===e.status||e.pr&&("failing"===e.pr.ciStatus||"changes_requested"===e.pr.reviewDecision||!e.pr.mergeability.noConflicts)?"review":"review_pending"===e.status||e.pr&&!e.pr.isDraft&&("pending"===e.pr.reviewDecision||"none"===e.pr.reviewDecision)?"pending":"working"}e.s(["TERMINAL_STATUSES",0,t,"getAttentionLevel",()=>r])},20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}function i(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>i])},81140,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},30030,e=>{"use strict";var t=e.i(71645),r=e.i(18050);function n(e,i=[]){let o=[],s=()=>{let r=o.map(e=>t.createContext(e));return function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return s.scopeName=e,[function(n,i){let s=t.createContext(i),a=o.length;o=[...o,i];let l=n=>{let{scope:i,children:o,...l}=n,u=i?.[e]?.[a]||s,c=t.useMemo(()=>l,Object.values(l));return(0,r.jsx)(u.Provider,{value:c,children:o})};return l.displayName=n+"Provider",[l,function(r,o){let l=o?.[e]?.[a]||s,u=t.useContext(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])}};return n.scopeName=r.scopeName,n}(s,...i)]}e.s(["createContextScope",()=>n])},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),n=e.i(20783),i=e.i(18050);function o(e){var r;let o,s=(r=e,(o=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(u.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,o),l=t.forwardRef((e,r)=>{let{children:n,...o}=e,l=t.Children.toArray(n),u=l.find(a);if(u){let e=u.props.children,n=l.map(r=>r!==u?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(s,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(s,{...o,ref:r,children:n})});return l.displayName=`${e}.Slot`,l}var s=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}function l(e){let s=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(s),[u,c]=a(s,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,o=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(u,{scope:r,itemMap:s,collectionRef:o,children:n})};d.displayName=s;let f=e+"CollectionSlot",p=o(f),m=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,s=c(f,r),a=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(p,{ref:a,children:o})});m.displayName=f;let h=e+"CollectionItemSlot",g="data-radix-collection-item",y=o(h),v=t.default.forwardRef((e,r)=>{let{scope:o,children:s,...a}=e,l=t.default.useRef(null),u=(0,n.useComposedRefs)(r,l),d=c(h,o);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),(0,i.jsx)(y,{...{[g]:""},ref:u,children:s})});return v.displayName=h,[{Provider:d,Slot:m,ItemSlot:v},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var u=new WeakMap;function c(e,t){var r,n;let i,o,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(s=(o=d(n))>=0?o:i+o)<0||s>=i?-1:s);return -1===a?void 0:e[a]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],u.set(this,!0)}set(e,t){return u.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,s=d(e),a=s>=0?s:o+s,l=a<0||a>=o?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!i;s<0&&a++;let c=[...this.#e],f=!1;for(let e=a;e<u;e++)if(a===e){let o=c[e];c[e]===t&&(o=c[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||c[e-1]!==t||(f=!0);let r=c[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=c(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=c(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return c(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l],75830)},34620,e=>{"use strict";var t=e.i(71645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r])},10772,e=>{"use strict";var t=e.i(71645),r=e.i(34620),n=t[" useId ".trim().toString()]||(()=>void 0),i=0;function o(e){let[o,s]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||s(e=>e??String(i++))},[e]),e||(o?`radix-${o}`:"")}e.s(["useId",()=>o])},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(20783),i=e.i(18050),o=Symbol("radix.slottable");function s(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var o,a;let l,u,c,d=(a=o=`Primitive.${r}`,(l=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var s;let e,a,l=(s=i,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(u.ref=r?(0,n.composeRefs)(r,l):l),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,u=l,(c=t.forwardRef((e,r)=>{let{children:n,...o}=e,a=t.Children.toArray(n),l=a.find(s);if(l){let e=l.props.children,n=a.map(r=>r!==l?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(u,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(u,{...o,ref:r,children:n})})).displayName=`${o}.Slot`,c),f=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?d:r,{...o,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});function l(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>a,"dispatchDiscreteCustomEvent",()=>l],48425)},30207,e=>{"use strict";var t=e.i(71645);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},69340,e=>{"use strict";var t=e.i(71645),r=e.i(34620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function i({prop:e,defaultProp:r,onChange:i=()=>{},caller:o}){let[s,a,l]=function({defaultProp:e,onChange:r}){let[i,o]=t.useState(e),s=t.useRef(i),a=t.useRef(r);return n(()=>{a.current=r},[r]),t.useEffect(()=>{s.current!==i&&(a.current?.(i),s.current=i)},[i,s]),[i,o,a]}({defaultProp:r,onChange:i}),u=void 0!==e,c=u?e:s;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==u){let t=u?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=u},[u,o])}return[c,t.useCallback(t=>{if(u){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else a(t)},[u,e,a,l])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>i],69340)},86318,e=>{"use strict";var t=e.i(71645);e.i(18050);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},42727,e=>{"use strict";var t=e.i(71645),r=e.i(81140),n=e.i(75830),i=e.i(20783),o=e.i(30030),s=e.i(10772),a=e.i(48425),l=e.i(30207),u=e.i(69340),c=e.i(86318),d=e.i(18050),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[h,g,y]=(0,n.createCollection)(m),[v,x]=(0,o.createContextScope)(m,[y]),[w,C]=v(m),b=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(A,{...e,ref:t})})}));b.displayName=m;var A=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:h=!1,dir:y,currentTabStopId:v,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:C,onEntryFocus:b,preventScrollOnEntryFocus:A=!1,...k}=e,R=t.useRef(null),S=(0,i.useComposedRefs)(n,R),P=(0,c.useDirection)(y),[M,O]=(0,u.useControllableState)({prop:v,defaultProp:x??null,onChange:C,caller:m}),[T,N]=t.useState(!1),I=(0,l.useCallbackRef)(b),G=g(o),j=t.useRef(!1),[D,F]=t.useState(0);return t.useEffect(()=>{let e=R.current;if(e)return e.addEventListener(f,I),()=>e.removeEventListener(f,I)},[I]),(0,d.jsx)(w,{scope:o,orientation:s,dir:P,loop:h,currentTabStopId:M,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,d.jsx)(a.Primitive.div,{tabIndex:T||0===D?-1:0,"data-orientation":s,...k,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!T){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=G().filter(e=>e.focusable);E([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),A)}}j.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>N(!1))})})}),k="RovingFocusGroupItem",R=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...f}=e,p=(0,s.useId)(),m=u||p,y=C(k,i),v=y.currentTabStopId===m,x=g(i),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:A}=y;return t.useEffect(()=>{if(o)return w(),()=>b()},[o,w,b]),(0,d.jsx)(h.ItemSlot,{scope:i,id:m,focusable:o,active:l,children:(0,d.jsx)(a.Primitive.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?y.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return S[i]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=y.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>E(i))}}),children:"function"==typeof c?c({isCurrentTabStop:v,hasTabStop:null!=A}):c})})});R.displayName=k;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>R,"Root",()=>b,"createRovingFocusGroupScope",()=>x])},96626,e=>{"use strict";var t=e.i(71645),r=e.i(20783),n=e.i(34620),i=e=>{var i;let s,a,{present:l,children:u}=e,c=function(e){var r,i;let[s,a]=t.useState(),l=t.useRef(null),u=t.useRef(e),c=t.useRef("none"),[d,f]=(r=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>i[e][t]??e,r));return t.useEffect(()=>{let e=o(l.current);c.current="mounted"===d?e:"none"},[d]),(0,n.useLayoutEffect)(()=>{let t=l.current,r=u.current;if(r!==e){let n=c.current,i=o(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let n=o(l.current).includes(CSS.escape(r.animationName));if(r.target===s&&n&&(f("ANIMATION_END"),!u.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},n=e=>{e.target===s&&(c.current=o(l.current))};return s.addEventListener("animationstart",n),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",n),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}f("ANIMATION_END")},[s,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(l),d="function"==typeof u?u({present:c.isPresent}):t.Children.only(u),f=(0,r.useComposedRefs)(c.ref,(i=d,(a=(s=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.ref:(a=(s=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.props.ref:i.props.ref||i.ref));return"function"==typeof u||c.isPresent?t.cloneElement(d,{ref:f}):null};function o(e){return e?.animationName||"none"}i.displayName="Presence",e.s(["Presence",()=>i])},90993,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n=(0,e.i(71645).forwardRef)(({className:e,...n},i)=>(0,t.jsx)("div",{ref:i,className:(0,r.cn)("surface-card rounded-[var(--radius-md)] border",e),...n}));function i({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center gap-2 border-b border-[var(--vk-border)] px-3 py-2",e),...n})}function o({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("px-3 py-2",e),...n})}n.displayName="Card",e.s(["Card",0,n,"CardContent",()=>o,"CardHeader",()=>i])},17442,e=>{"use strict";var t=e.i(18050),r=e.i(18620);let n={default:"border-[var(--vk-border)] bg-[var(--vk-bg-panel)] text-[var(--vk-text-muted)]",success:"border-transparent bg-transparent text-[var(--vk-green)]",warning:"border-transparent bg-transparent text-[var(--vk-orange)]",error:"border-transparent bg-transparent text-[var(--vk-red)]",info:"border-transparent bg-transparent text-[var(--vk-text-muted)]",outline:"border-[var(--vk-border)] bg-transparent text-[var(--vk-text-muted)]"};function i({variant:e="default",className:i,children:o}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-flex items-center gap-1 rounded-[3px] border px-1.5 py-0.5 text-[11px] leading-none",n[e],i),children:o})}e.s(["Badge",()=>i])},97878,e=>{"use strict";let t=new Set,r=null,n=null;function i(e){return Array.isArray(e)?{type:"snapshot",sessions:e}:e&&"object"==typeof e&&"snapshot"===e.type&&Array.isArray(e.sessions)?e:null}function o(e){for(let r of t)r(e)}async function s(){if("function"!=typeof fetch)return;let e=(async()=>{try{let e=await fetch("/api/sessions");if(!e.ok)return;let t=await e.json().catch(()=>null),r=i(t);if(!r)return;o(r)}catch{}})();n=e.finally(()=>{n===e&&(n=null)}),await e}function a(e){return t.add(e),!r&&"u">typeof EventSource&&((r=new EventSource("/api/events")).onmessage=e=>{try{let t=i(JSON.parse(e.data));if(!t)return;o(t)}catch{}},r.addEventListener("refresh",()=>{n||s()}),r.onerror=()=>{0===t.size&&(r?.close(),r=null)}),()=>{t.delete(e),0===t.size&&r&&(r.close(),r=null)}}e.s(["subscribeToSnapshotEvents",()=>a])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},90272,e=>{"use strict";let t=(0,e.i(75254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],90272)},55716,e=>{"use strict";let t=(0,e.i(75254).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",()=>t],55716)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},75505,e=>{"use strict";let t=(0,e.i(75254).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],75505)},78818,e=>{"use strict";var t=e.i(71645);let r=new Set,n=[],i=!0,o=0,s=null,a=null;function l(){for(let e of r)e()}function u(){return{agents:n,loading:i}}function c(){return n.length>0&&Date.now()-o<3e4}function d(){null===a&&(a=window.setTimeout(()=>{a=null,f(!0)},1e4))}async function f(e=!1){if(!e&&c()){i&&(i=!1,l());return}return s||(i=!0,l(),s=(async()=>{try{var e;let t=await fetch("/api/agents",{cache:"no-store"});if(!t.ok)throw Error(`Failed to fetch agents: ${t.status}`);let r=(e=await t.json(),Array.isArray(e)?e:e&&"object"==typeof e&&"agents"in e&&Array.isArray(e.agents)?e.agents:[]);r.length>0?(n=r,o=Date.now(),null!==a&&(window.clearTimeout(a),a=null)):d()}catch{d()}finally{i=!1,s=null,l()}})())}function p(){let[e,n]=(0,t.useState)(()=>u());return(0,t.useEffect)(()=>{let e=()=>n(u());r.add(e),e(),f();let t=()=>{c()||f(!0)},i=()=>{"visible"!==document.visibilityState||c()||f(!0)};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",i),()=>{r.delete(e),window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",i)}},[]),e}e.s(["useAgents",()=>p])},81633,e=>{"use strict";function t(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}e.s(["normalizeAgentName",()=>t])},37766,e=>{"use strict";let t=["claude-code","codex","gemini","qwen-code"],r={claudeCode:"pro",codex:"chatgpt",gemini:"oauth",qwenCode:"oauth"},n={"claude-code":{agent:"claude-code",label:"Claude Code",accessKey:"claudeCode",defaultAccess:"pro",accessOptions:[{id:"pro",label:"Claude Pro",description:"Shows the current Sonnet models that Claude Code documents for Pro usage."},{id:"max",label:"Claude Max",description:"Unlocks both Sonnet and Opus model choices in Claude Code."},{id:"api",label:"Anthropic API",description:"Use direct Anthropic API credentials instead of a Claude subscription."}]},codex:{agent:"codex",label:"Codex",accessKey:"codex",defaultAccess:"chatgpt",accessOptions:[{id:"chatgpt",label:"ChatGPT Plan",description:"Use the ChatGPT-backed Codex login flow for paid ChatGPT workspaces."},{id:"api",label:"OpenAI API",description:"Use direct OpenAI API credentials when Codex is pointed at the API."}]},gemini:{agent:"gemini",label:"Gemini",accessKey:"gemini",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Google Login",description:"Use the built-in Google account flow that Gemini CLI ships with."},{id:"api",label:"Gemini API",description:"Use a Gemini API key or Vertex AI project for broader model control."}]},"qwen-code":{agent:"qwen-code",label:"Qwen Code",accessKey:"qwenCode",defaultAccess:"oauth",accessOptions:[{id:"oauth",label:"Qwen OAuth",description:"Use Qwen Code's built-in browser login and bundled provider defaults."},{id:"api",label:"DashScope / Custom API",description:"Use DashScope or another OpenAI-compatible endpoint configured for Qwen Code."}]}},i=[{id:"low",label:"Low",description:"Fast responses with lighter reasoning."},{id:"medium",label:"Medium",description:"Balanced speed and reasoning depth for everyday tasks."},{id:"high",label:"High",description:"Deeper reasoning for more complex tasks."}],o=[...i,{id:"xhigh",label:"Extra High",description:"Maximum reasoning depth for the hardest tasks."}];function s(e,t,r,n=function(e){return e.trim().split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":e[0]?.toUpperCase()+e.slice(1)).join(" ")}(e)){return{id:e,label:n,description:t,access:r}}let a={"claude-code":{modelsByAccess:{pro:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")],max:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")],api:[s("claude-sonnet-4-6","Balanced Claude Code model for day-to-day coding tasks.",["pro","max","api"],"Claude Sonnet 4.6"),s("claude-opus-4-6","Highest-capability Claude Code model for deeper reasoning.",["max","api"],"Claude Opus 4.6"),s("claude-haiku-4-5","Fast Claude model for lightweight tasks.",["pro","max","api"],"Claude Haiku 4.5")]},defaultModelByAccess:{pro:"claude-sonnet-4-6",max:"claude-opus-4-6",api:"claude-sonnet-4-6"},reasoningOptionsByAccess:{pro:i,max:i,api:i},defaultReasoningByAccess:{pro:"medium",max:"high",api:"medium"}},codex:{modelsByAccess:{chatgpt:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.3-codex-spark","Fast Codex model optimized for rapid iteration.",["chatgpt"],"GPT-5.3-Codex-Spark"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")],api:[s("gpt-5.4","Latest frontier coding model exposed by Codex.",["chatgpt","api"],"GPT-5.4"),s("gpt-5.3-codex","Balanced Codex coding model.",["chatgpt","api"],"GPT-5.3-Codex"),s("gpt-5.2-codex","Previous generation Codex coding model.",["chatgpt","api"],"GPT-5.2-Codex"),s("gpt-5.1-codex-max","High-capability legacy Codex model.",["chatgpt","api"],"GPT-5.1-Codex-Max"),s("gpt-5.1-codex-mini","Smaller Codex model for quick tasks.",["chatgpt","api"],"GPT-5.1-Codex-Mini")]},defaultModelByAccess:{chatgpt:"gpt-5.4",api:"gpt-5.4"},reasoningOptionsByAccess:{chatgpt:o,api:o},defaultReasoningByAccess:{chatgpt:"high",api:"high"}},gemini:{modelsByAccess:{oauth:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")],api:[s("gemini-3.1-pro-preview","High-capability Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3.1 Pro Preview"),s("gemini-3-flash-preview","Fast Gemini model discovered in local Gemini sessions.",["oauth","api"],"Gemini 3 Flash Preview")]},defaultModelByAccess:{oauth:"gemini-3.1-pro-preview",api:"gemini-3.1-pro-preview"}},"qwen-code":{modelsByAccess:{oauth:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")],api:[s("coder-model","Model discovered in the local Qwen Code installation.",["oauth","api"],"Coder Model")]},defaultModelByAccess:{oauth:"coder-model",api:"coder-model"}}};function l(e){let r=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return t.includes(r)?r:null}function u(){return{...r}}function c(e){return null!==l(e)}function d(e){let t=l(e);return t?n[t]:null}function f(e,t){let r=d(e);if(!r)return null;let n=t?.[r.accessKey];return"string"==typeof n&&r.accessOptions.some(e=>e.id===n)?n:r.defaultAccess}function p(e,t){let r=l(e);if(!r)return[];let n=f(r,t);if(!n)return[];let i=a[r],o=i.modelsByAccess[n]??[];if(o.length>0)return[...o];let s=[],u=new Set;for(let e of Object.values(i.modelsByAccess))if(Array.isArray(e))for(let t of e)u.has(t.id)||(u.add(t.id),s.push(t));return s}function m(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultModelByAccess[n]??null:null}function h(e,t){let r=l(e);if(!r)return[];let n=f(r,t);return n?a[r].reasoningOptionsByAccess?.[n]??[]:[]}function g(e,t){let r=l(e);if(!r)return null;let n=f(r,t);return n?a[r].defaultReasoningByAccess?.[n]??null:null}e.s(["getAgentModelCatalog",()=>d,"getAvailableAgentModels",()=>p,"getAvailableAgentReasoningEfforts",()=>h,"getDefaultAgentModel",()=>m,"getDefaultAgentReasoningEffort",()=>g,"getDefaultModelAccessPreferences",()=>u,"resolveAgentModelAccess",()=>f,"supportsAgentModelSelection",()=>c])}]);
|