conductor-oss 0.61.4 → 0.61.5
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/package.json +5 -5
- package/web/.next/standalone/packages/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/packages/web/.next/app-path-routes-manifest.json +5 -5
- package/web/.next/standalone/packages/web/.next/build-manifest.json +3 -3
- package/web/.next/standalone/packages/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/packages/web/.next/react-loadable-manifest.json +4 -4
- package/web/.next/standalone/packages/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.html +1 -1
- 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/_full.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/_global-error.segments/_global-error.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.js +1 -1
- 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/bridge/connect/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/bridge/connect/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/bridge/connect/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/embed/terminal/[id]/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/embed/terminal/[id]/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/embed/terminal/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/page.js +1 -1
- 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.js +1 -1
- 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/settings/bridge/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/settings/bridge/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/settings/bridge/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/[[...sign-in]]/page.js +1 -1
- 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/sign-in/hosted/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/hosted/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/hosted/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/sso-callback/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/sso-callback/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-in/sso-callback/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-up/[[...sign-up]]/page.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-up/[[...sign-up]]/page.js.nft.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/sign-up/[[...sign-up]]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/app/unlock/page.js +1 -1
- 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/app-paths-manifest.json +5 -5
- package/web/.next/standalone/packages/web/.next/server/chunks/2512.js +3 -3
- package/web/.next/standalone/packages/web/.next/server/chunks/7505.js +1 -0
- package/web/.next/standalone/packages/web/.next/server/chunks/7847.js +1 -0
- package/web/.next/standalone/packages/web/.next/server/chunks/9455.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/next-font-manifest.js +1 -1
- package/web/.next/standalone/packages/web/.next/server/next-font-manifest.json +1 -1
- package/web/.next/standalone/packages/web/.next/server/pages/500.html +1 -1
- 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 +1 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/34443.1b1c01aa3cc02b9e.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/56147.cf06b46fdf67c74b.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/71679-fc5960369b493bc2.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/79593-a01b19a14d2be997.js +9 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/app/layout-edf7b6946266501a.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/app/page-4c94c2a3cc348ae9.js +1 -0
- package/web/.next/standalone/packages/web/.next/static/chunks/{webpack-1ea6d2f29c95d14b.js → webpack-a083df67436622a0.js} +1 -1
- package/web/.next/static/chunks/34443.1b1c01aa3cc02b9e.js +1 -0
- package/web/.next/static/chunks/56147.cf06b46fdf67c74b.js +1 -0
- package/web/.next/static/chunks/71679-fc5960369b493bc2.js +1 -0
- package/web/.next/static/chunks/79593-a01b19a14d2be997.js +9 -0
- package/web/.next/static/chunks/app/layout-edf7b6946266501a.js +1 -0
- package/web/.next/static/chunks/app/page-4c94c2a3cc348ae9.js +1 -0
- package/web/.next/static/chunks/{webpack-1ea6d2f29c95d14b.js → webpack-a083df67436622a0.js} +1 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/1029.js +0 -1
- package/web/.next/standalone/packages/web/.next/server/chunks/4391.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/34443.eb8641f97154552c.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/71679-b75fd4281ccb6400.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/79593-04e4d2f9d43d693b.js +0 -9
- package/web/.next/standalone/packages/web/.next/static/chunks/89110.56ec9b5ca21c3423.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/app/layout-5fa0864167c9a786.js +0 -1
- package/web/.next/standalone/packages/web/.next/static/chunks/app/page-0775ebdefe7c09d1.js +0 -1
- package/web/.next/static/chunks/34443.eb8641f97154552c.js +0 -1
- package/web/.next/static/chunks/71679-b75fd4281ccb6400.js +0 -1
- package/web/.next/static/chunks/79593-04e4d2f9d43d693b.js +0 -9
- package/web/.next/static/chunks/89110.56ec9b5ca21c3423.js +0 -1
- package/web/.next/static/chunks/app/layout-5fa0864167c9a786.js +0 -1
- package/web/.next/static/chunks/app/page-0775ebdefe7c09d1.js +0 -1
- /package/web/.next/standalone/packages/web/.next/static/{Yd7v7Bk942J7zbKHXIxDk → GjupzvW--dobiDkOVpW0r}/_buildManifest.js +0 -0
- /package/web/.next/standalone/packages/web/.next/static/{Yd7v7Bk942J7zbKHXIxDk → GjupzvW--dobiDkOVpW0r}/_ssgManifest.js +0 -0
- /package/web/.next/static/{Yd7v7Bk942J7zbKHXIxDk → GjupzvW--dobiDkOVpW0r}/_buildManifest.js +0 -0
- /package/web/.next/static/{Yd7v7Bk942J7zbKHXIxDk → GjupzvW--dobiDkOVpW0r}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58974],{12529:(e,t,r)=>{Promise.resolve().then(r.bind(r,86660))},51164:(e,t,r)=>{"use strict";r.d(t,{v:()=>c});var a=r(76196);let n=["pro","max","api"],s=["chatgpt","api"],l=["default"],i=["oauth","api"],o=["oauth","api"];function d(e,t,r){return"string"==typeof e&&t.includes(e)?e:r}function c(e){let t=!e||"object"!=typeof e||Array.isArray(e)?{}:{...e},r=(0,a.Zp)();return{amp:d(t.amp,l,r.amp),claudeCode:d(t.claudeCode,n,r.claudeCode),codex:d(t.codex,s,r.codex),cursorCli:d(t.cursorCli,l,r.cursorCli),droid:d(t.droid,l,r.droid),gemini:d(t.gemini,i,r.gemini),githubCopilot:d(t.githubCopilot,l,r.githubCopilot),opencode:d(t.opencode,l,r.opencode),pi:d(t.pi,l,r.pi),qwenCode:d(t.qwenCode,o,r.qwenCode),ccr:d(t.ccr,l,r.ccr)}}},53989:(e,t,r)=>{"use strict";function a(e){return e?.installed?e.ready?"CLI ready":!1===e.configured?"Auth needed":"Setup needed":"Install needed"}function n(e){let t=e?.trim();return t?`Access: ${t}`:null}r.d(t,{f:()=>a,y:()=>n})},85905:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var a=r(31404);function n(e){return e&&"object"==typeof e?e:null}async function s({files:e,projectId:t,taskRef:r,bridgeId:l,preferAbsolute:i=!0}){if(!e.length)return[];let o=t.trim();if(!o)throw Error("Project id is required to upload attachments");let d=new FormData;d.append("projectId",o);let c=r?.trim();for(let t of(c&&d.append("taskRef",c),e))d.append("files",t);let x=await fetch((0,a.S)("/api/attachments",l),{method:"POST",body:d}),p=await x.json().catch(()=>null);if(!x.ok){let t=1===e.length?e[0]?.name??"attachment":`${e.length} attachments`;throw Error(p?.error??`Failed to upload ${t}`)}let u=(Array.isArray(p?.files)?p.files:p?[p]:[]).map(e=>(function(e,t){let r=n(e);if(!r)return null;let a=n(r.attachment);for(let e of t?[r.absolutePath,r.path,r.filePath,a?.absolutePath,a?.path,a?.filePath]:[r.path,r.absolutePath,r.filePath,a?.path,a?.absolutePath,a?.filePath])if("string"==typeof e&&e.trim().length>0)return e.trim();return null})(e,i)).filter(e=>!!e);if(0===u.length)throw Error("Attachment upload succeeded but did not return a usable file path");return u}},86660:(e,t,r)=>{"use strict";r.d(t,{default:()=>ev});var a=r(54568),n=r(42925),s=r(79748),l=r(7620),i=r(96869);r(76196);var o=r(52353),d=r(20487),c=r(50549),x=r(57917),p=r(21048),u=r(55341),m=r(30824),h=r(34737),v=r(20670),b=r(8008),f=r(58299),g=r(36645),j=r(84736),k=r(7086),w=r(54299),y=r(34041),N=r(34309),S=r(68476),A=r(20732),C=r(45894),I=r(5739),E=r(33866),M=r(35821),$=r(95106),P=r(53649),L=r(86011),O=r(22153),B=r(46012),U=r(862),_=r(12060),q=r(63582),W=r(86181),F=r(72410),D=r(85905),R=r(31404),V=r(84527),T=r(15115),z=r(83770),G=r(10926);function H(e){return e.map(e=>(0,G.C0)(e)).filter(e=>null!==e)}var Z=r(67506),J=r(76050),X=r(53989),K=r(51164),Q=r(88272);let Y="claude-code",ee="conductor-board-dispatcher-panel-width";function et(e){let t=e?.trim();return t&&t.length>0?t:null}function er(e,t){return Math.min(Math.min(720,Math.max(320,Math.floor(.55*(Number.isFinite(t)&&t>0?t:720)))),Math.max(320,Math.round(e)))}let ea=(0,n.default)(()=>Promise.all([r.e(35493),r.e(35863)]).then(r.bind(r,35493)).then(e=>e.SessionDetail),{loadableGenerated:{webpack:()=>[35493]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading session..."})}),en=(0,n.default)(()=>Promise.all([r.e(29450),r.e(79167)]).then(r.bind(r,29450)).then(e=>e.WorkspaceSidebarPanel),{loadableGenerated:{webpack:()=>[29450]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading workspace panel..."})}),es=(0,n.default)(()=>r.e(66173).then(r.bind(r,66173)).then(e=>e.WorkspaceOverview),{loadableGenerated:{webpack:()=>[66173]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading workspace..."})}),el=(0,n.default)(()=>r.e(79739).then(r.bind(r,79739)).then(e=>e.WorkspaceKanban),{loadableGenerated:{webpack:()=>[79739]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading board..."})}),ei=(0,n.default)(()=>Promise.all([r.e(39526),r.e(70232),r.e(24607),r.e(58607)]).then(r.bind(r,44838)).then(e=>e.ProjectDispatcherPanel),{loadableGenerated:{webpack:()=>[44838]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading dispatcher..."})}),eo=(0,n.default)(()=>Promise.all([r.e(77401),r.e(39526),r.e(70232),r.e(90694),r.e(81132)]).then(r.bind(r,81132)).then(e=>e.ProjectNotesWorkspace),{loadableGenerated:{webpack:()=>[81132]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading notes workspace..."})}),ed=(0,n.default)(()=>Promise.all([r.e(53470),r.e(20217),r.e(56817)]).then(r.bind(r,56817)).then(e=>e.NewWorkspaceDialog),{loadableGenerated:{webpack:()=>[56817]},loading:()=>null}),ec=(0,n.default)(()=>Promise.all([r.e(53470),r.e(20217),r.e(56817)]).then(r.bind(r,56817)).then(e=>e.SettingsDialog),{loadableGenerated:{webpack:()=>[56817]},loading:()=>null});function ex(e){let t=(0,E.h7)(e);return t?.label?t.label:e.split(/[-_\s]+/g).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(" ")}function ep(e){return e.issueId?.trim()||e.taskRef?.trim()||e.id}function eu(e){let[t]=e.split(" - ");return(t??e).trim()}function em(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:{...e}}function eh(e,t){let r=em(e),a=em(r.notifications),n=a.soundFile,s="string"==typeof r.codingAgent&&r.codingAgent.trim().length>0?r.codingAgent.trim():t,l=(0,E.a6)(s,t),i="string"==typeof r.ide&&r.ide.trim().length>0?r.ide.trim():"vscode",o="string"==typeof r.markdownEditor&&r.markdownEditor.trim().length>0?r.markdownEditor.trim():"obsidian",d="string"==typeof r.markdownEditorPath?r.markdownEditorPath.trim():"",c=Array.isArray(r.filesystemBrowseRoots)?r.filesystemBrowseRoots.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(Boolean):[];return{onboardingAcknowledged:!0===r.onboardingAcknowledged,codingAgent:l,ide:i,markdownEditor:o,markdownEditorPath:d,filesystemBrowseRoots:c,modelAccess:(0,K.v)(r.modelAccess),notifications:{soundEnabled:!1!==a.soundEnabled,soundFile:null===n?null:"string"==typeof n&&n.trim().length>0?n.trim():"abstract-sound-4"}}}function ev({requiresPairedDeviceScope:e=!1}){let t=(0,s.useRouter)(),r=(0,s.usePathname)(),n=(0,s.useSearchParams)(),i=(0,l.useMemo)(()=>et(n.get("project")),[n]),o=(0,l.useMemo)(()=>et(n.get("session")),[n]),d=(0,l.useMemo)(()=>{var e;return"board"===(e=n.get("view"))?"board":"notes"===e?"notes":"direct"},[n]),c=(0,l.useMemo)(()=>et(n.get("bridge")),[n]),[x,p]=(0,l.useState)(c??""),h=(0,G.C0)(x),v=(0,l.useMemo)(()=>(0,G.DW)(o)?.bridgeId??null,[o]),j=c??v,k=h??v,[w,y]=(0,l.useState)([]),[N,S]=(0,l.useState)("loading"),[A,C]=(0,l.useState)(null),F=!!(0,Z.y)()&&null===A,D=(0,l.useMemo)(()=>w.filter(e=>e.connected),[w]),X=(0,l.useMemo)(()=>D.map(e=>e.bridgeId),[D]),ep=(0,l.useMemo)(()=>(function({requiresPairedDeviceScope:e,effectiveBridgeId:t,connectedBridgeIds:r,bridgeInventoryStatus:a}){if(!e)return!1;let n=(0,G.C0)(t);return!!n&&("loading"===a||"ready"===a&&!H(r).includes(n))})({requiresPairedDeviceScope:e,effectiveBridgeId:k,connectedBridgeIds:X,bridgeInventoryStatus:N}),[N,X,k,e]);(0,l.useMemo)(()=>(function({requiresPairedDeviceScope:e,effectiveBridgeId:t,connectedBridgeIds:r,bridgeInventoryStatus:a}){if(!e)return!0;let n=(0,G.C0)(t);return!!n&&"ready"===a&&H(r).includes(n)})({requiresPairedDeviceScope:e,effectiveBridgeId:k,connectedBridgeIds:X,bridgeInventoryStatus:N}),[N,X,k,e]);let eu=(0,l.useMemo)(()=>!e||!!k,[k,e]),{projects:em,loading:ef,error:eg,refresh:ej}=(0,P.U)(k,{enabled:eu}),{agents:ek}=(0,O._)(k,{enabled:eu}),{mobileSidebarOpen:ew,desktopSidebarOpen:ey,toggleSidebar:eN,closeSidebarOnMobile:eS,syncSidebarForViewport:eA}=(0,B.T)({initialDesktopOpen:!1}),eC=ew||ey,eI=!o||eC,{sessions:eE,loading:eM,error:e$,refresh:eP}=(0,$.t)(i,{enabled:eI&&eu,bridgeId:k}),[eL,eO]=(0,l.useState)(""),[eB,eU]=(0,l.useState)(""),[e_,eq]=(0,l.useState)((0,Q.Z3)()),[eW,eF]=(0,l.useState)(!1),[eD,eR]=(0,l.useState)(null),[eV,eT]=(0,l.useState)(null),[ez,eG]=(0,l.useState)(!1),[eH,eZ]=(0,l.useState)(!1),[eJ,eX]=(0,l.useState)(null),[eK,eQ]=(0,l.useState)(null),[eY,e0]=(0,l.useState)(!0),[e1,e3]=(0,l.useState)(!1),[e4,e2]=(0,l.useState)(null),[e5,e6]=(0,l.useState)(!1),[e7,e9]=(0,l.useState)(!1),[e8,te]=(0,l.useState)(()=>o?[o]:[]),[tt,tr]=(0,l.useState)(!1),[ta,tn]=(0,l.useState)(!1),[ts,tl]=(0,l.useState)(()=>o?"chat":"board"),[ti,to]=(0,l.useState)(!1),[td,tc]=(0,l.useState)(405),[tx,tp]=(0,l.useState)(!1),tu=(0,l.useRef)(null),tm=(0,l.useRef)(i);(0,l.useEffect)(()=>{let e="function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null,t=()=>{tr((0,W.k$)())};return t(),window.addEventListener("resize",t),e?.addEventListener?.("change",t),()=>{window.removeEventListener("resize",t),e?.removeEventListener?.("change",t)}},[]),(0,l.useEffect)(()=>{let e="function"==typeof window.matchMedia?window.matchMedia("(min-width: 1280px)"):null,t=()=>{tn(e?.matches??window.innerWidth>=1280)};return t(),window.addEventListener("resize",t),e?.addEventListener?.("change",t),()=>{window.removeEventListener("resize",t),e?.removeEventListener?.("change",t)}},[]),(0,l.useEffect)(()=>{if("board"!==d||null===i){tm.current=i,tl("board");return}let e=tm.current!==i;(tm.current=i,o)?tl("chat"):e&&tl("board")},[i,o,d]),(0,l.useEffect)(()=>{try{let e=window.localStorage.getItem(ee),t=e?Number.parseInt(e,10):NaN;Number.isFinite(t)&&tc(er(t,window.innerWidth))}catch{}let e=()=>{tc(e=>er(e,window.innerWidth))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,l.useEffect)(()=>{if(!tx)return;let e=e=>{let t=window.innerWidth;tc(er(t-e.clientX,t))},t=()=>{tp(!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(ee,String(td))}catch{}}},[tx,td]),(0,l.useEffect)(()=>{if(!F){y([]),S("ready"),e&&t.replace("/bridge/connect");return}let r=!1,a=window.innerWidth<768,n=ep?a?8e3:4e3:a?3e4:15e3;async function s(){try{let e=await fetch("/api/bridge/devices",{cache:"no-store"}),t=await e.json().catch(()=>null);if(!e.ok){if((0,z.Xt)(t?.error)){r||(C(t?.error??null),y([]),S("ready"));return}throw Error(`Failed to fetch bridges: ${e.status}`)}r||(C(null),y((0,T.oH)(t?.devices).map(e=>({bridgeId:e.device_id,hostname:e.last_status?.hostname??e.hostname,os:`${e.last_status?.os??`${e.os}/${e.arch}`}${(0,T.wj)(e.last_status?.version)}`,capabilities:[],connected:e.connected,status:e.connected?"connected":"offline",connectedAt:"",lastSeenAt:""}))),S("ready"))}catch{r||(y([]),S("error"))}}s();let l=window.setInterval(()=>{s()},n);return()=>{r=!0,window.clearInterval(l)}},[F,ep,e,t]),(0,l.useEffect)(()=>{let t=function({requiresPairedDeviceScope:e,requestedBridgeId:t,selectedBridgeId:r,connectedBridgeIds:a}){let n=(0,G.C0)(t),s=(0,G.C0)(r),l=H(a);return e?n||(0===l.length?"":s&&l.includes(s)?s:l[0]??""):s&&l.includes(s)?s:""}({requiresPairedDeviceScope:e,requestedBridgeId:j,selectedBridgeId:x,connectedBridgeIds:X});t!==x&&p(t)},[X,j,e,x]),(0,l.useEffect)(()=>{!e||k||"ready"!==N||D.length>0||t.replace("/bridge/connect")},[N,D.length,k,e,t]),(0,l.useEffect)(()=>{p(c??"")},[c]);let th=(0,l.useMemo)(()=>new Map(eE.map(e=>[e.id,e])),[eE]),{session:tv,loading:tb,error:tf}=(0,M.w)(o,null,{enabled:!!o&&eu,bridgeId:k}),tg=eD??eg??e$??tf??e4,tj=(0,l.useMemo)(()=>{let e=new Map;for(let t of eE){let r=e.get(t.projectId);r?r.push(t):e.set(t.projectId,[t])}return e},[eE]),tk=(0,l.useCallback)((e,a="push")=>{let s=new URLSearchParams(n.toString()),l=(e,t)=>{let r="string"==typeof t?t.trim():"";r.length>0?s.set(e,r):s.delete(e)};"projectId"in e&&l("project",e.projectId),"sessionId"in e&&l("session",e.sessionId),"workspaceView"in e&&("board"===e.workspaceView?s.set("view","board"):"notes"===e.workspaceView?s.set("view","notes"):s.delete("view")),"tab"in e&&(e.tab&&"dispatcher"!==e.tab?s.set("tab",e.tab):s.delete("tab")),"bridgeId"in e&&l("bridge",e.bridgeId),s.has("project")||s.delete("view"),s.has("session")||s.delete("tab");let i=s.toString(),o=i.length>0?`${r}?${i}`:r;"replace"===a?t.replace(o,{scroll:!1}):t.push(o,{scroll:!1})},[r,t,n]);(0,l.useEffect)(()=>{let e=(0,G.C0)(x);(c??null)!==e&&tk({bridgeId:e},"replace")},[c,tk,x]),(0,l.useEffect)(()=>{if(!ef&&!eg){if(0===em.length){null!==i&&tk({projectId:null,workspaceView:null},"replace");return}null===i||em.some(e=>e.id===i)||tk({projectId:o?null:em[0]?.id??null,workspaceView:o?null:d},"replace")}},[eg,ef,tk,em,i,o,d]),(0,l.useEffect)(()=>{if(o){if(eI){if(eM||e$)return;eE.some(e=>e.id===o)||tk({sessionId:null,tab:null},"replace");return}!tb&&(tv||tk({sessionId:null,tab:null},"replace"))}},[eE,tk,eI,o,tb,tv,e$,eM]),(0,l.useEffect)(()=>{o?te(e=>[o,...e.filter(e=>e!==o)].slice(0,1)):te([])},[o]),(0,l.useEffect)(()=>{o&&tu.current&&tu.current!==o&&(tu.current=null)},[o]),(0,l.useEffect)(()=>{o&&eI&&!eM&&!e$&&te(e=>e.filter(e=>e===o||th.has(e)))},[eI,o,th,e$,eM]);let tw=(0,l.useMemo)(()=>tv,[tv]),ty=(0,l.useMemo)(()=>em.find(e=>e.id===i)??null,[em,i]),tN=(0,l.useMemo)(()=>i?tj.get(i)??[]:[],[i,tj]),tS=(0,l.useMemo)(()=>tw??(o?th.get(o)??null:null),[tw,o,th]),tA=(0,l.useMemo)(()=>{let e=n.get("tab");return"overview"!==e&&"preview"!==e&&"diff"!==e&&"dispatcher"!==e&&"terminal"===(0,J.tK)(tS)},[tS,n]),tC=!!o&&tA&&tt,tI=(0,l.useMemo)(()=>ty&&("board"===d||"notes"===d)?[ty.id,ty.defaultBranch||"main"].filter(Boolean).join(" \xb7 "):tw?[tw.projectId,tw.branch].filter(Boolean).join(" \xb7 "):ty?[ty.id,ty.defaultBranch||"main"].filter(Boolean).join(" \xb7 "):"All Projects",[ty,tw,d]),tE=(0,l.useMemo)(()=>k?w.find(e=>e.bridgeId===k)??null:null,[w,k]),tM=tE?`Device \xb7 ${tE.hostname}`:ep?"Device \xb7 Reconnecting":e?"Scope \xb7 Paired device required":"Scope \xb7 Local backend",t$=tE?`Showing projects and sessions from ${tE.hostname}.`:ep?"Waiting for the selected laptop to reconnect before loading dashboard data.":e?"Hosted dashboard access must target a connected laptop.":"Showing projects and sessions from the local backend because no paired laptop is selected.",tP=tE?"border-[rgba(24,197,143,0.35)] bg-[rgba(24,197,143,0.12)] text-[var(--vk-green)]":ep?"border-[color:color-mix(in_srgb,var(--vk-accent)_30%,transparent)] bg-[color:color-mix(in_srgb,var(--vk-accent)_12%,transparent)] text-[var(--vk-accent)]":e?"border-[rgba(255,143,122,0.24)] bg-[rgba(255,143,122,0.08)] text-[var(--vk-red)]":"border-[var(--vk-border)] bg-[var(--vk-bg-main)] text-[var(--vk-text-muted)]",tL=(0,l.useMemo)(()=>{let e=Array.isArray(ek)?ek:[],t=new Set;for(let e of E.pN)t.add(e.name);for(let r of e)r.name&&t.add(r.name);for(let e of em)e.agent&&t.add(e.agent);eK?.codingAgent&&t.add(eK.codingAgent),eB&&t.add(eB),0===t.size&&t.add(eK?.codingAgent||Y);let r=(0,E.Ge)(t);return 0===r.length&&r.push((0,E.a6)(eK?.codingAgent||Y,Y)),r},[ek,eK?.codingAgent,em,eB]),tO=(0,l.useMemo)(()=>{let e={};for(let t of E.pN)e[(0,I.q)(t.name)]={name:t.name,ready:!1,installed:!1,configured:!1,homepage:t.homepage,description:t.description,installHint:t.installHint??null,installUrl:t.installUrl??t.homepage??null,setupUrl:t.setupUrl??t.homepage??null};for(let t of Array.isArray(ek)?ek:[]){if(!t.name)continue;let r=(0,I.q)(t.name),a=(0,E.h7)(t.name);e[(0,I.q)(t.name)]={name:a?.name??t.name,ready:!0===t.ready,installed:!1!==t.installed,configured:!0===t.configured,homepage:"string"==typeof t.homepage?t.homepage:a?.homepage??e[r]?.homepage??null,description:"string"==typeof t.description?t.description:a?.description??e[r]?.description??null,installHint:"string"==typeof t.installHint?t.installHint:a?.installHint??e[r]?.installHint??null,installUrl:"string"==typeof t.installUrl?t.installUrl:a?.installUrl??e[r]?.installUrl??null,setupUrl:"string"==typeof t.setupUrl?t.setupUrl:a?.setupUrl??e[r]?.setupUrl??null}}return e},[ek]),tB=(0,l.useMemo)(()=>{let e={};for(let t of Array.isArray(ek)?ek:[])t.name&&t.runtimeModelCatalog&&(e[(0,I.q)(t.name)]=t.runtimeModelCatalog);return e},[ek]),tU=(0,l.useCallback)(e=>{let t=tO[(0,I.q)(e)],r=(0,E.h7)(e),a=t?.installed?t?.setupUrl??r?.setupUrl??t?.homepage??r?.homepage:t?.installUrl??r?.installUrl??t?.setupUrl??r?.setupUrl??t?.homepage??r?.homepage;a&&window.open(a,"_blank","noopener,noreferrer")},[tO]);async function t_(t,r){e3(!0),e2(null);try{if(e&&!k)throw Error("Pair or reconnect a laptop before saving preferences.");let a=await fetch((0,R.S)("/api/preferences",k),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await a.json().catch(()=>null);if(!a.ok)throw Error(n?.error??n?.reason??`Failed to save preferences: ${a.status}`);let s=eh(n?.preferences,t.codingAgent||Y);return eQ(s),eU(s.codingAgent),r?.closeDialog!==!1&&e6(!1),!0}catch(e){return e2(e instanceof Error?e.message:"Failed to save preferences"),!1}finally{e3(!1)}}(0,l.useEffect)(()=>{let e=!1;return async function(){if(!eu){e||(eQ(null),e2(null),e0(!1));return}e0(!0);try{let t=await fetch((0,R.S)("/api/preferences",k)),r=await t.json().catch(()=>null);if(!t.ok)throw Error(r?.error??r?.reason??`Failed to load preferences: ${t.status}`);if(e)return;let a=eh(r?.preferences,Y);eQ(a),e2(null)}catch(t){if(e)return;eQ(eh(null,Y)),e2(t instanceof Error?t.message:"Failed to load preferences")}finally{e||e0(!1)}}(),()=>{e=!0}},[k,eu]),(0,l.useEffect)(()=>{eK&&(eB||eU(eK.codingAgent))},[eK,eB]),(0,l.useEffect)(()=>{if(!eY){if(!eK||e&&!k)return void e6(!1);eK.onboardingAcknowledged||e6(!0)}},[k,eK,eY,e]),(0,l.useEffect)(()=>{if(0!==tL.length&&(!eB||!tL.includes(eB))){let e=eK?.codingAgent||Y;eU(tL.includes(e)?e:tL[0]??Y)}},[tL,eK?.codingAgent,eB]),(0,l.useEffect)(()=>{let e=(0,E.a6)(eB||ty?.agent||eK?.codingAgent||Y,Y),t=ty&&(0,I.q)(ty.agent)===(0,I.q)(e)?ty.agentModel:null,r=ty&&(0,I.q)(ty.agent)===(0,I.q)(e)?ty.agentReasoningEffort:null;eq((0,Q.c0)(e,eK?.modelAccess??(0,K.v)(null),tB,t,r))},[eK?.modelAccess,eK?.codingAgent,tB,eB,ty]);let tq=(0,l.useCallback)(()=>{e&&!k?eT("Pair or reconnect a laptop before adding a workspace."):(eT(null),eX(null),eR(null),eG(!0),eA())},[k,e,eA]);(0,l.useEffect)(()=>{e7&&!e5&&(e9(!1),tq())},[e7,e5]),(0,l.useEffect)(()=>{(!e||k)&&eT(null)},[k,e]);let tW=(0,l.useCallback)(async t=>{let r=eL.trim(),a=(0,Q.xb)(e_),n=(0,Q.aB)(e_),s=t?.bridgeId??k??null;if(e&&!s)return eR("Pair or reconnect a laptop before launching an agent session."),!1;let l=t?.projectId??i??em[0]?.id;if(!l)return eR("No project is configured in conductor.yaml"),!1;let o=(0,E.a6)(eB||Y,Y),d=tO[(0,I.q)(o)]??null;if(d&&!d.ready)return eR(d.installed?`${ex(o)} is not ready yet. Finish setup or authentication and try again.`:`${ex(o)} is not installed on this machine yet. Open setup and try again.`),tU(o),!1;eF(!0),eR(null);try{let e=await fetch((0,R.S)("/api/sessions",s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:l,prompt:r,...t?.issueId?.trim()?{issueId:t.issueId.trim()}:{},agent:o,...t?.branch?{branch:t.branch}:{},...t?.baseBranch?{baseBranch:t.baseBranch}:{},..."boolean"==typeof t?.useWorktree?{useWorktree:t.useWorktree}:{},...t?.permissionMode?{permissionMode:t.permissionMode}:{},...a?{model:a}:{},...n?{reasoningEffort:n}:{},...t?.attachments&&t.attachments.length>0?{attachments:t.attachments}:{}})}),i=await e.json().catch(()=>null);if(!e.ok)throw Error(i?.error??`Failed to create workspace: ${e.status}`);if(!i?.session?.id)throw Error("Session created but response is missing session id");return eO(""),eA(),tu.current=i.session.id,await eP(),tk({projectId:l,sessionId:i.session.id,tab:null,bridgeId:s},"push"),!0}catch(e){return eR(e instanceof Error?e.message:"Failed to create workspace"),!1}finally{eF(!1)}},[tO,e_,tk,tU,em,eL,eP,eB,k,i,e,eA]),tF=(0,l.useCallback)(async e=>{(await (0,V.J)(e,{bridgeId:k}),o===e)?tk({projectId:null,sessionId:null,workspaceView:null,tab:null},"replace"):k&&eP()},[k,tk,eP,o]),tD=(0,l.useCallback)(async t=>{if(e&&!k)return void eX("Pair or reconnect a laptop before adding a workspace.");eZ(!0),eX(null);try{let e=await fetch((0,R.S)("/api/workspaces",k),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await e.json().catch(()=>null);if(!e.ok)throw Error(r?.error??`Failed to add workspace: ${e.status}`);let a=r?.project?.id;if(!a)throw Error("Workspace created but response is missing project id");await ej(),eO(""),eA(),eG(!1),tk({projectId:a,sessionId:null,workspaceView:"direct",tab:null,bridgeId:k??null},"push")}catch(e){eX(e instanceof Error?e.message:"Failed to add workspace")}finally{eZ(!1)}},[k,tk,ej,e,eA]),tR=!eY&&!!eK&&(!e||!!k)&&!eK.onboardingAcknowledged,tV=eK??eh(null,eB||Y),tT=(0,E.a6)(eB||tV.codingAgent||Y,Y),tz=i??tv?.projectId??null;(0,L.Q)({enabled:!eY,projectId:tz,preferences:tV.notifications,bridgeId:k});let tG=(0,l.useCallback)(e=>{tk({projectId:e,sessionId:null,workspaceView:e?d:null,tab:null},"push"),eU((0,E.a6)(eK?.codingAgent||Y,Y)),tl("board"),eS()},[eS,tk,eK?.codingAgent,d]),tH=(0,l.useCallback)((e,t)=>{var r,a;let n,s=th.get(e)??null;tk((r=i??null,a=t?.tab,n={projectId:s?.projectId??r??null,sessionId:e,tab:a??(0,J.tK)(s)},"board"===d||"notes"===d?{...n,workspaceView:"direct"}:n),"push"),eS()},[eS,tk,i,th,d]),tZ=(0,l.useCallback)(()=>{e&&!k?t.push("/bridge/connect"):e6(!0)},[k,e,t]),tJ=(0,l.useCallback)(()=>{eH||eG(!1)},[eH]),tX=(0,l.useCallback)(()=>{e1||tR||(e6(!1),e2(null))},[tR,e1]),tK=(0,l.useCallback)(()=>{to(e=>!e)},[]),tQ=(0,l.useCallback)(async e=>{let t=encodeURIComponent(e),r=await fetch((0,R.S)(`/api/repositories/${t}`,k),{method:"DELETE"});(404===r.status||405===r.status)&&(r=await fetch((0,R.S)(`/api/repositories?id=${t}`,k),{method:"DELETE"}));let a=await r.json().catch(()=>null);if(!r.ok)throw Error(a?.error??`Failed to unlink project (${r.status})`);await ej()},[k,ej]),tY=(0,l.useMemo)(()=>eC?(0,a.jsx)(en,{projects:em,selectedProjectId:i,onSelectProject:tG,onUnlinkProject:tQ,sessions:eE,selectedSessionId:o,onSelectSession:tH,onArchiveSession:tF,onCreateWorkspace:tq}):null,[eE,tF,tG,tH,tQ,tq,em,i,o,eC]),t0=(0,l.useMemo)(()=>{let t=ty?(0,a.jsxs)("div",{role:"group","aria-label":"Project workspace view",className:"hidden w-fit rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-px xl:inline-flex",children:[(0,a.jsx)("button",{type:"button","aria-pressed":"direct"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"direct"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"direct"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Direct launch"}),(0,a.jsx)("button",{type:"button","aria-pressed":"board"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"board"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"board"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Board view"}),(0,a.jsx)("button",{type:"button","aria-pressed":"notes"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"notes"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"notes"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Notes"})]}):null;return"board"===d?(0,a.jsx)(el,{projectId:i,bridgeId:k,defaultAgent:tT,agentOptions:tL,projectSessions:tN,projectLabel:ty?.id??i,headerAccessory:t,onOpenSession:tH}):"notes"===d&&i?(0,a.jsx)(eo,{projectId:i,bridgeId:k,sessions:tN,selectedSessionId:o}):(0,a.jsx)(eb,{prompt:eL,setPrompt:eO,selectedAgent:tT,setSelectedAgent:eU,agentStates:tO,modelSelection:e_,setModelSelection:eq,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,agentOptions:tL,projects:em,bridges:w,selectedBridgeId:x,setSelectedBridgeId:p,requiresPairedDeviceScope:e,selectedProjectId:i,onSelectProject:tG,projectLabel:i??"All projects",hasProject:em.length>0,creating:eW,error:tg,onOpenAddWorkspace:tq,onOpenAgentSetup:tU,onCreate:tW})},[tL,tO,w,eW,tW,e_,tU,tq,em,tN,ty,o,tH,eL,tT,tV.modelAccess,e,tB,x,i,eO,tg,d,tk]),t1=(0,l.useMemo)(()=>{if(!ty)return t0;let e=({fullWidth:e=!1,compact:t=!1}={})=>(0,a.jsxs)("div",{role:"group","aria-label":"Project workspace view",className:`inline-flex ${e?"w-full":"w-fit"} rounded-[6px] border border-[var(--vk-border)] ${t?"p-0.5":"p-1"}`,children:[(0,a.jsx)("button",{type:"button","aria-pressed":"direct"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"direct"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"direct"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Direct launch"}),(0,a.jsx)("button",{type:"button","aria-pressed":"board"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"board"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"board"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Board view"}),(0,a.jsx)("button",{type:"button","aria-pressed":"notes"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"notes"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"notes"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Notes"})]});if("board"===d){let t={"--dispatcher-panel-width":`${td}px`},r=!ta,n=!r||"board"===ts,s=!r||"chat"===ts,l=r&&null===o,i=ta&&ti&&null===o,c=null!==o||!ti;return(0,a.jsxs)("div",{style:t,className:"relative flex h-full min-h-0 flex-1 flex-col overflow-hidden",children:[r?(0,a.jsx)("div",{className:"border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-3 py-2 xl:hidden",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[e({fullWidth:!0,compact:!0}),l?(({fullWidth:e=!1,compact:t=!1}={})=>(0,a.jsxs)("div",{className:`inline-flex ${e?"w-full":"w-fit"} rounded-[6px] border border-[var(--vk-border)] ${t?"p-0.5":"p-1"}`,children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{tl("board"),tk({projectId:ty.id,workspaceView:"board"},"replace")},"aria-pressed":"board"===d&&"board"===ts,className:`inline-flex flex-1 items-center justify-center rounded-[4px] font-medium transition-colors ${t?"min-h-[30px] gap-1 px-2.5 text-[11px]":"min-h-[34px] gap-1.5 px-3 text-[12px]"} ${"board"===d&&"board"===ts?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:[(0,a.jsx)(u.A,{className:`${t?"h-3 w-3":"h-3.5 w-3.5"} shrink-0`}),(0,a.jsx)("span",{children:"Board"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tl("chat"),tk({projectId:ty.id,workspaceView:"board"},"replace")},"aria-pressed":"board"===d&&"chat"===ts,className:`inline-flex flex-1 items-center justify-center rounded-[4px] font-medium transition-colors ${t?"min-h-[30px] gap-1 px-2.5 text-[11px]":"min-h-[34px] gap-1.5 px-3 text-[12px]"} ${"board"===d&&"chat"===ts?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:[(0,a.jsx)(m.A,{className:`${t?"h-3 w-3":"h-3.5 w-3.5"} shrink-0`}),(0,a.jsx)("span",{children:"Dispatcher"})]})]}))({fullWidth:!0,compact:!0}):null]})}):null,(0,a.jsxs)("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden xl:flex-row",children:[(0,a.jsx)("div",{className:`${n?"block":"hidden"} min-h-0 min-w-0 flex-1 overflow-hidden xl:block`,children:t0}),c?(0,a.jsx)("div",{className:"absolute bottom-0 right-[var(--dispatcher-panel-width)] top-0 z-20 hidden w-2 translate-x-1/2 cursor-col-resize xl:block",onMouseDown:e=>{e.preventDefault(),tp(!0)},"aria-hidden":"true",children:(0,a.jsx)("div",{className:"mx-auto h-full w-px bg-transparent transition-colors hover:bg-[var(--vk-border)]"})}):null,(0,a.jsxs)("div",{className:`${s?"flex":"hidden xl:flex"} ${i?"flex-1 min-h-0 xl:h-auto xl:max-h-none xl:w-[56px] xl:flex-none xl:min-h-0":"flex-1 min-h-[min(360px,50dvh)] xl:w-[var(--dispatcher-panel-width)] xl:flex-none xl:min-h-0"} flex-col overflow-hidden border-t border-[var(--vk-border)] bg-[var(--vk-bg-panel)] xl:border-l xl:border-t-0`,children:[r&&s&&null!==o?(0,a.jsx)("div",{className:"flex items-center border-b border-[var(--vk-border)] px-3 py-2 xl:hidden",children:(0,a.jsxs)("button",{type:"button",onClick:()=>tl("board"),className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-1 text-[12px] font-medium text-[var(--vk-text-muted)] transition-colors hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-strong)]",children:[(0,a.jsx)(b.A,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:"Back to board"})]})}):null,o?tS?(0,a.jsx)("div",{className:"relative min-h-0 h-full min-w-0 flex-1 overflow-hidden",children:e8.map(e=>{let t=e===o,r=t?tS:th.get(e)??null;return r&&r.projectId===ty.id?(0,a.jsx)("div",{"aria-hidden":!t,className:t?"relative z-10 h-full min-w-0":"pointer-events-none absolute inset-0 overflow-hidden opacity-0 select-none",children:(0,a.jsx)(ea,{sessionId:e,initialSession:r,bridgeId:k,active:t,suppressPreviewAutoOpen:t&&tu.current===e,immersiveMobileMode:t&&tC})},e):null})}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center bg-[var(--vk-bg-panel)] text-[13px] text-[var(--vk-text-muted)]",children:"Loading session workspace..."}):(0,a.jsx)(ei,{projectId:ty.id,bridgeId:k,defaultAgent:tT,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,collapsed:i,onToggleCollapsed:tK})]})]})]})}return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[(0,a.jsx)("div",{className:"border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)]/70 px-3 py-3 sm:px-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--vk-text-muted)]",children:"Project Workspace"}),(0,a.jsxs)("p",{className:"mt-1 truncate text-[14px] text-[var(--vk-text-strong)]",children:[ty.id," \xb7 ",ty.defaultBranch||"main"]})]}),(0,a.jsx)("div",{className:"hidden xl:inline-flex",children:e()}),(0,a.jsx)("div",{className:"xl:hidden",children:e({fullWidth:!0,compact:!0})})]})}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:t0})]})},[ts,ti,td,tS,k,tK,tC,e8,tk,tT,ty,tN,o,th,ta,t0,d]),t3=(0,l.useMemo)(()=>ep?(0,a.jsx)("div",{className:"flex h-full min-h-0 flex-1 items-center justify-center bg-[var(--vk-bg-main)] px-4",children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-[12px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-5 py-5 text-center shadow-[0_18px_50px_rgba(0,0,0,0.18)]",children:[(0,a.jsx)("div",{className:"mx-auto flex h-11 w-11 items-center justify-center rounded-full border border-[color:color-mix(in_srgb,var(--vk-accent)_30%,transparent)] bg-[color:color-mix(in_srgb,var(--vk-accent)_12%,transparent)] text-[var(--vk-accent)]",children:(0,a.jsx)(f.A,{className:"h-5 w-5 animate-spin"})}),(0,a.jsx)("h2",{className:"mt-4 text-[18px] font-medium text-[var(--vk-text-strong)]",children:"Reconnecting paired laptop"}),(0,a.jsx)("p",{className:"mt-2 text-[14px] leading-6 text-[var(--vk-text-muted)]",children:"Waiting for the selected laptop to report online before loading its projects and sessions."})]})}):o&&(null===i||"board"!==d&&"notes"!==d)?(0,a.jsx)("div",{className:"relative min-h-0 h-full min-w-0 flex-1 overflow-hidden",children:e8.map(e=>{let t=e===o,r=t?tw:th.get(e)??null;return(0,a.jsx)("div",{"aria-hidden":!t,className:t?"relative z-10 h-full min-w-0":"pointer-events-none absolute inset-0 overflow-hidden opacity-0 select-none",children:(0,a.jsx)(ea,{sessionId:e,initialSession:r,bridgeId:k,active:t,suppressPreviewAutoOpen:t&&tu.current===e,immersiveMobileMode:t&&tC,onOpenSidebar:eN})},e)})}):null!==i?(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:t1}):(0,a.jsx)("div",{className:"flex h-full min-h-0 w-full flex-1 overflow-hidden",children:(0,a.jsx)(es,{projects:em,sessions:eE,onCreateWorkspace:tq,onSelectSession:tH})}),[eE,e8,t1,tw,o,tH,tq,em,i,th,ep,eN,d]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(U.G,{mobileSidebarOpen:ew,desktopSidebarOpen:ey,onToggleSidebar:eN,hideMobileSidebarToggle:tC,sidebar:tY,children:[tC?null:(0,a.jsx)(_.V,{title:tI,onOpenPreferences:tZ,rightContent:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium ${tP}`,title:t$,children:tM}),(0,a.jsx)(q.J,{})]})}),(0,a.jsxs)("div",{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden ${tC?"bg-[#060404]":""}`,children:[eV?(0,a.jsx)("div",{className:"border-b border-[var(--vk-red)]/35 bg-[color:color-mix(in_srgb,var(--vk-red)_12%,var(--vk-bg-panel))] px-3 py-2 text-[13px] text-[var(--vk-red)] sm:px-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("p",{className:"min-w-0 flex-1",children:eV}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(null),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[4px] text-[var(--vk-red)]/80 hover:bg-[var(--vk-red)]/10 hover:text-[var(--vk-red)]","aria-label":"Dismiss workspace action error",children:(0,a.jsx)(g.A,{className:"h-4 w-4"})})]})}):null,t3]})]}),ez?(0,a.jsx)(ed,{open:ez,onClose:tJ,onCreate:tD,creating:eH,error:eJ,defaultAgent:tT,agentOptions:tL,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,bridgeId:k}):null,e5||tR?(0,a.jsx)(ec,{open:e5,mode:tR?"onboarding":"settings",creating:e1,error:e4,current:tV,projectCount:em.length,agentOptions:tL,agentStates:tO,runtimeModelCatalogs:tB,onRepositoriesChanged:ej,onOnboardingComplete:({needsProject:e})=>{e&&e9(!0)},onOpenAgentSetup:tU,onClose:tX,onSave:t_,bridgeId:k}):null]})}c.A,x.A,p.A,u.A,m.A,h.A,v.A,v.A,x.A,[{id:"vscode",label:"VS Code"},{id:"vscode-insiders",label:"VS Code Insiders"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"intellij-idea",label:"IntelliJ IDEA"},{id:"zed",label:"Zed"},{id:"xcode",label:"Xcode"},{id:"antigravity",label:"Antigravity"},{id:"custom",label:"Custom"}].filter(e=>"custom"!==e.id),c.A,o.mWn,d.$$9,o.i4$,c.A;let eb=(0,l.memo)(function({prompt:e,setPrompt:t,selectedAgent:r,setSelectedAgent:n,agentStates:s,modelSelection:o,setModelSelection:d,modelAccess:c,runtimeModelCatalogs:x,agentOptions:p,projects:u,bridges:m,selectedBridgeId:b,setSelectedBridgeId:M,requiresPairedDeviceScope:$,selectedProjectId:P,onSelectProject:L,projectLabel:O,hasProject:B,creating:U,error:_,onOpenAddWorkspace:q,onOpenAgentSetup:W,onCreate:V}){let T=(0,l.useMemo)(()=>{let e=new Map(E.BO.map((e,t)=>[e,t]));return[...p].sort((t,r)=>{let a=e.get((0,I.q)(t))??Number.MAX_SAFE_INTEGER,n=e.get((0,I.q)(r))??Number.MAX_SAFE_INTEGER;return a!==n?a-n:ex(t).localeCompare(ex(r))})},[p]),z=ex(r),G=s[(0,I.q)(r)]??null,H=(0,l.useMemo)(()=>[...u].sort((e,t)=>e.id.localeCompare(t.id)),[u]),Z=P??H[0]?.id??null,J=(0,l.useMemo)(()=>H.find(e=>e.id===Z)??null,[Z,H]),K=(0,l.useMemo)(()=>m.filter(e=>e.connected),[m]),Y=(0,l.useMemo)(()=>!b||K.some(e=>e.bridgeId===b),[K,b]),[ee,et]=(0,l.useState)([]),[er,ea]=(0,l.useState)(!1),[en,es]=(0,l.useState)(""),[el,ei]=(0,l.useState)(""),[eo,ed]=(0,l.useState)([]),[ec,em]=(0,l.useState)(!1),[eh,ev]=(0,l.useState)(!1),[eb,ef]=(0,l.useState)(!1),[eg,ej]=(0,l.useState)(!1),[ek,ew]=(0,l.useState)("default"),[ey,eN]=(0,l.useState)([]),[eS,eA]=(0,l.useState)(!1),[eC,eI]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!J){et([]),es(""),ea(!1);return}et([]),es(J.defaultBranch.trim()||"main"),ea(!1)},[J]),(0,l.useEffect)(()=>{if(!Z){ed([]),ei(""),em(!1);return}ed([]),ei(""),em(!1)},[Z]);let eE=(0,l.useCallback)(async()=>{if(!J)return;let e=J.defaultBranch.trim()||"main";if(!J.path?.trim()){et([e]),es(t=>t.trim().length>0?t:e);return}ea(!0);try{let t=new URLSearchParams({path:J.path}),r=await fetch((0,R.S)(`/api/workspaces/branches?${t.toString()}`,b)),a=await r.json().catch(()=>null),n=Array.isArray(a?.branches)?a.branches.filter(e=>"string"==typeof e&&e.trim().length>0):[],s="string"==typeof a?.defaultBranch&&a.defaultBranch.trim().length>0?a.defaultBranch.trim():e,l=n.length>0?n:[s];et(l),es(e=>e.trim().length>0&&l.includes(e)?e:s)}catch{et([e]),es(e)}finally{ea(!1)}},[b,J]),eM=(0,l.useCallback)(async()=>{if(Z){em(!0);try{let e=await fetch((0,R.S)(`/api/boards?projectId=${encodeURIComponent(Z)}`,b)),t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Failed to load tasks: ${e.status}`);let r=(Array.isArray(t?.columns)?t.columns:[]).flatMap(e=>Array.isArray(e.tasks)?e.tasks:[]),a=new Set,n=r.filter(e=>{let t=ep(e);return!(!t||a.has(t))&&(a.add(t),!0)});ed(n),ei(e=>n.some(t=>ep(t)===e)?e:"")}catch{ed([]),ei("")}finally{em(!1)}}},[Z,b]);(0,l.useEffect)(()=>{!eb||er||ee.length>0||eE()},[er,eb,ee.length,eE]),(0,l.useEffect)(()=>{!eh||ec||eo.length>0||eM()},[eo.length,eM,ec,eh]);let e$=(0,l.useMemo)(()=>(0,Q.Ik)(r,c,x),[c,x,r]),eP=(0,l.useMemo)(()=>eo.find(e=>ep(e)===el)??null,[eo,el]),eL=(0,Q.xb)(o)??"",eO=(0,l.useMemo)(()=>{let e=new Set,t=[],a=eL.trim();for(let r of e$)e.has(r.id)||(e.add(r.id),t.push(r));return a&&!e.has(a)&&(e.add(a),t.unshift({id:a,label:function(e,t){let r=t.trim(),a=(0,I.q)(e);if(!r)return r;if("claude-code"===a){let e=r.toLowerCase();if("opus"===e)return"Claude Opus";if("sonnet"===e)return"Claude Sonnet";if("haiku"===e)return"Claude Haiku";let t=e.match(/^claude-(sonnet|opus|haiku)-(\d+)-(\d+)(?:-\d{8})?$/);if(t){let e=t[1];return`Claude ${e[0]?.toUpperCase()+e.slice(1)} ${t[2]}.${t[3]}`}}return r.split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":/^\d+(?:\.\d+)?$/.test(e)?e:e[0]?.toUpperCase()+e.slice(1)).join("-")}(r,a),description:"Current selected model.",access:[]})),t},[e$,r,eL]),eB=(0,l.useMemo)(()=>!G||G.ready||eL?eL?eO.find(e=>e.id===eL)?.label??eL:"Default":"Setup required",[eO,G,eL]),eU=(0,l.useMemo)(()=>(0,Q.iL)(r,c,x,eL),[c,x,r,eL]),e_=(0,Q.aB)(o)??"",eq=(0,l.useMemo)(()=>{let e=eU.find(e=>e.id===e_);return e?e.label:e_||(eU[0]?.label??"Default")},[eU,e_]),eW="z-50 min-w-[240px] max-w-[calc(100vw-32px)] rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-2 shadow-[0_18px_50px_rgba(0,0,0,0.35)] sm:max-w-none",eF=`${eW} max-h-[min(360px,50vh)] overflow-y-auto`,eD="flex min-h-[44px] cursor-default items-center gap-2 rounded-[3px] px-3 py-2 text-[14px] leading-[21px] text-[var(--vk-text-normal)] outline-none hover:bg-[var(--vk-bg-hover)] focus:bg-[var(--vk-bg-hover)] sm:min-h-[36px]",eR=[{id:"default",label:"Default",icon:v.A},{id:"auto",label:"Auto",icon:j.A},{id:"ask",label:"Ask",icon:k.A},{id:"plan",label:"Plan",icon:w.A}],eV=eR.find(e=>e.id===ek)??eR[0],eT="launchpad-attachment-input",ez=U||eS,eG=e=>{let t=e.repo?.trim();if(t){let e=t.split("/").filter(Boolean),r=e[e.length-1]?.replace(/\.git$/i,"");if(r)return r}return e.id},eH=J?eG(J):null,eZ=J?`${eH} \xb7 ${en||J.defaultBranch||"main"}`:B?O:"Select project",eJ=eP?.taskRef?.trim()||eP?.issueId?.trim()||eP?.id||"",eX=eP?eu(eP.text):"Choose a task, bug, or issue from this project's board",eK=J?.id??Z??null,eQ=(0,l.useCallback)(e=>{let t=Array.from(e.currentTarget.files??[]);if(e.currentTarget.value="",!t.length)return;let r=new Set(ey.map(e=>`${e.name}:${e.size}:${e.lastModified}`)),a=t.filter(e=>!r.has(`${e.name}:${e.size}:${e.lastModified}`));a.length>0&&eN(e=>[...e,...a]),eI(null)},[ey]),eY=(0,l.useCallback)(e=>{eN(t=>t.filter((t,r)=>r!==e))},[]),e0=(0,l.useCallback)(async()=>{let e;if(eI(null),!eK||!J)return V({projectId:eK??void 0,...eg?{baseBranch:en||J?.defaultBranch||void 0}:{branch:en||J?.defaultBranch||void 0},issueId:el.trim()||void 0,bridgeId:b||void 0,useWorktree:eg,permissionMode:ek});eA(!0),eI(null);try{ey.length>0&&(e=await (0,D.P)({files:ey,projectId:J.id,taskRef:el.trim()||void 0,bridgeId:b||void 0}))}catch(e){return eI(e instanceof Error?e.message:"Failed to upload attachment"),!1}finally{eA(!1)}let t=await V({projectId:eK??void 0,...eg?{baseBranch:en||J.defaultBranch||void 0}:{branch:en||J.defaultBranch||void 0},issueId:el.trim()||void 0,bridgeId:b||void 0,useWorktree:eg,permissionMode:ek,...e&&e.length>0?{attachments:e}:{}});return t&&(eN([]),eI(null)),t},[el,eK,V,ek,en,J,J?.defaultBranch,b,ey,eg]);return(0,l.useEffect)(()=>{eN([]),eI(null)},[eK]),(0,a.jsx)("section",{className:"flex h-full min-h-0 items-start justify-center overflow-auto bg-[var(--vk-bg-main)] px-3 py-4 sm:items-center sm:px-6 sm:py-6",children:(0,a.jsxs)("div",{className:"w-full max-w-[768px]",children:[(0,a.jsx)("h1",{className:"pb-4 text-center text-[30px] font-medium leading-[34px] tracking-[-0.7px] text-[var(--vk-text-strong)] sm:text-[36px] sm:leading-[40px] sm:tracking-[-0.9px]",children:"What would you like to work on?"}),b?null:(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)(h.A,{className:"mt-0.5 h-[14px] w-[14px] shrink-0"}),(0,a.jsx)("span",{children:$?"Pair or reconnect a laptop to browse workspaces and launch coding agents from the web dashboard.":"Showing projects and sessions from the local backend. Pair a laptop and select it here to browse that device instead."})]}),(0,a.jsxs)("div",{className:"mx-auto w-full rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-px",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-b border-[var(--vk-border)] px-2 pb-[9px] pt-2 sm:flex-row sm:items-center",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:flex-1",children:[(0,a.jsx)(F.N,{seed:{label:r},className:"h-[25px] w-[25px] shrink-0 border-none bg-transparent"}),(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[31px] min-w-0 max-w-full items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] outline-none hover:bg-[var(--vk-bg-hover)] data-[state=open]:bg-[var(--vk-bg-hover)] sm:max-w-[280px]","aria-label":"Select agent",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate pr-1 text-left",children:z}),(0,a.jsx)(y.A,{className:"h-3 w-3 shrink-0 text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Agents"}),T.map(e=>{let t=e===r,l=s[(0,I.q)(e)]??null;return(0,a.jsxs)(i.q7,{onSelect:()=>n(e),className:eD,children:[(0,a.jsx)(F.N,{seed:{label:e},className:"h-6 w-6 border-none bg-transparent"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{children:ex(e)}),l?.ready?null:(0,a.jsx)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--vk-text-muted)]",children:(0,X.f)(l)})]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:t?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e)})]})})]})]}),(0,a.jsxs)(i.bL,{onOpenChange:ev,children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",disabled:!Z,className:"flex h-[31px] w-full min-w-0 items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-left disabled:cursor-not-allowed disabled:opacity-50 sm:w-[240px] sm:shrink-0","aria-label":"Select task",children:[(0,a.jsx)("span",{className:`min-w-0 flex-1 truncate text-[14px] leading-[21px] ${eJ?"text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)]"}`,children:eJ||"No task"}),(0,a.jsx)(y.A,{className:"h-3 w-3 shrink-0 text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"end",side:"bottom",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Tasks"}),(0,a.jsx)("p",{className:"px-3 pb-2 text-[12px] leading-[16px] text-[var(--text-faint)]",children:eX}),(0,a.jsxs)(i.q7,{onSelect:()=>ei(""),className:eD,children:[(0,a.jsx)("span",{children:"No linked task"}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:el?null:(0,a.jsx)(N.A,{className:"h-4 w-4"})})]}),ec?(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"Loading board tasks..."}):eo.length>0?eo.map(e=>{let t=ep(e),r=eu(e.text),n=[e.type,e.priority].filter(Boolean).join(" \xb7 ");return(0,a.jsxs)(i.q7,{onSelect:()=>ei(t),className:`${eD} min-w-[320px] items-start`,children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate",children:e.taskRef?.trim()||r}),(0,a.jsxs)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--text-faint)]",children:[e.taskRef?.trim()?r:t,n?` \xb7 ${n}`:""]})]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:el===t?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},t)}):(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"No existing tasks were found for this project."})]})})]})]}),(0,a.jsx)("div",{className:"rounded-[3.5px]",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-2",children:[(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsx)("textarea",{value:e,onChange:e=>t(e.target.value),placeholder:"Optional launch prompt. Leave empty to open the native CLI.",rows:1,className:"min-h-[24px] w-full resize-none bg-transparent pr-16 text-[16px] leading-[24px] text-[var(--vk-text-normal)] outline-none placeholder:text-[var(--vk-text-muted)]"}),(0,a.jsxs)("label",{htmlFor:eT,className:`absolute right-[18px] top-0 inline-flex h-[24px] w-[24px] items-center justify-center rounded-[4px] ${eK?"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]":"cursor-not-allowed opacity-50"}`,children:[(0,a.jsx)("input",{id:eT,type:"file",accept:"*/*",multiple:!0,onChange:eQ,disabled:!eK||ez,className:"hidden"}),(0,a.jsx)(S.A,{className:"h-[14px] w-[14px]"})]}),(0,a.jsx)("button",{type:"button","aria-label":"Preview",className:"absolute right-0 top-0 inline-flex h-[24px] w-[24px] items-center justify-center rounded-[4px] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]",children:(0,a.jsx)(A.A,{className:"h-[14px] w-[14px]"})})]}),ey.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:ey.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-[999px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-2 py-1 text-[11px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)("span",{className:"max-w-[160px] truncate",title:e.name,children:e.name}),(0,a.jsx)("button",{type:"button","aria-label":`Remove attachment ${e.name}`,onClick:()=>eY(t),className:"inline-flex h-[14px] w-[14px] items-center justify-center rounded-full text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]",children:(0,a.jsx)(g.A,{className:"h-3 w-3"})})]},`${e.name}-${e.size}-${e.lastModified}-${t}`))}):null,(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-x-1 gap-y-2",children:[(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsx)("button",{type:"button",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)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Select workspace or project",children:(0,a.jsx)(v.A,{className:"h-[15px] w-[15px]"})})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Projects"}),H.map(e=>{let t=eG(e),r=e.id!==t?e.id:e.path?.trim()||e.repo?.trim()||null;return(0,a.jsxs)(i.q7,{onSelect:()=>L(e.id),className:`${eD} min-w-[280px] items-start`,children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate",children:t}),r?(0,a.jsx)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--text-faint)]",children:r}):null]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:e.id===Z?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id)}),(0,a.jsx)(i.wv,{className:"my-1 h-px bg-[var(--vk-border)]"}),(0,a.jsxs)(i.q7,{onSelect:q,className:eD,children:[(0,a.jsx)(C.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"Add Workspace"})]})]})})]}),eU.length>0?(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button","aria-label":"Select reasoning effort",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("span",{children:eq}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Reasoning"}),eU.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>d({...o,reasoningEffort:e.id}),className:eD,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:e_===e.id?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id))]})})]}):null,(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("span",{children:eB}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Model"}),(0,a.jsxs)(i.q7,{onSelect:()=>d((0,Q.c0)(r,c,x,J?.agentModel,J?.agentReasoningEffort)),className:eD,children:[(0,a.jsx)("span",{children:"Default"}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:eL?null:(0,a.jsx)(N.A,{className:"h-4 w-4"})})]}),eO.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>{var t;let a;return t=e.id,a=(0,Q.iL)(r,c,x,t),void d({catalogModel:t,customModel:"",reasoningEffort:a.some(e=>e.id===o.reasoningEffort)?o.reasoningEffort:(0,Q.YS)(r,c,x,t)})},className:eD,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:eL===e.id?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id)),0===eO.length?(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"Models will appear here after the selected agent is installed and its runtime catalog is detected."}):null,G&&!G.ready?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.wv,{className:"my-1 h-px bg-[var(--vk-border)]"}),(0,a.jsx)("button",{type:"button",onClick:()=>W(r),className:"flex w-full items-center rounded-[3px] px-3 py-2 text-left text-[13px] text-[var(--vk-orange)] transition hover:bg-[var(--vk-bg-hover)]",children:G.installed?"Open setup":"Open install guide"})]}):null]})})]}),(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",children:[(0,a.jsx)("span",{children:eV.label}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Permissions"}),eR.map(({id:e,label:t,icon:r})=>(0,a.jsxs)(i.q7,{onSelect:()=>ew(e),className:eD,children:[(0,a.jsx)(r,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:t}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:ek===e?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e))]})})]}),K.length>0?(0,a.jsxs)("label",{className:"inline-flex h-[29px] max-w-[260px] items-center gap-[6px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)]",children:[(0,a.jsx)(h.A,{className:"h-[14px] w-[14px] text-[var(--vk-text-muted)]"}),(0,a.jsxs)("select",{value:b,onChange:e=>M(e.target.value),className:"min-w-0 flex-1 bg-transparent text-[14px] text-[var(--vk-text-normal)] outline-none",children:[$?null:(0,a.jsx)("option",{value:"",children:"Local backend"}),K.map(e=>(0,a.jsxs)("option",{value:e.bridgeId,children:[e.hostname," \xb7 ",e.os]},e.bridgeId))]})]}):(0,a.jsxs)("div",{className:"inline-flex h-[29px] items-center gap-[6px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)(h.A,{className:"h-[14px] w-[14px]"}),(0,a.jsx)("span",{children:b&&!Y?"Waiting for selected device":$?"No device connected":"Local backend"})]}),(0,a.jsxs)(i.bL,{onOpenChange:ef,children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsx)("button",{type:"button",disabled:!J,className:"inline-flex min-h-[29px] max-w-[320px] items-center justify-center truncate text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:text-[var(--vk-text-strong)] disabled:cursor-not-allowed disabled:opacity-50",children:eZ})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",side:"bottom",sideOffset:6,avoidCollisions:!1,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Branch"}),eH?(0,a.jsx)("p",{className:"px-3 pb-2 text-[12px] leading-[16px] text-[var(--text-faint)]",children:eH}):null,er?(0,a.jsx)("div",{className:"px-3 py-2 text-[14px] leading-[21px] text-[var(--vk-text-muted)]",children:"Loading branches..."}):ee.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>es(e),className:eD,children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:en===e?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e))]})})]})]}),(0,a.jsx)("div",{className:"flex w-full justify-end sm:w-auto",children:(0,a.jsx)("button",{type:"button",onClick:e0,disabled:ez||!Z,className:"inline-flex min-h-[29px] items-center justify-center rounded-[3px] bg-[var(--vk-bg-hover)] px-[8px] py-[6.5px] text-[16px] leading-[16px] text-[var(--vk-text-strong)] transition-colors hover:bg-[var(--vk-bg-active)] disabled:cursor-not-allowed disabled:opacity-50",children:ez?(0,a.jsx)(f.A,{className:"h-4 w-4 animate-spin"}):"Launch"})})]}),G&&!G.ready?(0,a.jsx)("div",{className:"rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-3 py-2 text-[13px] text-[var(--vk-text-normal)]",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-[13px] text-[var(--vk-text-strong)]",children:[z," is not ready on this machine."]}),(0,a.jsx)("p",{className:"pt-0.5 text-[12px] text-[var(--vk-text-muted)]",children:G.installed?"Finish login or local setup to load models and start streaming sessions.":"Install the CLI first, then its models and authentication state will appear here."})]}),(0,a.jsx)("button",{type:"button",onClick:()=>W(r),className:"inline-flex h-[29px] items-center justify-center rounded-[3px] border border-[var(--vk-border)] px-3 text-[12px] text-[var(--vk-orange)] hover:bg-[var(--vk-bg-hover)]",children:G.installed?"Open setup":"Open install"})]})}):null,(0,a.jsxs)("label",{className:"flex items-start gap-2 rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-2 py-2 text-[13px] text-[var(--vk-text-normal)]",children:[(0,a.jsx)("input",{type:"checkbox",checked:eg,onChange:e=>ej(e.target.checked),className:"mt-0.5 h-4 w-4 rounded border border-[var(--vk-border)] bg-transparent accent-[var(--vk-orange)]"}),(0,a.jsxs)("span",{children:["Use worktree isolation",(0,a.jsx)("span",{className:"block text-[11px] text-[var(--vk-text-muted)]",children:"If unchecked, the session runs directly on the selected branch in the local repo."})]})]})]})})]}),_&&(0,a.jsx)("p",{className:"pt-2 text-[12px] text-[var(--status-error)]",children:_}),eC&&(0,a.jsx)("p",{className:"pt-2 text-[12px] text-[var(--status-error)]",children:eC})]})})})}},e=>{e.O(0,[3036,80691,63357,65587,33051,61962,54177,84271,28386,71679,587,61968,77358],()=>e(e.s=12529)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34443],{27893:(e,l,a)=>{a.d(l,{a:()=>n});var s=a(5974);let n=(0,s.createServerReference)("00aa412261f47885448b5767d07895e1d7ca07e1e2",s.callServer,void 0,s.findSourceMapURL,"createOrReadKeylessAction")},34443:(e,l,a)=>{a.r(l),a.d(l,{KeylessCreatorOrReader:()=>r});var s=a(79748),n=a(7620),t=a(27893);let r=e=>{var l;let{children:a}=e,r=(null==(l=(0,s.useSelectedLayoutSegments)()[0])?void 0:l.startsWith("/_not-found"))||!1,[i,u]=n.useActionState(t.a,null);return((0,n.useEffect)(()=>{r||n.startTransition(()=>{u()})},[r]),n.isValidElement(a))?n.cloneElement(a,{key:null==i?void 0:i.publishableKey,publishableKey:null==i?void 0:i.publishableKey,__internal_keyless_claimKeylessApplicationUrl:null==i?void 0:i.claimUrl,__internal_keyless_copyInstanceKeysUrl:null==i?void 0:i.apiKeysUrl,__internal_bypassMissingPublishableKey:!0}):a}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71679],{22153:(e,t,n)=>{n.d(t,{_:()=>g});var i=n(7620),l=n(31404),o=n(10926);let a=new Map,r=new Map;function s(e){let t=r.get(e);return t||(t={agents:[],loading:!0,lastFetchedAt:0,inFlight:null,retryTimeout:null},r.set(e,t)),t}function c(e){let t=a.get(e);return t||(t=new Set,a.set(e,t)),t}function u(e){for(let t of c(e))t()}function d(e){let t=s(e);return t.agents.length>0&&Date.now()-t.lastFetchedAt<3e4}function m(e,t){let n=s(e);null===n.retryTimeout&&(n.retryTimeout=window.setTimeout(()=>{s(e).retryTimeout=null,h(e,t,!0)},1e4))}async function h(e,t,n=!1){let i=s(e);if(!n&&d(e)){i.loading&&(i.loading=!1,u(e));return}return i.inFlight||(i.loading=!0,u(e),i.inFlight=(async()=>{try{var n;let o=await fetch((0,l.S)("/api/agents",t),{cache:"no-store"});if(!o.ok)throw Error(`Failed to fetch agents: ${o.status}`);let a=(n=await o.json(),Array.isArray(n)?n:n&&"object"==typeof n&&"agents"in n&&Array.isArray(n.agents)?n.agents:[]);a.length>0?(i.agents=a,i.lastFetchedAt=Date.now(),null!==i.retryTimeout&&(window.clearTimeout(i.retryTimeout),i.retryTimeout=null)):m(e,t)}catch{m(e,t)}finally{i.loading=!1,i.inFlight=null,u(e)}})()),i.inFlight}function g(e,t){let n=t?.enabled??!0,l=(0,o.C0)(e)??"local",[a,r]=(0,i.useState)({agents:[],loading:n});return(0,i.useEffect)(()=>{if(!n)return void r({agents:[],loading:!1});let t=()=>{let e;return r({agents:(e=s(l)).agents,loading:e.loading})};c(l).add(t),t(),h(l,e);let i=()=>{d(l)||h(l,e,!0)},o=()=>{"visible"!==document.visibilityState||d(l)||h(l,e,!0)};return window.addEventListener("focus",i),document.addEventListener("visibilitychange",o),()=>{c(l).delete(t),window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",o)}},[e,n,l]),n?a:{agents:[],loading:!1}}},33866:(e,t,n)=>{n.d(t,{BO:()=>o,Ge:()=>c,a6:()=>u,h7:()=>r,iQ:()=>s,pN:()=>l});var i=n(5739);let l=[{name:"codex",label:"Codex",description:"OpenAI Codex CLI",homepage:"https://github.com/openai/codex",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/openai.svg",installHint:"npm install -g @openai/codex",installUrl:"https://github.com/openai/codex",setupUrl:"https://chatgpt.com/codex"},{name:"gemini",label:"Gemini",description:"Google Gemini CLI",homepage:"https://ai.google.dev/gemini-api/docs",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/googlegemini.svg",installHint:"npm install -g @google/gemini-cli",installUrl:"https://ai.google.dev/gemini-api/docs",setupUrl:"https://aistudio.google.com/"},{name:"qwen-code",label:"Qwen Code",description:"Qwen Code CLI",homepage:"https://qwenlm.github.io/announcements/",iconUrl:null,installHint:"npm install -g @qwen-code/qwen-code@latest",installUrl:"https://qwenlm.github.io/announcements/",setupUrl:"https://chat.qwen.ai/"},{name:"droid",label:"Droid",description:"Factory Droid CLI",homepage:"https://github.com/Factory-AI/factory",iconUrl:"https://raw.githubusercontent.com/Factory-AI/factory/main/docs/images/droid_logo_cli.png",installHint:"npm install -g @factory/cli",installUrl:"https://github.com/Factory-AI/factory"},{name:"claude-code",label:"Claude Code",description:"Claude Code CLI",homepage:"https://www.anthropic.com/claude",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/claude.svg",installHint:"npm install -g @anthropic-ai/claude-code",installUrl:"https://www.anthropic.com/claude-code",setupUrl:"https://claude.ai/"},{name:"amp",label:"Amp",description:"Amp Code CLI",homepage:"https://www.ampcode.com",iconUrl:"https://ampcode.com/amp-mark-color.svg",installHint:"npm install -g @sourcegraph/amp",installUrl:"https://www.ampcode.com"},{name:"hermes",label:"Hermes",description:"Nous Research Hermes Agent CLI",homepage:"https://hermes-agent.nousresearch.com/",iconUrl:"/agents/hermes.png",installHint:"curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash",installUrl:"https://hermes-agent.nousresearch.com/docs/getting-started/installation/",setupUrl:"https://hermes-agent.nousresearch.com/docs/getting-started/installation/"},{name:"opencode",label:"OpenCode",description:"OpenCode CLI",homepage:"https://opencode.ai",iconUrl:null,installHint:"npm install -g opencode-ai",installUrl:"https://opencode.ai"},{name:"pi",label:"Pi",description:"Pi Coding Agent CLI",homepage:"https://pi.dev",iconUrl:"/agents/pi.svg",installHint:"npm install -g @mariozechner/pi-coding-agent",installUrl:"https://www.npmjs.com/package/@mariozechner/pi-coding-agent",setupUrl:"https://pi.dev"},{name:"letta",label:"Letta Code",description:"Letta Code CLI (memory-first agent)",homepage:"https://docs.letta.com/letta-code",iconUrl:"/agents/letta-light.svg",installHint:"npm install -g @letta-ai/letta-code",installUrl:"https://docs.letta.com/letta-code",setupUrl:"https://app.letta.com/"},{name:"openclaw",label:"OpenClaw",description:"OpenClaw gateway-backed chat runtime",homepage:"https://github.com/openclaw/openclaw#readme",iconUrl:null,installHint:"Configure the OpenClaw gateway in backend runtime settings",installUrl:"https://github.com/openclaw/openclaw",setupUrl:"https://github.com/openclaw/openclaw",surfaces:["dispatcher"]},{name:"github-copilot",label:"GitHub Copilot",description:"GitHub Copilot CLI",homepage:"https://docs.github.com/copilot/how-tos/copilot-cli",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/githubcopilot.svg",installHint:"npm install -g @github/copilot",installUrl:"https://docs.github.com/copilot/how-tos/copilot-cli",setupUrl:"https://github.com/settings/copilot"},{name:"cursor-cli",label:"Cursor Agent",description:"Cursor Agent CLI",homepage:"https://www.cursor.com",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/cursor.svg",installHint:"npm install -g cursor-agent"},{name:"ccr",label:"CCR",description:"Claude Code Router",homepage:"https://www.npmjs.com/package/@musistudio/claude-code-router",iconUrl:"https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/claude.svg",installHint:"npm install -g @musistudio/claude-code-router",installUrl:"https://www.npmjs.com/package/@musistudio/claude-code-router"}],o=l.map(e=>e.name),a=new Map(l.map(e=>[(0,i.q)(e.name),e]));function r(e){return a.get((0,i.q)(e))??null}function s(e){let t=r(e);return!t||(t.surfaces?.includes("terminal")??!0)}function c(e){let t=[],n=new Set;for(let l of e){let e=l.trim();if(!e||!s(e))continue;let o=(0,i.q)(e);n.has(o)||(n.add(o),t.push(e))}return t}function u(e,t){let n="string"==typeof e?e.trim():"";if(n&&s(n))return n;let i=t.trim();return i&&s(i)?i:l.find(e=>s(e.name))?.name??"codex"}},88272:(e,t,n)=>{n.d(t,{c0:()=>h,Z3:()=>a,Ik:()=>c,iL:()=>u,YS:()=>d,ZA:()=>m,xb:()=>g,aB:()=>p});var i=n(76196),l=n(5739);function o(e){return"openclaw"===(0,l.q)(e)}function a(){return{catalogModel:"",customModel:"",reasoningEffort:""}}function r(e,t){return t[(0,l.q)(e)]??null}function s(e){if(!e)return[];let t=[],n=new Set;for(let i of Object.values(e.modelsByAccess))if(Array.isArray(i))for(let e of i)!e?.id||n.has(e.id)||(n.add(e.id),t.push(e));return t}function c(e,t,n){if(o(e))return[];let l=r(e,n),a=(0,i.Tk)(e,t),c=l&&a?l.modelsByAccess[a]??[]:[],u=s(l);if(l){let e=[],t=new Set;for(let n of[...c,...u])!n?.id||t.has(n.id)||(t.add(n.id),e.push(n));return e}return(0,i.d8)(e,t)}function u(e,t,n,l){if(o(e))return[];let a=r(e,n),s=(0,i.Tk)(e,t);if(a){if(!a)return[];let e=l?.trim();return e&&a.reasoningOptionsByModel?.[e]?.length?a.reasoningOptionsByModel[e]??[]:s?a.reasoningOptionsByAccess?.[s]??[]:[]}return(0,i.u6)(e,t)}function d(e,t,n,l){if(o(e))return"";let a=r(e,n),s=(0,i.Tk)(e,t);return a?function(e,t,n){if(!e)return null;let i=t?.trim();return i&&e.defaultReasoningByModel?.[i]?e.defaultReasoningByModel[i]??null:n?e.defaultReasoningByAccess?.[n]??null:null}(a,l,s)??"":(0,i.DZ)(e,t)??""}function m(e,t){if(o(e))return"";let n=r(e,t),l=n?.customModelPlaceholder.trim();if(l)return l;let a=(0,i.yM)(e)?.label??"agent";return`Enter exact ${a} model id`}function h(e,t,n,m,h){if(o(e))return a();let g=function(e,t){let n=t?.trim()??"";if(0===n.length)return"";let i=(0,l.q)(e),o=n.toLowerCase();if("gemini"===i&&"gemini-3.1-flash-preview"===o)return"gemini-3-flash-preview";if("cursor-cli"===i){if("gpt-5.3-codex"===o)return"gpt-5";if("gpt-5.3-codex-fast"===o)return"gpt-5-fast";if("gpt-5.3-codex-high"===o)return"gpt-5-high";if("opus"===o)return"opus-4.1"}if("claude-code"===i||"ccr"===i){if("sonnet"===o||"sonnet-4"===o)return"claude-sonnet-4-6";if("opus"===o||"opus-4"===o)return"claude-opus-4-6";if("haiku"===o||"haiku-4"===o||"haiku-4-5"===o)return"claude-haiku-4-5"}return n}(e,m),p=function(e,t){let n=(0,l.q)(e),i=t?.trim().toLowerCase()??"";if(0===i.length)return"";if("claude-code"===n||"ccr"===n)return["minimal","min","off","none","low"].includes(i)?"low":["medium","med"].includes(i)?"medium":"high"===i?"high":["max","xhigh","extra-high","extra_high","extra high"].includes(i)?"max":i;if("github-copilot"===n)return["minimal","min","off","none","low"].includes(i)?"low":["medium","med"].includes(i)?"medium":"high"===i?"high":["max","xhigh","extra-high","extra_high","extra high"].includes(i)?"xhigh":i;if("codex"===n)return["minimal","min","low"].includes(i)?"low":["medium","med"].includes(i)?"medium":"high"===i?"high":["max","xhigh","extra-high","extra_high","extra high"].includes(i)?"xhigh":i;if("droid"===n)return["minimal","min"].includes(i)?"minimal":["medium","med"].includes(i)?"medium":["extra-high","extra_high","extra high"].includes(i)?"xhigh":i;if("opencode"===n)return["minimal","min"].includes(i)?"minimal":["medium","med"].includes(i)?"medium":["xhigh","extra-high","extra_high","extra high"].includes(i)?"max":i;if("pi"===n){if(["minimal","min"].includes(i))return"minimal";if(["medium","med"].includes(i))return"medium";if(["max","xhigh","extra-high","extra_high","extra high"].includes(i))return"xhigh"}return i}(e,h),f=r(e,n),w=c(e,t,n),b=function(e,t,n){if(o(e))return"";let l=r(e,n),a=(0,i.Tk)(e,t);if(l)return(l&&a?l.defaultModelByAccess[a]??null:null)??s(l)[0]?.id??"";return(0,i.O$)(e,t)??""}(e,t,n),x=i=>{let l=u(e,t,n,i);return p.length>0&&l.some(e=>e.id===p)?p:d(e,t,n,i)};if(g.length>0){if(w.some(e=>e.id===g))return{catalogModel:g,customModel:"",reasoningEffort:x(g)};if(null===f)return{catalogModel:b,customModel:g,reasoningEffort:x(g)}}return{catalogModel:b,customModel:"",reasoningEffort:x(b)}}function g(e){let t=e.customModel.trim();if(t.length>0)return t;let n=e.catalogModel.trim();return n.length>0?n:void 0}function p(e){let t=e.reasoningEffort.trim().toLowerCase();return t.length>0?t:void 0}}}]);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79593],{2896:(e,t,r)=>{"use strict";function n({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(54568),r(97509),r(85999),r(12918),r(32106)},5974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=r(34273),a=r(16409),l=r(97102)},6035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(59113).createAsyncLocalStorage)()},6974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(74468)._(r(7620)).default.createContext(null)},23597:(e,t,r)=>{"use strict";function n({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}}),r(61841)},36727:(e,t,r)=>{"use strict";r.r(t),r.d(t,{KeylessCookieSync:()=>a});var n=r(79748),o=r(7620),i=r(38036);function a(e){var t;let a=(null==(t=(0,n.useSelectedLayoutSegments)()[0])?void 0:t.startsWith("/_not-found"))||!1;return(0,o.useEffect)(()=>{i.I&&!a&&r.e(89110).then(r.bind(r,89110)).then(t=>t.syncKeylessConfigAction({...e,returnUrl:window.location.href}))},[a]),e.children}},38036:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=r(24570),o=r(61745);let i=(0,n.b_)()&&!o.ev},41926:(e,t,r)=>{"use strict";r.d(t,{useAPIKeys:()=>n.O4,useAuth:()=>n.As,useClerk:()=>n.ho,useEmailLink:()=>n.ui,useOAuthConsent:()=>n.$U,useOrganization:()=>n.Z5,useOrganizationCreationDefaults:()=>n.OM,useOrganizationList:()=>n.D_,useReverification:()=>n.Wp,useSession:()=>n.wV,useSessionList:()=>n.g7,useSignIn:()=>n.go,useSignUp:()=>n.yC,useUser:()=>n.Jd,useWaitlist:()=>n.jh});var n=r(20217);r(76209)},42925:(e,t,r)=>{"use strict";r.d(t,{default:()=>o.a});var n=r(66446),o=r.n(n)},45836:(e,t,r)=>{e.exports=r(58981)},48477:e=>{e.exports={style:{fontFamily:"'Tomorrow', 'Tomorrow Fallback'",fontWeight:700,fontStyle:"normal"},className:"__className_086f30",variable:"__variable_086f30"}},56909:(e,t,r)=>{"use strict";r.d(t,{mG:()=>l,yC:()=>a});var n=r(47035),o=r(41168),i=r(75367);function a(e,t,r){let n=t.path||(null==r?void 0:r.path);return"path"===(t.routing||(null==r?void 0:r.routing)||"path")?n?{...r,...t,routing:"path"}:i.sb.throw((0,o.kd)(e)):t.path?i.sb.throw((0,o.s7)(e)):{...r,...t,path:void 0}}r(78996),r(96421);var l=n.lJ},57042:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(45836);let o=()=>({pagesRouter:(0,n.useRouter)()})},58981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return i}});let n=r(7620),o=r(6974);function i(){return(0,n.useContext)(o.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},59113:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={bindSnapshot:function(){return s},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return u}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let o=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class i{disable(){throw o}getStore(){}run(){throw o}exit(){throw o}enterWith(){throw o}static bind(e){return e}}let a="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return a?new a:new i}function s(e){return a?a.bind(e):i.bind(e)}function u(){return a?a.snapshot():function(e,...t){return e(...t)}}},61745:(e,t,r)=>{"use strict";let n;r.d(t,{ev:()=>c,tm:()=>u});var o=r(55993),i=r(39741),a=r(76975),l=r(63680);l.env.NEXT_PUBLIC_CLERK_JS_VERSION,l.env.NEXT_PUBLIC_CLERK_JS_URL,l.env.NEXT_PUBLIC_CLERK_UI_URL,l.env.NEXT_PUBLIC_CLERK_UI_VERSION,l.env.CLERK_API_VERSION,l.env.CLERK_SECRET_KEY,l.env.CLERK_MACHINE_SECRET_KEY;let s=l.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY||"";l.env.CLERK_ENCRYPTION_KEY,l.env.CLERK_API_URL||(n=(0,i.u)(s)?.frontendApi,n?.startsWith("clerk.")&&o.i.some(e=>n?.endsWith(e))?o.c:o.o.some(e=>n?.endsWith(e))?o.a:o.d.some(e=>n?.endsWith(e))?o.u:o.c),l.env.NEXT_PUBLIC_CLERK_DOMAIN,l.env.NEXT_PUBLIC_CLERK_PROXY_URL,(0,a.zz)(l.env.NEXT_PUBLIC_CLERK_IS_SATELLITE),l.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL,l.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL;let u={name:"@clerk/nextjs",version:"7.4.1",environment:"production"};(0,a.zz)(l.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),(0,a.zz)(l.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG);let c=(0,a.zz)(l.env.NEXT_PUBLIC_CLERK_KEYLESS_DISABLED)||!1},62520:(e,t,r)=>{"use strict";r.d(t,{APIKeys:()=>n.Lq,ConfigureSSO:()=>n.MS,CreateOrganization:()=>n.ul,GoogleOneTap:()=>n.PQ,OAuthConsent:()=>n.se,OrganizationList:()=>n.oE,OrganizationProfile:()=>c,OrganizationSwitcher:()=>n.NC,PricingTable:()=>n.nm,SignIn:()=>d,SignInButton:()=>n.hZ,SignInWithMetamaskButton:()=>n.M_,SignOutButton:()=>n.ct,SignUp:()=>f,SignUpButton:()=>n.Ny,TaskChooseOrganization:()=>n.i9,TaskResetPassword:()=>n.eN,TaskSetupMFA:()=>n.xy,UserAvatar:()=>n.H8,UserButton:()=>n.uF,UserProfile:()=>u,Waitlist:()=>n.cP});var n=r(20217),o=r(7620),i=r(56909),a=r(24570),l=r(57042);function s(e,t,u=!0){let c=(()=>{let e=o.useRef(),{pagesRouter:t}=(0,l.r)();if(t)if(e.current)return e.current;else return e.current=t.pathname.replace(/\/\[\[\.\.\..*/,""),e.current;let n=r(79748).usePathname,i=r(79748).useParams,a=(n()||"").split("/").filter(Boolean),s=Object.values(i()||{}).filter(e=>Array.isArray(e)).flat(1/0);return e.current||(e.current=`/${a.slice(0,a.length-s.length).join("/")}`),e.current})(),d=(0,i.yC)(e,t,{path:c});return((e,t,r,i=!0)=>{let s=o.useRef(0),{pagesRouter:u}=(0,l.r)(),{session:c,isLoaded:d}=(0,n.wV)();(0,a.Fj)()||o.useEffect(()=>{if(!d||r&&"path"!==r||i&&!c)return;let n=new AbortController,o=()=>{let r=u?`${t}/[[...index]].tsx`:`${t}/[[...rest]]/page.tsx`;throw Error(`
|
|
2
|
-
Clerk: The <${e}/> component is not configured correctly. The most likely reasons for this error are:
|
|
3
|
-
|
|
4
|
-
1. The "${t}" route is not a catch-all route.
|
|
5
|
-
It is recommended to convert this route to a catch-all route, eg: "${r}". Alternatively, you can update the <${e}/> component to use hash-based routing by setting the "routing" prop to "hash".
|
|
6
|
-
|
|
7
|
-
2. The <${e}/> component is mounted in a catch-all route, but all routes under "${t}" are protected by the middleware.
|
|
8
|
-
To resolve this, ensure that the middleware does not protect the catch-all route or any of its children. If you are using the "createRouteMatcher" helper, consider adding "(.*)" to the end of the route pattern, eg: "${t}(.*)". For more information, see: https://clerk.com/docs/reference/nextjs/clerk-middleware#create-route-matcher
|
|
9
|
-
`)};return u?u.pathname.match(/\[\[\.\.\..+]]/)||o():(async()=>{let t;if(s.current++,!(s.current>1)){try{let r=`${window.location.origin}${window.location.pathname}/${e}_clerk_catchall_check_${Date.now()}`;t=await fetch(r,{signal:n.signal})}catch{}(null==t?void 0:t.status)===404&&o()}})(),()=>{s.current>1&&n.abort()}},[d])})(e,c,d.routing,u),d}let u=Object.assign(e=>o.createElement(n.Fv,{...s("UserProfile",e)}),{...n.Fv}),c=Object.assign(e=>o.createElement(n.nC,{...s("OrganizationProfile",e)}),{...n.nC}),d=e=>o.createElement(n.Ls,{...s("SignIn",e,!1)}),f=e=>o.createElement(n.Hx,{...s("SignUp",e,!1)})},66446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(74468)._(r(67926));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(54568),o=r(7620),i=r(23597);function a(e){return{default:e&&"default"in e?e.default:e}}r(2896);let l={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},s=function(e){let t={...l,...e},r=(0,o.lazy)(()=>t.loader().then(a)),s=t.loading;function u(e){let a=s?(0,n.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,u=l?o.Suspense:o.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:[null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(u,{...l?{fallback:a}:{},children:c})}return u.displayName="LoadableComponent",u}},69539:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ClientClerkProvider:()=>U});var n=r(56909),o=r(78996),i=r(42925),a=r(79748),l=r(7620);let s="u">typeof window?l.useLayoutEffect:l.useEffect,u=l.createContext(void 0);u.displayName="ClerkNextOptionsCtx";let c=()=>{let e=l.useContext(u);return null==e?void 0:e.value},d=e=>{let{children:t,options:r}=e;return l.createElement(u.Provider,{value:{value:r}},t)};var f=r(38036),_=r(19646),p=r(76975),v=r(61745),E=r(63680);let h=e=>{var t;let r=e.publishableKey||E.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY||"",n=e.proxyUrl||E.env.NEXT_PUBLIC_CLERK_PROXY_URL||"",o=e.domain||E.env.NEXT_PUBLIC_CLERK_DOMAIN||"";return{...e,publishableKey:r,__internal_clerkJSUrl:e.__internal_clerkJSUrl||E.env.NEXT_PUBLIC_CLERK_JS_URL,__internal_clerkJSVersion:e.__internal_clerkJSVersion||E.env.NEXT_PUBLIC_CLERK_JS_VERSION,__internal_clerkUIUrl:e.__internal_clerkUIUrl||E.env.NEXT_PUBLIC_CLERK_UI_URL,__internal_clerkUIVersion:e.__internal_clerkUIVersion||E.env.NEXT_PUBLIC_CLERK_UI_VERSION,prefetchUI:function(e){if(!1===e||"false"===E.env.NEXT_PUBLIC_CLERK_PREFETCH_UI)return!1}(e.prefetchUI),proxyUrl:n||(0,_.n)({hasDomain:!!o,hasProxyUrl:!!n,publishableKey:r}),domain:o,isSatellite:e.isSatellite||(0,p.zz)(E.env.NEXT_PUBLIC_CLERK_IS_SATELLITE),signInUrl:e.signInUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_IN_URL||"",signUpUrl:e.signUpUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_UP_URL||"",signInForceRedirectUrl:e.signInForceRedirectUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL||"",signUpForceRedirectUrl:e.signUpForceRedirectUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL||"",signInFallbackRedirectUrl:e.signInFallbackRedirectUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL||"",signUpFallbackRedirectUrl:e.signUpFallbackRedirectUrl||E.env.NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL||"",newSubscriptionRedirectUrl:e.newSubscriptionRedirectUrl||E.env.NEXT_PUBLIC_CLERK_CHECKOUT_CONTINUE_URL||"",telemetry:null!=(t=e.telemetry)?t:{disabled:(0,p.zz)(E.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED),debug:(0,p.zz)(E.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG)},sdkMetadata:v.tm,unsafe_disableDevelopmentModeConsoleWarning:(0,p.zz)(E.env.NEXT_PUBLIC_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING)}};var m=r(3102),g=r(20217),b=r(57042);let C=()=>{var e,t;let r=(0,g.ho)(),{pagesRouter:n}=(0,b.r)();return null==(t=r.telemetry)||t.record((0,m.YF)({router:n?"pages":"app",...(null==(e=null==globalThis?void 0:globalThis.next)?void 0:e.version)?{nextjsVersion:globalThis.next.version}:{}})),null};var y=r(82466),w=r(96421);function L(e){let{publishableKey:t,__internal_clerkJSUrl:r,__internal_clerkJSVersion:n,__internal_clerkUIUrl:o,__internal_clerkUIVersion:i,nonce:a,domain:s,proxyUrl:u,prefetchUI:c}=e,d={publishableKey:t,__internal_clerkJSUrl:r,__internal_clerkJSVersion:n,__internal_clerkUIUrl:o,__internal_clerkUIVersion:i,nonce:a,domain:s,proxyUrl:u};return l.createElement(l.Fragment,null,l.createElement("script",{src:(0,w.Vv)(d),"data-clerk-js-script":!0,async:!0,crossOrigin:"anonymous",...(0,w.RC)(d)}),!1!==c&&l.createElement("link",{rel:"preload",href:(0,w.aK)(d),as:"script",crossOrigin:"anonymous",nonce:a}))}function R(){let{publishableKey:e,__internal_clerkJSUrl:t,__internal_clerkJSVersion:r,__internal_clerkUIUrl:n,__internal_clerkUIVersion:o,nonce:i,prefetchUI:a}=c(),{domain:s,proxyUrl:u}=(0,g.ho)();return e?l.createElement(L,{publishableKey:e,__internal_clerkJSUrl:t,__internal_clerkJSVersion:r,__internal_clerkUIUrl:n,__internal_clerkUIVersion:o,nonce:i,domain:s,proxyUrl:u,prefetchUI:a}):null}let T=e=>{var t;return null!=window.__clerk_internal_navigations||(window.__clerk_internal_navigations={}),null!=(t=window.__clerk_internal_navigations)[e]||(t[e]={}),window.__clerk_internal_navigations[e]},I=e=>{let{windowNav:t,routerNav:r,name:n}=e,[o,i]=(0,l.useTransition)();t&&(T(n).fun=(e,o)=>{var a,l;let s=T(n);return(null!=(l=null==(a=s.promisesBuffer)?void 0:a.length)?l:0)>0&&s.pendingDestination===e?new Promise(e=>{null!=s.promisesBuffer||(s.promisesBuffer=[]),s.promisesBuffer.push(e)}):(s.pendingDestination=e,new Promise(n=>{null!=s.promisesBuffer||(s.promisesBuffer=[]),s.promisesBuffer.push(n),i(()=>{var n;if((null==(n=null==o?void 0:o.__internal_metadata)?void 0:n.navigationType)==="internal")t(null,"",e);else r(e)})}))});let a=()=>{var e;let t=T(n);null==(e=t.promisesBuffer)||e.forEach(e=>e()),t.promisesBuffer=[],t.pendingDestination=void 0};return(0,l.useEffect)(()=>(a(),a),[]),(0,l.useEffect)(()=>{o||a()},[o]),(0,l.useCallback)((e,t)=>T(n).fun(e,t),[])},P=(0,i.default)(()=>r.e(34443).then(r.bind(r,34443)).then(e=>e.KeylessCreatorOrReader),{loadableGenerated:{webpack:()=>[34443]}}),S=e=>{let t,r,{__internal_invokeMiddlewareOnAuthStateChange:o=!0,__internal_scriptsSlot:i,children:u}=e,c=(0,a.useRouter)(),f=(t=(0,a.useRouter)(),I({windowNav:"u">typeof window?window.history.pushState.bind(window.history):void 0,routerNav:t.push.bind(t),name:"push"})),_=(r=(0,a.useRouter)(),I({windowNav:"u">typeof window?window.history.replaceState.bind(window.history):void 0,routerNav:r.replace.bind(r),name:"replace"}));s(()=>{window.__internal_onBeforeSetActive=e=>new Promise(t=>{var r;let n=(null==(r=null==window?void 0:window.next)?void 0:r.version)||"";(n.startsWith("15")||n.startsWith("16"))&&"sign-out"===e?t():(0,y.y)().then(()=>t())}),window.__internal_onAfterSetActive=()=>{if(o)return c.refresh()}},[]);let p=h({...e,routerPush:f,routerReplace:_});return l.createElement(d,{options:p},l.createElement(n.mG,{...p},l.createElement(C,null),null!=i?i:l.createElement(R,null),u))},U=e=>{let{children:t,disableKeyless:r=!1,...n}=e,i=h(n).publishableKey;return c()?n.initialState?l.createElement(o.R0,{initialState:n.initialState},t):t:i||!f.I||r?l.createElement(S,{...n},t):l.createElement(P,null,l.createElement(S,{...n},t))}},76940:(e,t,r)=>{"use strict";r.d(t,{AuthenticateWithRedirectCallback:()=>n.B$,ClerkDegraded:()=>n.wF,ClerkFailed:()=>n.lT,ClerkLoaded:()=>n.z0,ClerkLoading:()=>n.A0,RedirectToCreateOrganization:()=>n.rm,RedirectToOrganizationProfile:()=>n.m2,RedirectToSignIn:()=>n.W5,RedirectToSignUp:()=>n.mO,RedirectToTasks:()=>n.OL,RedirectToUserProfile:()=>n.eG,UNSAFE_PortalProvider:()=>n.N$});var n=r(20217);r(56909)},76975:(e,t,r)=>{"use strict";r.d(t,{zz:()=>n.o});var n=r(80650)},79584:e=>{e.exports={style:{fontFamily:"'IBM Plex Sans', 'IBM Plex Sans Fallback'",fontStyle:"normal"},className:"__className_1bc20f",variable:"__variable_1bc20f"}},84978:e=>{e.exports={style:{fontFamily:"'IBM Plex Mono', 'IBM Plex Mono Fallback'",fontStyle:"normal"},className:"__className_46fe82",variable:"__variable_46fe82"}},85999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(6035)},91745:e=>{e.exports={style:{fontFamily:"'Orbitron', 'Orbitron Fallback'",fontStyle:"normal"},className:"__className_be41e9",variable:"__variable_be41e9"}},93603:(e,t,r)=>{"use strict";r.d(t,{Analytics:()=>_});var n=r(7620),o=r(79748),i=r(63680);function a(){return"u">typeof window}function l(){return"production"}function s(){return"development"===((a()?window.vam:l())||"production")}function u(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function c(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function d(e){return(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,n.useEffect)(()=>{!function(e={debug:!0},t){var r;if(!a())return;let{beforeSend:n,src:o,dataset:i}=function(e,t){var r,n;let o=e;if(t)try{o={...null==(r=JSON.parse(t))?void 0:r.analytics,...e}}catch{}!function(e="auto"){if("auto"===e){window.vam=l();return}window.vam=e}(o.mode);let i={sdkn:"@vercel/analytics"+(o.framework?`/${o.framework}`:""),sdkv:"2.0.1"};return o.disableAutoTrack&&(i.disableAutoTrack="1"),o.viewEndpoint&&(i.viewEndpoint=c(o.viewEndpoint)),o.eventEndpoint&&(i.eventEndpoint=c(o.eventEndpoint)),o.sessionEndpoint&&(i.sessionEndpoint=c(o.sessionEndpoint)),s()&&!1===o.debug&&(i.debug="false"),o.dsn&&(i.dsn=o.dsn),o.endpoint?i.endpoint=o.endpoint:o.basePath&&(i.endpoint=c(`${o.basePath}/insights`)),{beforeSend:o.beforeSend,src:(n=o).scriptSrc?c(n.scriptSrc):s()?"https://va.vercel-scripts.com/v1/script.debug.js":n.basePath?c(`${n.basePath}/insights/script.js`):"/_vercel/insights/script.js",dataset:i}}(e,t);if(window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)}),n&&(null==(r=window.va)||r.call(window,"beforeSend",n)),document.head.querySelector(`script[src*="${o}"]`))return;let u=document.createElement("script");for(let[e,t]of(u.src=o,Object.entries(i)))u.dataset[e]=t;u.defer=!0,u.onerror=()=>{let e=s()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${o}. ${e}`)},document.head.appendChild(u)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==i&&void 0!==i.env)return i.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e},e.configString??function(){if(void 0!==i&&void 0!==i.env)return i.env.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}())},[]),(0,n.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function f(e){let t,r,a,{route:l,path:s}=(t=(0,o.useParams)(),r=(0,o.useSearchParams)(),a=(0,o.usePathname)(),t?{route:function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=u(n);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=u(n.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch{return e}}(a,Object.keys(t).length?t:Object.fromEntries(r.entries())),path:a}:{route:null,path:a});return n.createElement(d,{path:s,route:l,...e,basePath:function(){if(void 0!==i&&void 0!==i.env)return i.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),configString:function(){if(void 0!==i&&void 0!==i.env)return i.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIG}(),framework:"next"})}function _(e){return n.createElement(n.Suspense,{fallback:null},n.createElement(f,{...e}))}},97257:(e,t,r)=>{"use strict";let n;r.d(t,{UC:()=>H,ZL:()=>Y,Kq:()=>V,bL:()=>W,l9:()=>G});var o=r(7620),i=r(37188),a=r(33670),l=r(55556),s=r(64159),u=r(30586),c=r(38553),d=r(25249),f=r(98386),_=r(59947),p=r(54568),v=Symbol("radix.slottable"),E=r(3198),h=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),m=o.forwardRef((e,t)=>(0,p.jsx)(_.sG.span,{...e,ref:t,style:{...h,...e.style}}));m.displayName="VisuallyHidden";var[g,b]=(0,l.A)("Tooltip",[c.Bk]),C=(0,c.Bk)(),y="TooltipProvider",w="tooltip.open",[L,R]=g(y),T=e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,l=o.useRef(!0),s=o.useRef(!1),u=o.useRef(0);return o.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,p.jsx)(L,{scope:t,isOpenDelayedRef:l,delayDuration:r,onOpen:o.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:o.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:o.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};T.displayName=y;var I="Tooltip",[P,S]=g(I),U=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:a,disableHoverableContent:l,delayDuration:s}=e,d=R(I,e.__scopeTooltip),f=C(t),[_,v]=o.useState(null),h=(0,u.B)(),m=o.useRef(0),g=l??d.disableHoverableContent,b=s??d.delayDuration,y=o.useRef(!1),[L,T]=(0,E.i)({prop:n,defaultProp:i??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(w))):d.onClose(),a?.(e)},caller:I}),S=o.useMemo(()=>L?y.current?"delayed-open":"instant-open":"closed",[L]),U=o.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,T(!0)},[T]),x=o.useCallback(()=>{window.clearTimeout(m.current),m.current=0,T(!1)},[T]),N=o.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,T(!0),m.current=0},b)},[b,T]);return o.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,p.jsx)(c.bL,{...f,children:(0,p.jsx)(P,{scope:t,contentId:h,open:L,stateAttribute:S,trigger:_,onTriggerChange:v,onTriggerEnter:o.useCallback(()=>{d.isOpenDelayedRef.current?N():U()},[d.isOpenDelayedRef,N,U]),onTriggerLeave:o.useCallback(()=>{g?x():(window.clearTimeout(m.current),m.current=0)},[x,g]),onOpen:U,onClose:x,disableHoverableContent:g,children:r})})};U.displayName=I;var x="TooltipTrigger",N=o.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,l=S(x,r),s=R(x,r),u=C(r),d=o.useRef(null),f=(0,a.s)(t,d,l.onTriggerChange),v=o.useRef(!1),E=o.useRef(!1),h=o.useCallback(()=>v.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,p.jsx)(c.Mz,{asChild:!0,...u,children:(0,p.jsx)(_.sG.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...n,ref:f,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(E.current||s.isPointerInTransitRef.current||(l.onTriggerEnter(),E.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{l.onTriggerLeave(),E.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{l.open&&l.onClose(),v.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{v.current||l.onOpen()}),onBlur:(0,i.mK)(e.onBlur,l.onClose),onClick:(0,i.mK)(e.onClick,l.onClose)})})});N.displayName=x;var O="TooltipPortal",[k,B]=g(O,{forceMount:void 0}),j=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=S(O,t);return(0,p.jsx)(k,{scope:t,forceMount:r,children:(0,p.jsx)(f.C,{present:r||i.open,children:(0,p.jsx)(d.Z,{asChild:!0,container:o,children:n})})})};j.displayName=O;var A="TooltipContent",K=o.forwardRef((e,t)=>{let r=B(A,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=S(A,e.__scopeTooltip);return(0,p.jsx)(f.C,{present:n||a.open,children:a.disableHoverableContent?(0,p.jsx)(z,{side:o,...i,ref:t}):(0,p.jsx)(M,{side:o,...i,ref:t})})}),M=o.forwardRef((e,t)=>{let r=S(A,e.__scopeTooltip),n=R(A,e.__scopeTooltip),i=o.useRef(null),l=(0,a.s)(t,i),[s,u]=o.useState(null),{trigger:c,onClose:d}=r,f=i.current,{onPointerInTransitChange:_}=n,v=o.useCallback(()=>{u(null),_(!1)},[_]),E=o.useCallback((e,t)=>{let r,n=e.currentTarget,o={x:e.clientX,y:e.clientY},i=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(o,n.getBoundingClientRect());u(((r=[...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(o,i),...function(e){let{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(r))),_(!0)},[_]);return o.useEffect(()=>()=>v(),[v]),o.useEffect(()=>{if(c&&f){let e=e=>E(e,f),t=e=>E(e,c);return c.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[c,f,E,v]),o.useEffect(()=>{if(s){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=c?.contains(t)||f?.contains(t),o=!function(e,t){let{x:r,y:n}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let a=t[e],l=t[i],s=a.x,u=a.y,c=l.x,d=l.y;u>n!=d>n&&r<(c-s)*(n-u)/(d-u)+s&&(o=!o)}return o}(r,s);n?v():o&&(v(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,f,s,d,v]),(0,p.jsx)(z,{...e,ref:l})}),[F,X]=g(I,{isInside:!1}),D=((n=({children:e})=>(0,p.jsx)(p.Fragment,{children:e})).displayName="TooltipContent.Slottable",n.__radixId=v,n),z=o.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,d=S(A,r),f=C(r),{onClose:_}=d;return o.useEffect(()=>(document.addEventListener(w,_),()=>document.removeEventListener(w,_)),[_]),o.useEffect(()=>{if(d.trigger){let e=e=>{let t=e.target;t?.contains(d.trigger)&&_()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,_]),(0,p.jsx)(s.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:_,children:(0,p.jsxs)(c.UC,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(D,{children:n}),(0,p.jsx)(F,{scope:r,isInside:!0,children:(0,p.jsx)(m,{id:d.contentId,role:"tooltip",children:i||n})})]})})});K.displayName=A;var $="TooltipArrow";o.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=C(r);return X($,r).isInside?null:(0,p.jsx)(c.i3,{...o,...n,ref:t})}).displayName=$;var V=T,W=U,G=N,Y=j,H=K}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89110],{27893:(e,a,c)=>{c.d(a,{a:()=>d});var r=c(5974);let d=(0,r.createServerReference)("00aa412261f47885448b5767d07895e1d7ca07e1e2",r.callServer,void 0,r.findSourceMapURL,"createOrReadKeylessAction")},89110:(e,a,c)=>{c.r(a),c.d(a,{createOrReadKeylessAction:()=>r.a,deleteKeylessAction:()=>s,syncKeylessConfigAction:()=>l});var r=c(27893),d=c(5974);let s=(0,d.createServerReference)("00ac202ad67da5d07c89a91dae411ed731ff200fe1",d.callServer,void 0,d.findSourceMapURL,"deleteKeylessAction"),l=(0,d.createServerReference)("408f5d6560194a3b1de6e33472bd6d5b244a250ca8",d.callServer,void 0,d.findSourceMapURL,"syncKeylessConfigAction")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{46916:(e,r,t)=>{"use strict";t.d(r,{cn:()=>s});var o=t(9917),n=t(2809);function s(...e){return(0,n.QP)((0,o.$)(e))}},48204:(e,r,t)=>{"use strict";t.d(r,{ThemeProvider:()=>d});var o=t(54568),n=t(7620);let s=(0,n.createContext)({theme:"dark",toggleTheme:()=>{}});function i(e){let r=document.documentElement;r.classList.remove("dark","light"),r.classList.add(e)}function d({children:e}){let[r,t]=(0,n.useState)("dark");(0,n.useEffect)(()=>{let e=localStorage.getItem("conductor-theme");if("light"===e||"dark"===e){t(e),i(e);return}i("dark")},[]);let a=(0,n.useCallback)(()=>{t(e=>{let r="dark"===e?"light":"dark";return localStorage.setItem("conductor-theme",r),i(r),r})},[]);return(0,o.jsx)(s.Provider,{value:{theme:r,toggleTheme:a},children:e})}},65689:(e,r,t)=>{Promise.resolve().then(t.bind(t,69539)),Promise.resolve().then(t.bind(t,36727)),Promise.resolve().then(t.bind(t,76940)),Promise.resolve().then(t.bind(t,41926)),Promise.resolve().then(t.bind(t,62520)),Promise.resolve().then(t.bind(t,93603)),Promise.resolve().then(t.t.bind(t,48477,23)),Promise.resolve().then(t.t.bind(t,91745,23)),Promise.resolve().then(t.t.bind(t,79584,23)),Promise.resolve().then(t.t.bind(t,84978,23)),Promise.resolve().then(t.t.bind(t,74471,23)),Promise.resolve().then(t.bind(t,48204)),Promise.resolve().then(t.bind(t,92690))},74471:()=>{},82466:(e,r,t)=>{"use strict";t.d(r,{y:()=>n});var o=t(5974);let n=(0,o.createServerReference)("00efd7bddbd0903244cc59cd35fc491d4c40156af4",o.callServer,void 0,o.findSourceMapURL,"invalidateCacheAction")},92690:(e,r,t)=>{"use strict";t.d(r,{TooltipProvider:()=>d});var o=t(54568),n=t(97257),s=t(7620),i=t(46916);let d=n.Kq;n.bL,n.l9,(0,s.forwardRef)(({className:e,sideOffset:r=8,...t},s)=>(0,o.jsx)(n.ZL,{children:(0,o.jsx)(n.UC,{ref:s,sideOffset:r,className:(0,i.cn)("z-50 rounded-[var(--radius-xs)] border border-[var(--border-strong)] bg-[var(--bg-panel)] px-2 py-1.5","text-[11px] text-[var(--text-normal)] shadow-[var(--shadow-soft)]","animate-in fade-in-0 zoom-in-95",e),...t})})).displayName="TooltipContent"}},e=>{e.O(0,[49271,89306,63357,20217,33051,79593,587,61968,77358],()=>e(e.s=65689)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58974],{12529:(e,t,r)=>{Promise.resolve().then(r.bind(r,86660))},51164:(e,t,r)=>{"use strict";r.d(t,{v:()=>c});var a=r(76196);let n=["pro","max","api"],s=["chatgpt","api"],l=["default"],i=["oauth","api"],o=["oauth","api"];function d(e,t,r){return"string"==typeof e&&t.includes(e)?e:r}function c(e){let t=!e||"object"!=typeof e||Array.isArray(e)?{}:{...e},r=(0,a.Zp)();return{amp:d(t.amp,l,r.amp),claudeCode:d(t.claudeCode,n,r.claudeCode),codex:d(t.codex,s,r.codex),cursorCli:d(t.cursorCli,l,r.cursorCli),droid:d(t.droid,l,r.droid),gemini:d(t.gemini,i,r.gemini),githubCopilot:d(t.githubCopilot,l,r.githubCopilot),opencode:d(t.opencode,l,r.opencode),pi:d(t.pi,l,r.pi),qwenCode:d(t.qwenCode,o,r.qwenCode),ccr:d(t.ccr,l,r.ccr)}}},53989:(e,t,r)=>{"use strict";function a(e){return e?.installed?e.ready?"CLI ready":!1===e.configured?"Auth needed":"Setup needed":"Install needed"}function n(e){let t=e?.trim();return t?`Access: ${t}`:null}r.d(t,{f:()=>a,y:()=>n})},85905:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var a=r(31404);function n(e){return e&&"object"==typeof e?e:null}async function s({files:e,projectId:t,taskRef:r,bridgeId:l,preferAbsolute:i=!0}){if(!e.length)return[];let o=t.trim();if(!o)throw Error("Project id is required to upload attachments");let d=new FormData;d.append("projectId",o);let c=r?.trim();for(let t of(c&&d.append("taskRef",c),e))d.append("files",t);let x=await fetch((0,a.S)("/api/attachments",l),{method:"POST",body:d}),p=await x.json().catch(()=>null);if(!x.ok){let t=1===e.length?e[0]?.name??"attachment":`${e.length} attachments`;throw Error(p?.error??`Failed to upload ${t}`)}let u=(Array.isArray(p?.files)?p.files:p?[p]:[]).map(e=>(function(e,t){let r=n(e);if(!r)return null;let a=n(r.attachment);for(let e of t?[r.absolutePath,r.path,r.filePath,a?.absolutePath,a?.path,a?.filePath]:[r.path,r.absolutePath,r.filePath,a?.path,a?.absolutePath,a?.filePath])if("string"==typeof e&&e.trim().length>0)return e.trim();return null})(e,i)).filter(e=>!!e);if(0===u.length)throw Error("Attachment upload succeeded but did not return a usable file path");return u}},86660:(e,t,r)=>{"use strict";r.d(t,{default:()=>ev});var a=r(54568),n=r(42925),s=r(79748),l=r(7620),i=r(96869);r(76196);var o=r(52353),d=r(20487),c=r(50549),x=r(57917),p=r(21048),u=r(55341),m=r(30824),h=r(34737),v=r(20670),b=r(8008),f=r(58299),g=r(36645),j=r(84736),k=r(7086),w=r(54299),y=r(34041),N=r(34309),S=r(68476),A=r(20732),C=r(45894),I=r(5739),E=r(33866),M=r(35821),$=r(95106),P=r(53649),L=r(86011),O=r(22153),B=r(46012),U=r(862),_=r(12060),q=r(63582),W=r(86181),F=r(72410),D=r(85905),R=r(31404),V=r(84527),T=r(15115),z=r(83770),G=r(10926);function H(e){return e.map(e=>(0,G.C0)(e)).filter(e=>null!==e)}var Z=r(67506),J=r(76050),X=r(53989),K=r(51164),Q=r(88272);let Y="claude-code",ee="conductor-board-dispatcher-panel-width";function et(e){let t=e?.trim();return t&&t.length>0?t:null}function er(e,t){return Math.min(Math.min(720,Math.max(320,Math.floor(.55*(Number.isFinite(t)&&t>0?t:720)))),Math.max(320,Math.round(e)))}let ea=(0,n.default)(()=>Promise.all([r.e(35493),r.e(35863)]).then(r.bind(r,35493)).then(e=>e.SessionDetail),{loadableGenerated:{webpack:()=>[35493]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading session..."})}),en=(0,n.default)(()=>Promise.all([r.e(29450),r.e(79167)]).then(r.bind(r,29450)).then(e=>e.WorkspaceSidebarPanel),{loadableGenerated:{webpack:()=>[29450]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading workspace panel..."})}),es=(0,n.default)(()=>r.e(66173).then(r.bind(r,66173)).then(e=>e.WorkspaceOverview),{loadableGenerated:{webpack:()=>[66173]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading workspace..."})}),el=(0,n.default)(()=>r.e(79739).then(r.bind(r,79739)).then(e=>e.WorkspaceKanban),{loadableGenerated:{webpack:()=>[79739]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading board..."})}),ei=(0,n.default)(()=>Promise.all([r.e(39526),r.e(70232),r.e(24607),r.e(58607)]).then(r.bind(r,44838)).then(e=>e.ProjectDispatcherPanel),{loadableGenerated:{webpack:()=>[44838]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading dispatcher..."})}),eo=(0,n.default)(()=>Promise.all([r.e(77401),r.e(39526),r.e(70232),r.e(90694),r.e(81132)]).then(r.bind(r,81132)).then(e=>e.ProjectNotesWorkspace),{loadableGenerated:{webpack:()=>[81132]},loading:()=>(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[13px] text-[var(--vk-text-muted)]",children:"Loading notes workspace..."})}),ed=(0,n.default)(()=>Promise.all([r.e(53470),r.e(20217),r.e(56817)]).then(r.bind(r,56817)).then(e=>e.NewWorkspaceDialog),{loadableGenerated:{webpack:()=>[56817]},loading:()=>null}),ec=(0,n.default)(()=>Promise.all([r.e(53470),r.e(20217),r.e(56817)]).then(r.bind(r,56817)).then(e=>e.SettingsDialog),{loadableGenerated:{webpack:()=>[56817]},loading:()=>null});function ex(e){let t=(0,E.h7)(e);return t?.label?t.label:e.split(/[-_\s]+/g).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(" ")}function ep(e){return e.issueId?.trim()||e.taskRef?.trim()||e.id}function eu(e){let[t]=e.split(" - ");return(t??e).trim()}function em(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:{...e}}function eh(e,t){let r=em(e),a=em(r.notifications),n=a.soundFile,s="string"==typeof r.codingAgent&&r.codingAgent.trim().length>0?r.codingAgent.trim():t,l=(0,E.a6)(s,t),i="string"==typeof r.ide&&r.ide.trim().length>0?r.ide.trim():"vscode",o="string"==typeof r.markdownEditor&&r.markdownEditor.trim().length>0?r.markdownEditor.trim():"obsidian",d="string"==typeof r.markdownEditorPath?r.markdownEditorPath.trim():"",c=Array.isArray(r.filesystemBrowseRoots)?r.filesystemBrowseRoots.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(Boolean):[];return{onboardingAcknowledged:!0===r.onboardingAcknowledged,codingAgent:l,ide:i,markdownEditor:o,markdownEditorPath:d,filesystemBrowseRoots:c,modelAccess:(0,K.v)(r.modelAccess),notifications:{soundEnabled:!1!==a.soundEnabled,soundFile:null===n?null:"string"==typeof n&&n.trim().length>0?n.trim():"abstract-sound-4"}}}function ev({requiresPairedDeviceScope:e=!1}){let t=(0,s.useRouter)(),r=(0,s.usePathname)(),n=(0,s.useSearchParams)(),i=(0,l.useMemo)(()=>et(n.get("project")),[n]),o=(0,l.useMemo)(()=>et(n.get("session")),[n]),d=(0,l.useMemo)(()=>{var e;return"board"===(e=n.get("view"))?"board":"notes"===e?"notes":"direct"},[n]),c=(0,l.useMemo)(()=>et(n.get("bridge")),[n]),[x,p]=(0,l.useState)(c??""),h=(0,G.C0)(x),v=(0,l.useMemo)(()=>(0,G.DW)(o)?.bridgeId??null,[o]),j=c??v,k=h??v,[w,y]=(0,l.useState)([]),[N,S]=(0,l.useState)("loading"),[A,C]=(0,l.useState)(null),F=!!(0,Z.y)()&&null===A,D=(0,l.useMemo)(()=>w.filter(e=>e.connected),[w]),X=(0,l.useMemo)(()=>D.map(e=>e.bridgeId),[D]),ep=(0,l.useMemo)(()=>(function({requiresPairedDeviceScope:e,effectiveBridgeId:t,connectedBridgeIds:r,bridgeInventoryStatus:a}){if(!e)return!1;let n=(0,G.C0)(t);return!!n&&("loading"===a||"ready"===a&&!H(r).includes(n))})({requiresPairedDeviceScope:e,effectiveBridgeId:k,connectedBridgeIds:X,bridgeInventoryStatus:N}),[N,X,k,e]);(0,l.useMemo)(()=>(function({requiresPairedDeviceScope:e,effectiveBridgeId:t,connectedBridgeIds:r,bridgeInventoryStatus:a}){if(!e)return!0;let n=(0,G.C0)(t);return!!n&&"ready"===a&&H(r).includes(n)})({requiresPairedDeviceScope:e,effectiveBridgeId:k,connectedBridgeIds:X,bridgeInventoryStatus:N}),[N,X,k,e]);let eu=(0,l.useMemo)(()=>!e||!!k,[k,e]),{projects:em,loading:ef,error:eg,refresh:ej}=(0,P.U)(k,{enabled:eu}),{agents:ek}=(0,O._)(k,{enabled:eu}),{mobileSidebarOpen:ew,desktopSidebarOpen:ey,toggleSidebar:eN,closeSidebarOnMobile:eS,syncSidebarForViewport:eA}=(0,B.T)({initialDesktopOpen:!1}),eC=ew||ey,eI=!o||eC,{sessions:eE,loading:eM,error:e$,refresh:eP}=(0,$.t)(i,{enabled:eI&&eu,bridgeId:k}),[eL,eO]=(0,l.useState)(""),[eB,eU]=(0,l.useState)(""),[e_,eq]=(0,l.useState)((0,Q.Z3)()),[eW,eF]=(0,l.useState)(!1),[eD,eR]=(0,l.useState)(null),[eV,eT]=(0,l.useState)(null),[ez,eG]=(0,l.useState)(!1),[eH,eZ]=(0,l.useState)(!1),[eJ,eX]=(0,l.useState)(null),[eK,eQ]=(0,l.useState)(null),[eY,e0]=(0,l.useState)(!0),[e1,e3]=(0,l.useState)(!1),[e4,e2]=(0,l.useState)(null),[e5,e6]=(0,l.useState)(!1),[e7,e9]=(0,l.useState)(!1),[e8,te]=(0,l.useState)(()=>o?[o]:[]),[tt,tr]=(0,l.useState)(!1),[ta,tn]=(0,l.useState)(!1),[ts,tl]=(0,l.useState)(()=>o?"chat":"board"),[ti,to]=(0,l.useState)(!1),[td,tc]=(0,l.useState)(405),[tx,tp]=(0,l.useState)(!1),tu=(0,l.useRef)(null),tm=(0,l.useRef)(i);(0,l.useEffect)(()=>{let e="function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null,t=()=>{tr((0,W.k$)())};return t(),window.addEventListener("resize",t),e?.addEventListener?.("change",t),()=>{window.removeEventListener("resize",t),e?.removeEventListener?.("change",t)}},[]),(0,l.useEffect)(()=>{let e="function"==typeof window.matchMedia?window.matchMedia("(min-width: 1280px)"):null,t=()=>{tn(e?.matches??window.innerWidth>=1280)};return t(),window.addEventListener("resize",t),e?.addEventListener?.("change",t),()=>{window.removeEventListener("resize",t),e?.removeEventListener?.("change",t)}},[]),(0,l.useEffect)(()=>{if("board"!==d||null===i){tm.current=i,tl("board");return}let e=tm.current!==i;(tm.current=i,o)?tl("chat"):e&&tl("board")},[i,o,d]),(0,l.useEffect)(()=>{try{let e=window.localStorage.getItem(ee),t=e?Number.parseInt(e,10):NaN;Number.isFinite(t)&&tc(er(t,window.innerWidth))}catch{}let e=()=>{tc(e=>er(e,window.innerWidth))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,l.useEffect)(()=>{if(!tx)return;let e=e=>{let t=window.innerWidth;tc(er(t-e.clientX,t))},t=()=>{tp(!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(ee,String(td))}catch{}}},[tx,td]),(0,l.useEffect)(()=>{if(!F){y([]),S("ready"),e&&t.replace("/bridge/connect");return}let r=!1,a=window.innerWidth<768,n=ep?a?8e3:4e3:a?3e4:15e3;async function s(){try{let e=await fetch("/api/bridge/devices",{cache:"no-store"}),t=await e.json().catch(()=>null);if(!e.ok){if((0,z.Xt)(t?.error)){r||(C(t?.error??null),y([]),S("ready"));return}throw Error(`Failed to fetch bridges: ${e.status}`)}r||(C(null),y((0,T.oH)(t?.devices).map(e=>({bridgeId:e.device_id,hostname:e.last_status?.hostname??e.hostname,os:`${e.last_status?.os??`${e.os}/${e.arch}`}${(0,T.wj)(e.last_status?.version)}`,capabilities:[],connected:e.connected,status:e.connected?"connected":"offline",connectedAt:"",lastSeenAt:""}))),S("ready"))}catch{r||(y([]),S("error"))}}s();let l=window.setInterval(()=>{s()},n);return()=>{r=!0,window.clearInterval(l)}},[F,ep,e,t]),(0,l.useEffect)(()=>{let t=function({requiresPairedDeviceScope:e,requestedBridgeId:t,selectedBridgeId:r,connectedBridgeIds:a}){let n=(0,G.C0)(t),s=(0,G.C0)(r),l=H(a);return e?n||(0===l.length?"":s&&l.includes(s)?s:l[0]??""):s&&l.includes(s)?s:""}({requiresPairedDeviceScope:e,requestedBridgeId:j,selectedBridgeId:x,connectedBridgeIds:X});t!==x&&p(t)},[X,j,e,x]),(0,l.useEffect)(()=>{!e||k||"ready"!==N||D.length>0||t.replace("/bridge/connect")},[N,D.length,k,e,t]),(0,l.useEffect)(()=>{p(c??"")},[c]);let th=(0,l.useMemo)(()=>new Map(eE.map(e=>[e.id,e])),[eE]),{session:tv,loading:tb,error:tf}=(0,M.w)(o,null,{enabled:!!o&&eu,bridgeId:k}),tg=eD??eg??e$??tf??e4,tj=(0,l.useMemo)(()=>{let e=new Map;for(let t of eE){let r=e.get(t.projectId);r?r.push(t):e.set(t.projectId,[t])}return e},[eE]),tk=(0,l.useCallback)((e,a="push")=>{let s=new URLSearchParams(n.toString()),l=(e,t)=>{let r="string"==typeof t?t.trim():"";r.length>0?s.set(e,r):s.delete(e)};"projectId"in e&&l("project",e.projectId),"sessionId"in e&&l("session",e.sessionId),"workspaceView"in e&&("board"===e.workspaceView?s.set("view","board"):"notes"===e.workspaceView?s.set("view","notes"):s.delete("view")),"tab"in e&&(e.tab&&"dispatcher"!==e.tab?s.set("tab",e.tab):s.delete("tab")),"bridgeId"in e&&l("bridge",e.bridgeId),s.has("project")||s.delete("view"),s.has("session")||s.delete("tab");let i=s.toString(),o=i.length>0?`${r}?${i}`:r;"replace"===a?t.replace(o,{scroll:!1}):t.push(o,{scroll:!1})},[r,t,n]);(0,l.useEffect)(()=>{let e=(0,G.C0)(x);(c??null)!==e&&tk({bridgeId:e},"replace")},[c,tk,x]),(0,l.useEffect)(()=>{if(!ef&&!eg){if(0===em.length){null!==i&&tk({projectId:null,workspaceView:null},"replace");return}null===i||em.some(e=>e.id===i)||tk({projectId:o?null:em[0]?.id??null,workspaceView:o?null:d},"replace")}},[eg,ef,tk,em,i,o,d]),(0,l.useEffect)(()=>{if(o){if(eI){if(eM||e$)return;eE.some(e=>e.id===o)||tk({sessionId:null,tab:null},"replace");return}!tb&&(tv||tk({sessionId:null,tab:null},"replace"))}},[eE,tk,eI,o,tb,tv,e$,eM]),(0,l.useEffect)(()=>{o?te(e=>[o,...e.filter(e=>e!==o)].slice(0,1)):te([])},[o]),(0,l.useEffect)(()=>{o&&tu.current&&tu.current!==o&&(tu.current=null)},[o]),(0,l.useEffect)(()=>{o&&eI&&!eM&&!e$&&te(e=>e.filter(e=>e===o||th.has(e)))},[eI,o,th,e$,eM]);let tw=(0,l.useMemo)(()=>tv,[tv]),ty=(0,l.useMemo)(()=>em.find(e=>e.id===i)??null,[em,i]),tN=(0,l.useMemo)(()=>i?tj.get(i)??[]:[],[i,tj]),tS=(0,l.useMemo)(()=>tw??(o?th.get(o)??null:null),[tw,o,th]),tA=(0,l.useMemo)(()=>{let e=n.get("tab");return"overview"!==e&&"preview"!==e&&"diff"!==e&&"dispatcher"!==e&&"terminal"===(0,J.tK)(tS)},[tS,n]),tC=!!o&&tA&&tt,tI=(0,l.useMemo)(()=>ty&&("board"===d||"notes"===d)?[ty.id,ty.defaultBranch||"main"].filter(Boolean).join(" \xb7 "):tw?[tw.projectId,tw.branch].filter(Boolean).join(" \xb7 "):ty?[ty.id,ty.defaultBranch||"main"].filter(Boolean).join(" \xb7 "):"All Projects",[ty,tw,d]),tE=(0,l.useMemo)(()=>k?w.find(e=>e.bridgeId===k)??null:null,[w,k]),tM=tE?`Device \xb7 ${tE.hostname}`:ep?"Device \xb7 Reconnecting":e?"Scope \xb7 Paired device required":"Scope \xb7 Local backend",t$=tE?`Showing projects and sessions from ${tE.hostname}.`:ep?"Waiting for the selected laptop to reconnect before loading dashboard data.":e?"Hosted dashboard access must target a connected laptop.":"Showing projects and sessions from the local backend because no paired laptop is selected.",tP=tE?"border-[rgba(24,197,143,0.35)] bg-[rgba(24,197,143,0.12)] text-[var(--vk-green)]":ep?"border-[color:color-mix(in_srgb,var(--vk-accent)_30%,transparent)] bg-[color:color-mix(in_srgb,var(--vk-accent)_12%,transparent)] text-[var(--vk-accent)]":e?"border-[rgba(255,143,122,0.24)] bg-[rgba(255,143,122,0.08)] text-[var(--vk-red)]":"border-[var(--vk-border)] bg-[var(--vk-bg-main)] text-[var(--vk-text-muted)]",tL=(0,l.useMemo)(()=>{let e=Array.isArray(ek)?ek:[],t=new Set;for(let e of E.pN)t.add(e.name);for(let r of e)r.name&&t.add(r.name);for(let e of em)e.agent&&t.add(e.agent);eK?.codingAgent&&t.add(eK.codingAgent),eB&&t.add(eB),0===t.size&&t.add(eK?.codingAgent||Y);let r=(0,E.Ge)(t);return 0===r.length&&r.push((0,E.a6)(eK?.codingAgent||Y,Y)),r},[ek,eK?.codingAgent,em,eB]),tO=(0,l.useMemo)(()=>{let e={};for(let t of E.pN)e[(0,I.q)(t.name)]={name:t.name,ready:!1,installed:!1,configured:!1,homepage:t.homepage,description:t.description,installHint:t.installHint??null,installUrl:t.installUrl??t.homepage??null,setupUrl:t.setupUrl??t.homepage??null};for(let t of Array.isArray(ek)?ek:[]){if(!t.name)continue;let r=(0,I.q)(t.name),a=(0,E.h7)(t.name);e[(0,I.q)(t.name)]={name:a?.name??t.name,ready:!0===t.ready,installed:!1!==t.installed,configured:!0===t.configured,homepage:"string"==typeof t.homepage?t.homepage:a?.homepage??e[r]?.homepage??null,description:"string"==typeof t.description?t.description:a?.description??e[r]?.description??null,installHint:"string"==typeof t.installHint?t.installHint:a?.installHint??e[r]?.installHint??null,installUrl:"string"==typeof t.installUrl?t.installUrl:a?.installUrl??e[r]?.installUrl??null,setupUrl:"string"==typeof t.setupUrl?t.setupUrl:a?.setupUrl??e[r]?.setupUrl??null}}return e},[ek]),tB=(0,l.useMemo)(()=>{let e={};for(let t of Array.isArray(ek)?ek:[])t.name&&t.runtimeModelCatalog&&(e[(0,I.q)(t.name)]=t.runtimeModelCatalog);return e},[ek]),tU=(0,l.useCallback)(e=>{let t=tO[(0,I.q)(e)],r=(0,E.h7)(e),a=t?.installed?t?.setupUrl??r?.setupUrl??t?.homepage??r?.homepage:t?.installUrl??r?.installUrl??t?.setupUrl??r?.setupUrl??t?.homepage??r?.homepage;a&&window.open(a,"_blank","noopener,noreferrer")},[tO]);async function t_(t,r){e3(!0),e2(null);try{if(e&&!k)throw Error("Pair or reconnect a laptop before saving preferences.");let a=await fetch((0,R.S)("/api/preferences",k),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await a.json().catch(()=>null);if(!a.ok)throw Error(n?.error??n?.reason??`Failed to save preferences: ${a.status}`);let s=eh(n?.preferences,t.codingAgent||Y);return eQ(s),eU(s.codingAgent),r?.closeDialog!==!1&&e6(!1),!0}catch(e){return e2(e instanceof Error?e.message:"Failed to save preferences"),!1}finally{e3(!1)}}(0,l.useEffect)(()=>{let e=!1;return async function(){if(!eu){e||(eQ(null),e2(null),e0(!1));return}e0(!0);try{let t=await fetch((0,R.S)("/api/preferences",k)),r=await t.json().catch(()=>null);if(!t.ok)throw Error(r?.error??r?.reason??`Failed to load preferences: ${t.status}`);if(e)return;let a=eh(r?.preferences,Y);eQ(a),e2(null)}catch(t){if(e)return;eQ(eh(null,Y)),e2(t instanceof Error?t.message:"Failed to load preferences")}finally{e||e0(!1)}}(),()=>{e=!0}},[k,eu]),(0,l.useEffect)(()=>{eK&&(eB||eU(eK.codingAgent))},[eK,eB]),(0,l.useEffect)(()=>{if(!eY){if(!eK||e&&!k)return void e6(!1);eK.onboardingAcknowledged||e6(!0)}},[k,eK,eY,e]),(0,l.useEffect)(()=>{if(0!==tL.length&&(!eB||!tL.includes(eB))){let e=eK?.codingAgent||Y;eU(tL.includes(e)?e:tL[0]??Y)}},[tL,eK?.codingAgent,eB]),(0,l.useEffect)(()=>{let e=(0,E.a6)(eB||ty?.agent||eK?.codingAgent||Y,Y),t=ty&&(0,I.q)(ty.agent)===(0,I.q)(e)?ty.agentModel:null,r=ty&&(0,I.q)(ty.agent)===(0,I.q)(e)?ty.agentReasoningEffort:null;eq((0,Q.c0)(e,eK?.modelAccess??(0,K.v)(null),tB,t,r))},[eK?.modelAccess,eK?.codingAgent,tB,eB,ty]);let tq=(0,l.useCallback)(()=>{e&&!k?eT("Pair or reconnect a laptop before adding a workspace."):(eT(null),eX(null),eR(null),eG(!0),eA())},[k,e,eA]);(0,l.useEffect)(()=>{e7&&!e5&&(e9(!1),tq())},[e7,e5]),(0,l.useEffect)(()=>{(!e||k)&&eT(null)},[k,e]);let tW=(0,l.useCallback)(async t=>{let r=eL.trim(),a=(0,Q.xb)(e_),n=(0,Q.aB)(e_),s=t?.bridgeId??k??null;if(e&&!s)return eR("Pair or reconnect a laptop before launching an agent session."),!1;let l=t?.projectId??i??em[0]?.id;if(!l)return eR("No project is configured in conductor.yaml"),!1;let o=(0,E.a6)(eB||Y,Y),d=tO[(0,I.q)(o)]??null;if(d&&!d.ready)return eR(d.installed?`${ex(o)} is not ready yet. Finish setup or authentication and try again.`:`${ex(o)} is not installed on this machine yet. Open setup and try again.`),tU(o),!1;eF(!0),eR(null);try{let e=await fetch((0,R.S)("/api/sessions",s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:l,prompt:r,...t?.issueId?.trim()?{issueId:t.issueId.trim()}:{},agent:o,...t?.branch?{branch:t.branch}:{},...t?.baseBranch?{baseBranch:t.baseBranch}:{},..."boolean"==typeof t?.useWorktree?{useWorktree:t.useWorktree}:{},...t?.permissionMode?{permissionMode:t.permissionMode}:{},...a?{model:a}:{},...n?{reasoningEffort:n}:{},...t?.attachments&&t.attachments.length>0?{attachments:t.attachments}:{}})}),i=await e.json().catch(()=>null);if(!e.ok)throw Error(i?.error??`Failed to create workspace: ${e.status}`);if(!i?.session?.id)throw Error("Session created but response is missing session id");return eO(""),eA(),tu.current=i.session.id,await eP(),tk({projectId:l,sessionId:i.session.id,tab:null,bridgeId:s},"push"),!0}catch(e){return eR(e instanceof Error?e.message:"Failed to create workspace"),!1}finally{eF(!1)}},[tO,e_,tk,tU,em,eL,eP,eB,k,i,e,eA]),tF=(0,l.useCallback)(async e=>{(await (0,V.J)(e,{bridgeId:k}),o===e)?tk({projectId:null,sessionId:null,workspaceView:null,tab:null},"replace"):k&&eP()},[k,tk,eP,o]),tD=(0,l.useCallback)(async t=>{if(e&&!k)return void eX("Pair or reconnect a laptop before adding a workspace.");eZ(!0),eX(null);try{let e=await fetch((0,R.S)("/api/workspaces",k),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await e.json().catch(()=>null);if(!e.ok)throw Error(r?.error??`Failed to add workspace: ${e.status}`);let a=r?.project?.id;if(!a)throw Error("Workspace created but response is missing project id");await ej(),eO(""),eA(),eG(!1),tk({projectId:a,sessionId:null,workspaceView:"direct",tab:null,bridgeId:k??null},"push")}catch(e){eX(e instanceof Error?e.message:"Failed to add workspace")}finally{eZ(!1)}},[k,tk,ej,e,eA]),tR=!eY&&!!eK&&(!e||!!k)&&!eK.onboardingAcknowledged,tV=eK??eh(null,eB||Y),tT=(0,E.a6)(eB||tV.codingAgent||Y,Y),tz=i??tv?.projectId??null;(0,L.Q)({enabled:!eY,projectId:tz,preferences:tV.notifications,bridgeId:k});let tG=(0,l.useCallback)(e=>{tk({projectId:e,sessionId:null,workspaceView:e?d:null,tab:null},"push"),eU((0,E.a6)(eK?.codingAgent||Y,Y)),tl("board"),eS()},[eS,tk,eK?.codingAgent,d]),tH=(0,l.useCallback)((e,t)=>{var r,a;let n,s=th.get(e)??null;tk((r=i??null,a=t?.tab,n={projectId:s?.projectId??r??null,sessionId:e,tab:a??(0,J.tK)(s)},"board"===d||"notes"===d?{...n,workspaceView:"direct"}:n),"push"),eS()},[eS,tk,i,th,d]),tZ=(0,l.useCallback)(()=>{e&&!k?t.push("/bridge/connect"):e6(!0)},[k,e,t]),tJ=(0,l.useCallback)(()=>{eH||eG(!1)},[eH]),tX=(0,l.useCallback)(()=>{e1||tR||(e6(!1),e2(null))},[tR,e1]),tK=(0,l.useCallback)(()=>{to(e=>!e)},[]),tQ=(0,l.useCallback)(async e=>{let t=encodeURIComponent(e),r=await fetch((0,R.S)(`/api/repositories/${t}`,k),{method:"DELETE"});(404===r.status||405===r.status)&&(r=await fetch((0,R.S)(`/api/repositories?id=${t}`,k),{method:"DELETE"}));let a=await r.json().catch(()=>null);if(!r.ok)throw Error(a?.error??`Failed to unlink project (${r.status})`);await ej()},[k,ej]),tY=(0,l.useMemo)(()=>eC?(0,a.jsx)(en,{projects:em,selectedProjectId:i,onSelectProject:tG,onUnlinkProject:tQ,sessions:eE,selectedSessionId:o,onSelectSession:tH,onArchiveSession:tF,onCreateWorkspace:tq}):null,[eE,tF,tG,tH,tQ,tq,em,i,o,eC]),t0=(0,l.useMemo)(()=>{let t=ty?(0,a.jsxs)("div",{role:"group","aria-label":"Project workspace view",className:"hidden w-fit rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-px xl:inline-flex",children:[(0,a.jsx)("button",{type:"button","aria-pressed":"direct"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"direct"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"direct"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Direct launch"}),(0,a.jsx)("button",{type:"button","aria-pressed":"board"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"board"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"board"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Board view"}),(0,a.jsx)("button",{type:"button","aria-pressed":"notes"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"notes"},"replace"),className:`min-h-[31px] rounded-[2px] px-3 text-[13px] ${"notes"===d?"bg-[var(--vk-bg-hover)] text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Notes"})]}):null;return"board"===d?(0,a.jsx)(el,{projectId:i,bridgeId:k,defaultAgent:tT,agentOptions:tL,projectSessions:tN,projectLabel:ty?.id??i,headerAccessory:t,onOpenSession:tH}):"notes"===d&&i?(0,a.jsx)(eo,{projectId:i,bridgeId:k,sessions:tN,selectedSessionId:o}):(0,a.jsx)(eb,{prompt:eL,setPrompt:eO,selectedAgent:tT,setSelectedAgent:eU,agentStates:tO,modelSelection:e_,setModelSelection:eq,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,agentOptions:tL,projects:em,bridges:w,selectedBridgeId:x,setSelectedBridgeId:p,requiresPairedDeviceScope:e,selectedProjectId:i,onSelectProject:tG,projectLabel:i??"All projects",hasProject:em.length>0,creating:eW,error:tg,onOpenAddWorkspace:tq,onOpenAgentSetup:tU,onCreate:tW})},[tL,tO,w,eW,tW,e_,tU,tq,em,tN,ty,o,tH,eL,tT,tV.modelAccess,e,tB,x,i,eO,tg,d,tk]),t1=(0,l.useMemo)(()=>{if(!ty)return t0;let e=({fullWidth:e=!1,compact:t=!1}={})=>(0,a.jsxs)("div",{role:"group","aria-label":"Project workspace view",className:`inline-flex ${e?"w-full":"w-fit"} rounded-[6px] border border-[var(--vk-border)] ${t?"p-0.5":"p-1"}`,children:[(0,a.jsx)("button",{type:"button","aria-pressed":"direct"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"direct"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"direct"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Direct launch"}),(0,a.jsx)("button",{type:"button","aria-pressed":"board"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"board"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"board"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Board view"}),(0,a.jsx)("button",{type:"button","aria-pressed":"notes"===d,onClick:()=>tk({projectId:ty.id,workspaceView:"notes"},"replace"),className:`${t?"min-h-[30px] px-3 text-[12px]":"min-h-[32px] px-3 text-[13px]"} flex-1 rounded-[4px] ${"notes"===d?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:"Notes"})]});if("board"===d){let t={"--dispatcher-panel-width":`${td}px`},r=!ta,n=!r||"board"===ts,s=!r||"chat"===ts,l=r&&null===o,i=ta&&ti&&null===o,c=null!==o||!ti;return(0,a.jsxs)("div",{style:t,className:"relative flex h-full min-h-0 flex-1 flex-col overflow-hidden",children:[r?(0,a.jsx)("div",{className:"border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-3 py-2 xl:hidden",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[e({fullWidth:!0,compact:!0}),l?(({fullWidth:e=!1,compact:t=!1}={})=>(0,a.jsxs)("div",{className:`inline-flex ${e?"w-full":"w-fit"} rounded-[6px] border border-[var(--vk-border)] ${t?"p-0.5":"p-1"}`,children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{tl("board"),tk({projectId:ty.id,workspaceView:"board"},"replace")},"aria-pressed":"board"===d&&"board"===ts,className:`inline-flex flex-1 items-center justify-center rounded-[4px] font-medium transition-colors ${t?"min-h-[30px] gap-1 px-2.5 text-[11px]":"min-h-[34px] gap-1.5 px-3 text-[12px]"} ${"board"===d&&"board"===ts?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:[(0,a.jsx)(u.A,{className:`${t?"h-3 w-3":"h-3.5 w-3.5"} shrink-0`}),(0,a.jsx)("span",{children:"Board"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tl("chat"),tk({projectId:ty.id,workspaceView:"board"},"replace")},"aria-pressed":"board"===d&&"chat"===ts,className:`inline-flex flex-1 items-center justify-center rounded-[4px] font-medium transition-colors ${t?"min-h-[30px] gap-1 px-2.5 text-[11px]":"min-h-[34px] gap-1.5 px-3 text-[12px]"} ${"board"===d&&"chat"===ts?"bg-[var(--vk-bg-active)] text-[var(--vk-text-strong)]":"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]"}`,children:[(0,a.jsx)(m.A,{className:`${t?"h-3 w-3":"h-3.5 w-3.5"} shrink-0`}),(0,a.jsx)("span",{children:"Dispatcher"})]})]}))({fullWidth:!0,compact:!0}):null]})}):null,(0,a.jsxs)("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden xl:flex-row",children:[(0,a.jsx)("div",{className:`${n?"block":"hidden"} min-h-0 min-w-0 flex-1 overflow-hidden xl:block`,children:t0}),c?(0,a.jsx)("div",{className:"absolute bottom-0 right-[var(--dispatcher-panel-width)] top-0 z-20 hidden w-2 translate-x-1/2 cursor-col-resize xl:block",onMouseDown:e=>{e.preventDefault(),tp(!0)},"aria-hidden":"true",children:(0,a.jsx)("div",{className:"mx-auto h-full w-px bg-transparent transition-colors hover:bg-[var(--vk-border)]"})}):null,(0,a.jsxs)("div",{className:`${s?"flex":"hidden xl:flex"} ${i?"flex-1 min-h-0 xl:h-auto xl:max-h-none xl:w-[56px] xl:flex-none xl:min-h-0":"flex-1 min-h-[min(360px,50dvh)] xl:w-[var(--dispatcher-panel-width)] xl:flex-none xl:min-h-0"} flex-col overflow-hidden border-t border-[var(--vk-border)] bg-[var(--vk-bg-panel)] xl:border-l xl:border-t-0`,children:[r&&s&&null!==o?(0,a.jsx)("div",{className:"flex items-center border-b border-[var(--vk-border)] px-3 py-2 xl:hidden",children:(0,a.jsxs)("button",{type:"button",onClick:()=>tl("board"),className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-1 text-[12px] font-medium text-[var(--vk-text-muted)] transition-colors hover:bg-[var(--vk-bg-hover)] hover:text-[var(--vk-text-strong)]",children:[(0,a.jsx)(b.A,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:"Back to board"})]})}):null,o?tS?(0,a.jsx)("div",{className:"relative min-h-0 h-full min-w-0 flex-1 overflow-hidden",children:e8.map(e=>{let t=e===o,r=t?tS:th.get(e)??null;return r&&r.projectId===ty.id?(0,a.jsx)("div",{"aria-hidden":!t,className:t?"relative z-10 h-full min-w-0":"pointer-events-none absolute inset-0 overflow-hidden opacity-0 select-none",children:(0,a.jsx)(ea,{sessionId:e,initialSession:r,bridgeId:k,active:t,suppressPreviewAutoOpen:t&&tu.current===e,immersiveMobileMode:t&&tC})},e):null})}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center bg-[var(--vk-bg-panel)] text-[13px] text-[var(--vk-text-muted)]",children:"Loading session workspace..."}):(0,a.jsx)(ei,{projectId:ty.id,bridgeId:k,defaultAgent:tT,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,collapsed:i,onToggleCollapsed:tK})]})]})]})}return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[(0,a.jsx)("div",{className:"border-b border-[var(--vk-border)] bg-[var(--vk-bg-panel)]/70 px-3 py-3 sm:px-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--vk-text-muted)]",children:"Project Workspace"}),(0,a.jsxs)("p",{className:"mt-1 truncate text-[14px] text-[var(--vk-text-strong)]",children:[ty.id," \xb7 ",ty.defaultBranch||"main"]})]}),(0,a.jsx)("div",{className:"hidden xl:inline-flex",children:e()}),(0,a.jsx)("div",{className:"xl:hidden",children:e({fullWidth:!0,compact:!0})})]})}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:t0})]})},[ts,ti,td,tS,k,tK,tC,e8,tk,tT,ty,tN,o,th,ta,t0,d]),t3=(0,l.useMemo)(()=>ep?(0,a.jsx)("div",{className:"flex h-full min-h-0 flex-1 items-center justify-center bg-[var(--vk-bg-main)] px-4",children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-[12px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-5 py-5 text-center shadow-[0_18px_50px_rgba(0,0,0,0.18)]",children:[(0,a.jsx)("div",{className:"mx-auto flex h-11 w-11 items-center justify-center rounded-full border border-[color:color-mix(in_srgb,var(--vk-accent)_30%,transparent)] bg-[color:color-mix(in_srgb,var(--vk-accent)_12%,transparent)] text-[var(--vk-accent)]",children:(0,a.jsx)(f.A,{className:"h-5 w-5 animate-spin"})}),(0,a.jsx)("h2",{className:"mt-4 text-[18px] font-medium text-[var(--vk-text-strong)]",children:"Reconnecting paired laptop"}),(0,a.jsx)("p",{className:"mt-2 text-[14px] leading-6 text-[var(--vk-text-muted)]",children:"Waiting for the selected laptop to report online before loading its projects and sessions."})]})}):o&&(null===i||"board"!==d&&"notes"!==d)?(0,a.jsx)("div",{className:"relative min-h-0 h-full min-w-0 flex-1 overflow-hidden",children:e8.map(e=>{let t=e===o,r=t?tw:th.get(e)??null;return(0,a.jsx)("div",{"aria-hidden":!t,className:t?"relative z-10 h-full min-w-0":"pointer-events-none absolute inset-0 overflow-hidden opacity-0 select-none",children:(0,a.jsx)(ea,{sessionId:e,initialSession:r,bridgeId:k,active:t,suppressPreviewAutoOpen:t&&tu.current===e,immersiveMobileMode:t&&tC,onOpenSidebar:eN})},e)})}):null!==i?(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:t1}):(0,a.jsx)("div",{className:"flex h-full min-h-0 w-full flex-1 overflow-hidden",children:(0,a.jsx)(es,{projects:em,sessions:eE,onCreateWorkspace:tq,onSelectSession:tH})}),[eE,e8,t1,tw,o,tH,tq,em,i,th,ep,eN,d]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(U.G,{mobileSidebarOpen:ew,desktopSidebarOpen:ey,onToggleSidebar:eN,hideMobileSidebarToggle:tC,sidebar:tY,children:[tC?null:(0,a.jsx)(_.V,{title:tI,onOpenPreferences:tZ,rightContent:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium ${tP}`,title:t$,children:tM}),(0,a.jsx)(q.J,{})]})}),(0,a.jsxs)("div",{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden ${tC?"bg-[#060404]":""}`,children:[eV?(0,a.jsx)("div",{className:"border-b border-[var(--vk-red)]/35 bg-[color:color-mix(in_srgb,var(--vk-red)_12%,var(--vk-bg-panel))] px-3 py-2 text-[13px] text-[var(--vk-red)] sm:px-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("p",{className:"min-w-0 flex-1",children:eV}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(null),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[4px] text-[var(--vk-red)]/80 hover:bg-[var(--vk-red)]/10 hover:text-[var(--vk-red)]","aria-label":"Dismiss workspace action error",children:(0,a.jsx)(g.A,{className:"h-4 w-4"})})]})}):null,t3]})]}),ez?(0,a.jsx)(ed,{open:ez,onClose:tJ,onCreate:tD,creating:eH,error:eJ,defaultAgent:tT,agentOptions:tL,modelAccess:tV.modelAccess,runtimeModelCatalogs:tB,bridgeId:k}):null,e5||tR?(0,a.jsx)(ec,{open:e5,mode:tR?"onboarding":"settings",creating:e1,error:e4,current:tV,projectCount:em.length,agentOptions:tL,agentStates:tO,runtimeModelCatalogs:tB,onRepositoriesChanged:ej,onOnboardingComplete:({needsProject:e})=>{e&&e9(!0)},onOpenAgentSetup:tU,onClose:tX,onSave:t_,bridgeId:k}):null]})}c.A,x.A,p.A,u.A,m.A,h.A,v.A,v.A,x.A,[{id:"vscode",label:"VS Code"},{id:"vscode-insiders",label:"VS Code Insiders"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"intellij-idea",label:"IntelliJ IDEA"},{id:"zed",label:"Zed"},{id:"xcode",label:"Xcode"},{id:"antigravity",label:"Antigravity"},{id:"custom",label:"Custom"}].filter(e=>"custom"!==e.id),c.A,o.mWn,d.$$9,o.i4$,c.A;let eb=(0,l.memo)(function({prompt:e,setPrompt:t,selectedAgent:r,setSelectedAgent:n,agentStates:s,modelSelection:o,setModelSelection:d,modelAccess:c,runtimeModelCatalogs:x,agentOptions:p,projects:u,bridges:m,selectedBridgeId:b,setSelectedBridgeId:M,requiresPairedDeviceScope:$,selectedProjectId:P,onSelectProject:L,projectLabel:O,hasProject:B,creating:U,error:_,onOpenAddWorkspace:q,onOpenAgentSetup:W,onCreate:V}){let T=(0,l.useMemo)(()=>{let e=new Map(E.BO.map((e,t)=>[e,t]));return[...p].sort((t,r)=>{let a=e.get((0,I.q)(t))??Number.MAX_SAFE_INTEGER,n=e.get((0,I.q)(r))??Number.MAX_SAFE_INTEGER;return a!==n?a-n:ex(t).localeCompare(ex(r))})},[p]),z=ex(r),G=s[(0,I.q)(r)]??null,H=(0,l.useMemo)(()=>[...u].sort((e,t)=>e.id.localeCompare(t.id)),[u]),Z=P??H[0]?.id??null,J=(0,l.useMemo)(()=>H.find(e=>e.id===Z)??null,[Z,H]),K=(0,l.useMemo)(()=>m.filter(e=>e.connected),[m]),Y=(0,l.useMemo)(()=>!b||K.some(e=>e.bridgeId===b),[K,b]),[ee,et]=(0,l.useState)([]),[er,ea]=(0,l.useState)(!1),[en,es]=(0,l.useState)(""),[el,ei]=(0,l.useState)(""),[eo,ed]=(0,l.useState)([]),[ec,em]=(0,l.useState)(!1),[eh,ev]=(0,l.useState)(!1),[eb,ef]=(0,l.useState)(!1),[eg,ej]=(0,l.useState)(!1),[ek,ew]=(0,l.useState)("default"),[ey,eN]=(0,l.useState)([]),[eS,eA]=(0,l.useState)(!1),[eC,eI]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!J){et([]),es(""),ea(!1);return}et([]),es(J.defaultBranch.trim()||"main"),ea(!1)},[J]),(0,l.useEffect)(()=>{if(!Z){ed([]),ei(""),em(!1);return}ed([]),ei(""),em(!1)},[Z]);let eE=(0,l.useCallback)(async()=>{if(!J)return;let e=J.defaultBranch.trim()||"main";if(!J.path?.trim()){et([e]),es(t=>t.trim().length>0?t:e);return}ea(!0);try{let t=new URLSearchParams({path:J.path}),r=await fetch((0,R.S)(`/api/workspaces/branches?${t.toString()}`,b)),a=await r.json().catch(()=>null),n=Array.isArray(a?.branches)?a.branches.filter(e=>"string"==typeof e&&e.trim().length>0):[],s="string"==typeof a?.defaultBranch&&a.defaultBranch.trim().length>0?a.defaultBranch.trim():e,l=n.length>0?n:[s];et(l),es(e=>e.trim().length>0&&l.includes(e)?e:s)}catch{et([e]),es(e)}finally{ea(!1)}},[b,J]),eM=(0,l.useCallback)(async()=>{if(Z){em(!0);try{let e=await fetch((0,R.S)(`/api/boards?projectId=${encodeURIComponent(Z)}`,b)),t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Failed to load tasks: ${e.status}`);let r=(Array.isArray(t?.columns)?t.columns:[]).flatMap(e=>Array.isArray(e.tasks)?e.tasks:[]),a=new Set,n=r.filter(e=>{let t=ep(e);return!(!t||a.has(t))&&(a.add(t),!0)});ed(n),ei(e=>n.some(t=>ep(t)===e)?e:"")}catch{ed([]),ei("")}finally{em(!1)}}},[Z,b]);(0,l.useEffect)(()=>{!eb||er||ee.length>0||eE()},[er,eb,ee.length,eE]),(0,l.useEffect)(()=>{!eh||ec||eo.length>0||eM()},[eo.length,eM,ec,eh]);let e$=(0,l.useMemo)(()=>(0,Q.Ik)(r,c,x),[c,x,r]),eP=(0,l.useMemo)(()=>eo.find(e=>ep(e)===el)??null,[eo,el]),eL=(0,Q.xb)(o)??"",eO=(0,l.useMemo)(()=>{let e=new Set,t=[],a=eL.trim();for(let r of e$)e.has(r.id)||(e.add(r.id),t.push(r));return a&&!e.has(a)&&(e.add(a),t.unshift({id:a,label:function(e,t){let r=t.trim(),a=(0,I.q)(e);if(!r)return r;if("claude-code"===a){let e=r.toLowerCase();if("opus"===e)return"Claude Opus";if("sonnet"===e)return"Claude Sonnet";if("haiku"===e)return"Claude Haiku";let t=e.match(/^claude-(sonnet|opus|haiku)-(\d+)-(\d+)(?:-\d{8})?$/);if(t){let e=t[1];return`Claude ${e[0]?.toUpperCase()+e.slice(1)} ${t[2]}.${t[3]}`}}return r.split(/[-_]+/g).filter(Boolean).map(e=>"gpt"===e.toLowerCase()?"GPT":/^\d+(?:\.\d+)?$/.test(e)?e:e[0]?.toUpperCase()+e.slice(1)).join("-")}(r,a),description:"Current selected model.",access:[]})),t},[e$,r,eL]),eB=(0,l.useMemo)(()=>!G||G.ready||eL?eL?eO.find(e=>e.id===eL)?.label??eL:"Default":"Setup required",[eO,G,eL]),eU=(0,l.useMemo)(()=>(0,Q.iL)(r,c,x,eL),[c,x,r,eL]),e_=(0,Q.aB)(o)??"",eq=(0,l.useMemo)(()=>{let e=eU.find(e=>e.id===e_);return e?e.label:e_||(eU[0]?.label??"Default")},[eU,e_]),eW="z-50 min-w-[240px] max-w-[calc(100vw-32px)] rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-2 shadow-[0_18px_50px_rgba(0,0,0,0.35)] sm:max-w-none",eF=`${eW} max-h-[min(360px,50vh)] overflow-y-auto`,eD="flex min-h-[44px] cursor-default items-center gap-2 rounded-[3px] px-3 py-2 text-[14px] leading-[21px] text-[var(--vk-text-normal)] outline-none hover:bg-[var(--vk-bg-hover)] focus:bg-[var(--vk-bg-hover)] sm:min-h-[36px]",eR=[{id:"default",label:"Default",icon:v.A},{id:"auto",label:"Auto",icon:j.A},{id:"ask",label:"Ask",icon:k.A},{id:"plan",label:"Plan",icon:w.A}],eV=eR.find(e=>e.id===ek)??eR[0],eT="launchpad-attachment-input",ez=U||eS,eG=e=>{let t=e.repo?.trim();if(t){let e=t.split("/").filter(Boolean),r=e[e.length-1]?.replace(/\.git$/i,"");if(r)return r}return e.id},eH=J?eG(J):null,eZ=J?`${eH} \xb7 ${en||J.defaultBranch||"main"}`:B?O:"Select project",eJ=eP?.taskRef?.trim()||eP?.issueId?.trim()||eP?.id||"",eX=eP?eu(eP.text):"Choose a task, bug, or issue from this project's board",eK=J?.id??Z??null,eQ=(0,l.useCallback)(e=>{let t=Array.from(e.currentTarget.files??[]);if(e.currentTarget.value="",!t.length)return;let r=new Set(ey.map(e=>`${e.name}:${e.size}:${e.lastModified}`)),a=t.filter(e=>!r.has(`${e.name}:${e.size}:${e.lastModified}`));a.length>0&&eN(e=>[...e,...a]),eI(null)},[ey]),eY=(0,l.useCallback)(e=>{eN(t=>t.filter((t,r)=>r!==e))},[]),e0=(0,l.useCallback)(async()=>{let e;if(eI(null),!eK||!J)return V({projectId:eK??void 0,...eg?{baseBranch:en||J?.defaultBranch||void 0}:{branch:en||J?.defaultBranch||void 0},issueId:el.trim()||void 0,bridgeId:b||void 0,useWorktree:eg,permissionMode:ek});eA(!0),eI(null);try{ey.length>0&&(e=await (0,D.P)({files:ey,projectId:J.id,taskRef:el.trim()||void 0,bridgeId:b||void 0}))}catch(e){return eI(e instanceof Error?e.message:"Failed to upload attachment"),!1}finally{eA(!1)}let t=await V({projectId:eK??void 0,...eg?{baseBranch:en||J.defaultBranch||void 0}:{branch:en||J.defaultBranch||void 0},issueId:el.trim()||void 0,bridgeId:b||void 0,useWorktree:eg,permissionMode:ek,...e&&e.length>0?{attachments:e}:{}});return t&&(eN([]),eI(null)),t},[el,eK,V,ek,en,J,J?.defaultBranch,b,ey,eg]);return(0,l.useEffect)(()=>{eN([]),eI(null)},[eK]),(0,a.jsx)("section",{className:"flex h-full min-h-0 items-start justify-center overflow-auto bg-[var(--vk-bg-main)] px-3 py-4 sm:items-center sm:px-6 sm:py-6",children:(0,a.jsxs)("div",{className:"w-full max-w-[768px]",children:[(0,a.jsx)("h1",{className:"pb-4 text-center text-[30px] font-medium leading-[34px] tracking-[-0.7px] text-[var(--vk-text-strong)] sm:text-[36px] sm:leading-[40px] sm:tracking-[-0.9px]",children:"What would you like to work on?"}),b?null:(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)(h.A,{className:"mt-0.5 h-[14px] w-[14px] shrink-0"}),(0,a.jsx)("span",{children:$?"Pair or reconnect a laptop to browse workspaces and launch coding agents from the web dashboard.":"Showing projects and sessions from the local backend. Pair a laptop and select it here to browse that device instead."})]}),(0,a.jsxs)("div",{className:"mx-auto w-full rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] p-px",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-b border-[var(--vk-border)] px-2 pb-[9px] pt-2 sm:flex-row sm:items-center",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:flex-1",children:[(0,a.jsx)(F.N,{seed:{label:r},className:"h-[25px] w-[25px] shrink-0 border-none bg-transparent"}),(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[31px] min-w-0 max-w-full items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] outline-none hover:bg-[var(--vk-bg-hover)] data-[state=open]:bg-[var(--vk-bg-hover)] sm:max-w-[280px]","aria-label":"Select agent",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate pr-1 text-left",children:z}),(0,a.jsx)(y.A,{className:"h-3 w-3 shrink-0 text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Agents"}),T.map(e=>{let t=e===r,l=s[(0,I.q)(e)]??null;return(0,a.jsxs)(i.q7,{onSelect:()=>n(e),className:eD,children:[(0,a.jsx)(F.N,{seed:{label:e},className:"h-6 w-6 border-none bg-transparent"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{children:ex(e)}),l?.ready?null:(0,a.jsx)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--vk-text-muted)]",children:(0,X.f)(l)})]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:t?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e)})]})})]})]}),(0,a.jsxs)(i.bL,{onOpenChange:ev,children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",disabled:!Z,className:"flex h-[31px] w-full min-w-0 items-center rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-left disabled:cursor-not-allowed disabled:opacity-50 sm:w-[240px] sm:shrink-0","aria-label":"Select task",children:[(0,a.jsx)("span",{className:`min-w-0 flex-1 truncate text-[14px] leading-[21px] ${eJ?"text-[var(--vk-text-normal)]":"text-[var(--vk-text-muted)]"}`,children:eJ||"No task"}),(0,a.jsx)(y.A,{className:"h-3 w-3 shrink-0 text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"end",side:"bottom",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Tasks"}),(0,a.jsx)("p",{className:"px-3 pb-2 text-[12px] leading-[16px] text-[var(--text-faint)]",children:eX}),(0,a.jsxs)(i.q7,{onSelect:()=>ei(""),className:eD,children:[(0,a.jsx)("span",{children:"No linked task"}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:el?null:(0,a.jsx)(N.A,{className:"h-4 w-4"})})]}),ec?(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"Loading board tasks..."}):eo.length>0?eo.map(e=>{let t=ep(e),r=eu(e.text),n=[e.type,e.priority].filter(Boolean).join(" \xb7 ");return(0,a.jsxs)(i.q7,{onSelect:()=>ei(t),className:`${eD} min-w-[320px] items-start`,children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate",children:e.taskRef?.trim()||r}),(0,a.jsxs)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--text-faint)]",children:[e.taskRef?.trim()?r:t,n?` \xb7 ${n}`:""]})]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:el===t?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},t)}):(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"No existing tasks were found for this project."})]})})]})]}),(0,a.jsx)("div",{className:"rounded-[3.5px]",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-2",children:[(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsx)("textarea",{value:e,onChange:e=>t(e.target.value),placeholder:"Optional launch prompt. Leave empty to open the native CLI.",rows:1,className:"min-h-[24px] w-full resize-none bg-transparent pr-16 text-[16px] leading-[24px] text-[var(--vk-text-normal)] outline-none placeholder:text-[var(--vk-text-muted)]"}),(0,a.jsxs)("label",{htmlFor:eT,className:`absolute right-[18px] top-0 inline-flex h-[24px] w-[24px] items-center justify-center rounded-[4px] ${eK?"text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]":"cursor-not-allowed opacity-50"}`,children:[(0,a.jsx)("input",{id:eT,type:"file",accept:"*/*",multiple:!0,onChange:eQ,disabled:!eK||ez,className:"hidden"}),(0,a.jsx)(S.A,{className:"h-[14px] w-[14px]"})]}),(0,a.jsx)("button",{type:"button","aria-label":"Preview",className:"absolute right-0 top-0 inline-flex h-[24px] w-[24px] items-center justify-center rounded-[4px] text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]",children:(0,a.jsx)(A.A,{className:"h-[14px] w-[14px]"})})]}),ey.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:ey.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-[999px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-2 py-1 text-[11px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)("span",{className:"max-w-[160px] truncate",title:e.name,children:e.name}),(0,a.jsx)("button",{type:"button","aria-label":`Remove attachment ${e.name}`,onClick:()=>eY(t),className:"inline-flex h-[14px] w-[14px] items-center justify-center rounded-full text-[var(--vk-text-muted)] hover:bg-[var(--vk-bg-hover)]",children:(0,a.jsx)(g.A,{className:"h-3 w-3"})})]},`${e.name}-${e.size}-${e.lastModified}-${t}`))}):null,(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-x-1 gap-y-2",children:[(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsx)("button",{type:"button",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)] hover:bg-[var(--vk-bg-hover)]","aria-label":"Select workspace or project",children:(0,a.jsx)(v.A,{className:"h-[15px] w-[15px]"})})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Projects"}),H.map(e=>{let t=eG(e),r=e.id!==t?e.id:e.path?.trim()||e.repo?.trim()||null;return(0,a.jsxs)(i.q7,{onSelect:()=>L(e.id),className:`${eD} min-w-[280px] items-start`,children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate",children:t}),r?(0,a.jsx)("div",{className:"truncate text-[12px] leading-[16px] text-[var(--text-faint)]",children:r}):null]}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:e.id===Z?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id)}),(0,a.jsx)(i.wv,{className:"my-1 h-px bg-[var(--vk-border)]"}),(0,a.jsxs)(i.q7,{onSelect:q,className:eD,children:[(0,a.jsx)(C.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"Add Workspace"})]})]})})]}),eU.length>0?(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button","aria-label":"Select reasoning effort",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("span",{children:eq}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Reasoning"}),eU.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>d({...o,reasoningEffort:e.id}),className:eD,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:e_===e.id?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id))]})})]}):null,(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("span",{children:eB}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Model"}),(0,a.jsxs)(i.q7,{onSelect:()=>d((0,Q.c0)(r,c,x,J?.agentModel,J?.agentReasoningEffort)),className:eD,children:[(0,a.jsx)("span",{children:"Default"}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:eL?null:(0,a.jsx)(N.A,{className:"h-4 w-4"})})]}),eO.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>{var t;let a;return t=e.id,a=(0,Q.iL)(r,c,x,t),void d({catalogModel:t,customModel:"",reasoningEffort:a.some(e=>e.id===o.reasoningEffort)?o.reasoningEffort:(0,Q.YS)(r,c,x,t)})},className:eD,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:eL===e.id?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e.id)),0===eO.length?(0,a.jsx)("div",{className:"px-3 py-2 text-[12px] leading-[18px] text-[var(--vk-text-muted)]",children:"Models will appear here after the selected agent is installed and its runtime catalog is detected."}):null,G&&!G.ready?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.wv,{className:"my-1 h-px bg-[var(--vk-border)]"}),(0,a.jsx)("button",{type:"button",onClick:()=>W(r),className:"flex w-full items-center rounded-[3px] px-3 py-2 text-left text-[13px] text-[var(--vk-orange)] transition hover:bg-[var(--vk-bg-hover)]",children:G.installed?"Open setup":"Open install guide"})]}):null]})})]}),(0,a.jsxs)(i.bL,{children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"inline-flex h-[29px] items-center gap-[4px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:bg-[var(--vk-bg-hover)]",children:[(0,a.jsx)("span",{children:eV.label}),(0,a.jsx)(y.A,{className:"h-[10px] w-[10px] text-[var(--vk-text-muted)]"})]})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",sideOffset:6,className:eW,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Permissions"}),eR.map(({id:e,label:t,icon:r})=>(0,a.jsxs)(i.q7,{onSelect:()=>ew(e),className:eD,children:[(0,a.jsx)(r,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:t}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:ek===e?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e))]})})]}),K.length>0?(0,a.jsxs)("label",{className:"inline-flex h-[29px] max-w-[260px] items-center gap-[6px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-normal)]",children:[(0,a.jsx)(h.A,{className:"h-[14px] w-[14px] text-[var(--vk-text-muted)]"}),(0,a.jsxs)("select",{value:b,onChange:e=>M(e.target.value),className:"min-w-0 flex-1 bg-transparent text-[14px] text-[var(--vk-text-normal)] outline-none",children:[$?null:(0,a.jsx)("option",{value:"",children:"Local backend"}),K.map(e=>(0,a.jsxs)("option",{value:e.bridgeId,children:[e.hostname," \xb7 ",e.os]},e.bridgeId))]})]}):(0,a.jsxs)("div",{className:"inline-flex h-[29px] items-center gap-[6px] rounded-[3px] border border-[var(--vk-border)] bg-[var(--vk-bg-panel)] px-[9px] py-[5px] text-[14px] leading-[21px] text-[var(--vk-text-muted)]",children:[(0,a.jsx)(h.A,{className:"h-[14px] w-[14px]"}),(0,a.jsx)("span",{children:b&&!Y?"Waiting for selected device":$?"No device connected":"Local backend"})]}),(0,a.jsxs)(i.bL,{onOpenChange:ef,children:[(0,a.jsx)(i.l9,{asChild:!0,children:(0,a.jsx)("button",{type:"button",disabled:!J,className:"inline-flex min-h-[29px] max-w-[320px] items-center justify-center truncate text-[14px] leading-[21px] text-[var(--vk-text-normal)] hover:text-[var(--vk-text-strong)] disabled:cursor-not-allowed disabled:opacity-50",children:eZ})}),(0,a.jsx)(i.ZL,{children:(0,a.jsxs)(i.UC,{align:"start",side:"bottom",sideOffset:6,avoidCollisions:!1,className:eF,children:[(0,a.jsx)("p",{className:"px-3 pb-1 text-[14px] font-semibold leading-[21px] text-[var(--vk-text-muted)]",children:"Branch"}),eH?(0,a.jsx)("p",{className:"px-3 pb-2 text-[12px] leading-[16px] text-[var(--text-faint)]",children:eH}):null,er?(0,a.jsx)("div",{className:"px-3 py-2 text-[14px] leading-[21px] text-[var(--vk-text-muted)]",children:"Loading branches..."}):ee.map(e=>(0,a.jsxs)(i.q7,{onSelect:()=>es(e),className:eD,children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)("span",{className:"ml-auto inline-flex h-4 w-4 items-center justify-center text-[var(--vk-text-strong)]",children:en===e?(0,a.jsx)(N.A,{className:"h-4 w-4"}):null})]},e))]})})]})]}),(0,a.jsx)("div",{className:"flex w-full justify-end sm:w-auto",children:(0,a.jsx)("button",{type:"button",onClick:e0,disabled:ez||!Z,className:"inline-flex min-h-[29px] items-center justify-center rounded-[3px] bg-[var(--vk-bg-hover)] px-[8px] py-[6.5px] text-[16px] leading-[16px] text-[var(--vk-text-strong)] transition-colors hover:bg-[var(--vk-bg-active)] disabled:cursor-not-allowed disabled:opacity-50",children:ez?(0,a.jsx)(f.A,{className:"h-4 w-4 animate-spin"}):"Launch"})})]}),G&&!G.ready?(0,a.jsx)("div",{className:"rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-3 py-2 text-[13px] text-[var(--vk-text-normal)]",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-[13px] text-[var(--vk-text-strong)]",children:[z," is not ready on this machine."]}),(0,a.jsx)("p",{className:"pt-0.5 text-[12px] text-[var(--vk-text-muted)]",children:G.installed?"Finish login or local setup to load models and start streaming sessions.":"Install the CLI first, then its models and authentication state will appear here."})]}),(0,a.jsx)("button",{type:"button",onClick:()=>W(r),className:"inline-flex h-[29px] items-center justify-center rounded-[3px] border border-[var(--vk-border)] px-3 text-[12px] text-[var(--vk-orange)] hover:bg-[var(--vk-bg-hover)]",children:G.installed?"Open setup":"Open install"})]})}):null,(0,a.jsxs)("label",{className:"flex items-start gap-2 rounded-[4px] border border-[var(--vk-border)] bg-[var(--vk-bg-main)] px-2 py-2 text-[13px] text-[var(--vk-text-normal)]",children:[(0,a.jsx)("input",{type:"checkbox",checked:eg,onChange:e=>ej(e.target.checked),className:"mt-0.5 h-4 w-4 rounded border border-[var(--vk-border)] bg-transparent accent-[var(--vk-orange)]"}),(0,a.jsxs)("span",{children:["Use worktree isolation",(0,a.jsx)("span",{className:"block text-[11px] text-[var(--vk-text-muted)]",children:"If unchecked, the session runs directly on the selected branch in the local repo."})]})]})]})})]}),_&&(0,a.jsx)("p",{className:"pt-2 text-[12px] text-[var(--status-error)]",children:_}),eC&&(0,a.jsx)("p",{className:"pt-2 text-[12px] text-[var(--status-error)]",children:eC})]})})})}},e=>{e.O(0,[3036,80691,63357,65587,33051,61962,54177,84271,28386,71679,587,61968,77358],()=>e(e.s=12529)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|