@yuriai/web 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/assets/{AssistantView-C67p8xuJ.js → AssistantView-7qr-iEdP.js} +3 -3
  2. package/dist/assets/{DiagramView-DPcsLliB.js → DiagramView-CD2lyJo4.js} +1 -1
  3. package/dist/assets/{GuiPluginSurface-DYQotofG.js → GuiPluginSurface-DIPLwOYq.js} +1 -1
  4. package/dist/assets/{MarkdownRenderer-Qqpr2mPH.js → MarkdownRenderer-Db-If3tk.js} +2 -2
  5. package/dist/assets/{MarkdownRendererImpl-NsSkRpGi.js → MarkdownRendererImpl-B0JOirRM.js} +2 -2
  6. package/dist/assets/{MarkstreamRendererImpl-DQpFxOfX.js → MarkstreamRendererImpl-96Mp8TZ6.js} +1 -1
  7. package/dist/assets/{MobileDetailNavigation-BaXXR9xC.js → MobileDetailNavigation-9ZlwSUXP.js} +1 -1
  8. package/dist/assets/{MobileShareBridge-CbmVqEAx.js → MobileShareBridge-DM3xAVdm.js} +1 -1
  9. package/dist/assets/{MobileTabPageHeader-BIAkmiCb.js → MobileTabPageHeader-LVBIRzcs.js} +1 -1
  10. package/dist/assets/{MultiRunWindow-B_ptQuKi.js → MultiRunWindow-Bhl5GdPt.js} +1 -1
  11. package/dist/assets/{SettingsView-BbzGMK_z.js → SettingsView-NfjqTxIN.js} +1 -1
  12. package/dist/assets/{SettingsWindow-h25-n1wB.js → SettingsWindow-wet6Qnx3.js} +1 -1
  13. package/dist/assets/{TerminalView-DCQATs7S.js → TerminalView-BXulu3RW.js} +1 -1
  14. package/dist/assets/{ToolOutputDialog-Bm2kSYCn.js → ToolOutputDialog-UrL8sue9.js} +1 -1
  15. package/dist/assets/{appThemeRegistry-DNb0Emjp.js → appThemeRegistry-BlucERDr.js} +1 -1
  16. package/dist/assets/{capgoAdapter-vYSlprFh.js → capgoAdapter-BvTGibVJ.js} +1 -1
  17. package/dist/assets/{fileMentionTouchSelection-BkCvPXYn.js → fileMentionTouchSelection-BLvRkcZy.js} +1 -1
  18. package/dist/assets/{fileReferenceActions-CgsqIeIM.js → fileReferenceActions-ui8464r-.js} +1 -1
  19. package/dist/assets/{gitApi-DdK0IlIM.js → gitApi-DgBiaLFA.js} +1 -1
  20. package/dist/assets/{insertionBoundaries-B28Dk8Dp.js → insertionBoundaries-YFGFUgWP.js} +1 -1
  21. package/dist/assets/{main-hwetTT7m.js → main-BniroGdt.js} +2 -2
  22. package/dist/assets/{main-BqrjAS06.js → main-CdSf07-K.js} +21 -21
  23. package/dist/assets/{mcpQueries-DTbwg6z6.js → mcpQueries-C-nazLvB.js} +1 -1
  24. package/dist/assets/{miniChat-BMNB2ztD.js → miniChat-tsfTW6ta.js} +2 -2
  25. package/dist/assets/{mobile-BdQMBg5f.js → mobile-DKmqw9JK.js} +2 -2
  26. package/dist/assets/{mobileBackNavigation-CaxJVILv.js → mobileBackNavigation-CyumxcRr.js} +1 -1
  27. package/dist/assets/{multirun-CpWGs_sU.js → multirun-oqrPQGWy.js} +1 -1
  28. package/dist/assets/{native-config-BfIzLvxi.js → native-config-Ban8ER0D.js} +1 -1
  29. package/dist/assets/{projectMeta-DZFuF8rn.js → projectMeta-WDYXNks8.js} +1 -1
  30. package/dist/assets/{readiness-CdLdF_Pp.js → readiness-Dp48zAJz.js} +1 -1
  31. package/dist/assets/{renderElectronMiniChatApp-C_MTyWYO.js → renderElectronMiniChatApp-CD4LwiXX.js} +2 -2
  32. package/dist/assets/renderMobileApp-NSBm1xYQ.js +28 -0
  33. package/dist/assets/{runtimeConfig-BA2rxwwc.js → runtimeConfig-CG-Ua9P-.js} +1 -1
  34. package/dist/assets/{runtimeEndpointReset-BxlxF5X2.js → runtimeEndpointReset-BEXrIK9C.js} +4 -4
  35. package/dist/assets/{sessionChangeSummary-2Bt21ayX.js → sessionChangeSummary-BJbopgHT.js} +1 -1
  36. package/dist/assets/{sessionLookup-C1nNfbh0.js → sessionLookup-sLNgV6qV.js} +1 -1
  37. package/dist/assets/{speechSettingsQueries-B6_7YC3O.js → speechSettingsQueries-CHUF4UQ6.js} +1 -1
  38. package/dist/assets/src-DISp5rL3.css +2 -0
  39. package/dist/assets/{types-CfsdaRmC.js → types-BUsGt9HF.js} +1 -1
  40. package/dist/assets/{useAppFontEffects-dB996j53.js → useAppFontEffects-IGLoyUFr.js} +5 -5
  41. package/dist/assets/{useDesktopWindowControlsLayout-DyTyv6Rk.js → useDesktopWindowControlsLayout-DepZ1Abm.js} +1 -1
  42. package/dist/assets/{useEffectiveDirectory-Cxkuxd4u.js → useEffectiveDirectory-Dhn1RiMm.js} +1 -1
  43. package/dist/assets/{useMobileNavigationStore-M61L6rKt.js → useMobileNavigationStore-BPOHzqoM.js} +3 -3
  44. package/dist/assets/{useWorkerHighlightedLines-BjUDrhqD.js → useWorkerHighlightedLines-Cgiz5cUq.js} +1 -1
  45. package/dist/index.html +6 -6
  46. package/dist/mini-chat.html +6 -6
  47. package/dist/mobile.html +6 -6
  48. package/package.json +1 -1
  49. package/server/lib/llm/DOCUMENTATION.md +7 -0
  50. package/server/lib/llm/generate.js +33 -13
  51. package/server/lib/llm/generate.test.js +79 -2
  52. package/dist/assets/renderMobileApp-B-tmvQxg.js +0 -28
  53. package/dist/assets/src-D3pZqEZM.css +0 -2
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./runtime-switch-WzPG6NMR.js";import{n}from"./runtime-fetch-BclMrQHc.js";import{At as r,bt as i}from"./gitApiHttp-BhcxUxqo.js";import{n as a}from"./vendor-react-BP2cRVqX.js";import{s as o}from"./vendor-tanstack-react-query-CdqCAt40.js";import{a as s,o as c}from"./queryRuntime-CpsVmMzy.js";import{fo as l}from"./useMobileNavigationStore-M61L6rKt.js";var u=e({mcpConfigsQueryOptions:()=>v,mcpStatusQueryOptions:()=>y,normalizeMcpDirectory:()=>f,readMcpConfigsSnapshot:()=>S,readMcpStatusSnapshot:()=>C,refreshMcpConfigsQuery:()=>w,refreshMcpStatusQuery:()=>T,resolveMcpConfigQueryDirectory:()=>p,useMcpConfigsQuery:()=>b,useMcpStatusQuery:()=>x}),d=a(),f=e=>{if(typeof e!=`string`)return null;let t=e.trim();if(!t)return null;let n=t.replace(/\\/g,`/`);return n.length>1?n.replace(/\/+$/,``):n},p=()=>{let e=l.getState().getActiveProject?.();return f(e?.path)??f(r.getDirectory())},m=(e,n=t())=>c.mcp.configs(e,n),h=(e,n=t())=>c.mcp.status(e,n),g=e=>e?r.getScopedApiClient(e):r.getApiClient(),_=e=>e?{location:{directory:e}}:void 0,v=(e=p(),r=t())=>{let i=f(e);return{queryKey:m(i,r),queryFn:async({signal:e})=>{let t=i?`?directory=${encodeURIComponent(i)}`:``,r=await n(`/api/config/mcp${t}`,{headers:i?{"x-opencode-directory":i}:void 0,signal:e});if(!r.ok)throw Error(`Failed to load MCP configs`);let a=await r.json();if(!Array.isArray(a))throw Error(`Invalid MCP configs response`);return a},staleTime:5e3,retry:2}},y=(e,n=t())=>{let r=f(e);return{queryKey:h(r,n),queryFn:async()=>{let e=await g(r).mcp.list(_(r));if(!Array.isArray(e.data))throw Error(`v2 mcp.list returned no data`);let t={};for(let n of e.data)n?.name&&(t[n.name]=n.status);return t},staleTime:2e3,retry:1}},b=(e,t)=>{let n=(0,d.c)(9),i;n[0]===t?i=n[1]:(i=t===void 0?{}:t,n[0]=t,n[1]=i);let a=i,s=l(E),c,u;if(n[2]!==s||n[3]!==e){let t=e===void 0?f(s)??f(r.getDirectory()):f(e);u=o,c=v(t),n[2]=s,n[3]=e,n[4]=c,n[5]=u}else c=n[4],u=n[5];let p;return n[6]!==a.enabled||n[7]!==c?(p={...c,enabled:a.enabled},n[6]=a.enabled,n[7]=c,n[8]=p):p=n[8],u(p)},x=(e,t)=>{let n=(0,d.c)(10),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let a=r,s=i(D),c=e===void 0?s:e,l,u,p;if(n[2]!==a.enabled||n[3]!==c){let e=f(c);l=a.enabled!==!1&&!!e,p=o,u=y(e),n[2]=a.enabled,n[3]=c,n[4]=l,n[5]=u,n[6]=p}else l=n[4],u=n[5],p=n[6];let m;return n[7]!==l||n[8]!==u?(m={...u,enabled:l},n[7]=l,n[8]=u,n[9]=m):m=n[9],p(m)},S=(e=s,n=p(),r=t())=>e.getQueryData(m(f(n),r))??[],C=(e=s,n,r=t())=>e.getQueryData(h(f(n),r))??{},w=async(e,n,r)=>{let i=f(n);return t()===r?e.fetchQuery({...v(i,r),staleTime:0}):S(e,i,r)},T=async(e,n,r)=>{let i=f(n);return t()===r?e.fetchQuery({...y(i,r),staleTime:0}):C(e,i,r)};function E(e){return e.getActiveProject?.()?.path??null}function D(e){return e.currentDirectory}export{w as a,b as c,C as i,x as l,f as n,T as o,S as r,p as s,u as t};
1
+ import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./runtime-switch-WzPG6NMR.js";import{n}from"./runtime-fetch-BclMrQHc.js";import{At as r,bt as i}from"./gitApiHttp-BhcxUxqo.js";import{n as a}from"./vendor-react-BP2cRVqX.js";import{s as o}from"./vendor-tanstack-react-query-CdqCAt40.js";import{a as s,o as c}from"./queryRuntime-CpsVmMzy.js";import{fo as l}from"./useMobileNavigationStore-BPOHzqoM.js";var u=e({mcpConfigsQueryOptions:()=>v,mcpStatusQueryOptions:()=>y,normalizeMcpDirectory:()=>f,readMcpConfigsSnapshot:()=>S,readMcpStatusSnapshot:()=>C,refreshMcpConfigsQuery:()=>w,refreshMcpStatusQuery:()=>T,resolveMcpConfigQueryDirectory:()=>p,useMcpConfigsQuery:()=>b,useMcpStatusQuery:()=>x}),d=a(),f=e=>{if(typeof e!=`string`)return null;let t=e.trim();if(!t)return null;let n=t.replace(/\\/g,`/`);return n.length>1?n.replace(/\/+$/,``):n},p=()=>{let e=l.getState().getActiveProject?.();return f(e?.path)??f(r.getDirectory())},m=(e,n=t())=>c.mcp.configs(e,n),h=(e,n=t())=>c.mcp.status(e,n),g=e=>e?r.getScopedApiClient(e):r.getApiClient(),_=e=>e?{location:{directory:e}}:void 0,v=(e=p(),r=t())=>{let i=f(e);return{queryKey:m(i,r),queryFn:async({signal:e})=>{let t=i?`?directory=${encodeURIComponent(i)}`:``,r=await n(`/api/config/mcp${t}`,{headers:i?{"x-opencode-directory":i}:void 0,signal:e});if(!r.ok)throw Error(`Failed to load MCP configs`);let a=await r.json();if(!Array.isArray(a))throw Error(`Invalid MCP configs response`);return a},staleTime:5e3,retry:2}},y=(e,n=t())=>{let r=f(e);return{queryKey:h(r,n),queryFn:async()=>{let e=await g(r).mcp.list(_(r));if(!Array.isArray(e.data))throw Error(`v2 mcp.list returned no data`);let t={};for(let n of e.data)n?.name&&(t[n.name]=n.status);return t},staleTime:2e3,retry:1}},b=(e,t)=>{let n=(0,d.c)(9),i;n[0]===t?i=n[1]:(i=t===void 0?{}:t,n[0]=t,n[1]=i);let a=i,s=l(E),c,u;if(n[2]!==s||n[3]!==e){let t=e===void 0?f(s)??f(r.getDirectory()):f(e);u=o,c=v(t),n[2]=s,n[3]=e,n[4]=c,n[5]=u}else c=n[4],u=n[5];let p;return n[6]!==a.enabled||n[7]!==c?(p={...c,enabled:a.enabled},n[6]=a.enabled,n[7]=c,n[8]=p):p=n[8],u(p)},x=(e,t)=>{let n=(0,d.c)(10),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let a=r,s=i(D),c=e===void 0?s:e,l,u,p;if(n[2]!==a.enabled||n[3]!==c){let e=f(c);l=a.enabled!==!1&&!!e,p=o,u=y(e),n[2]=a.enabled,n[3]=c,n[4]=l,n[5]=u,n[6]=p}else l=n[4],u=n[5],p=n[6];let m;return n[7]!==l||n[8]!==u?(m={...u,enabled:l},n[7]=l,n[8]=u,n[9]=m):m=n[9],p(m)},S=(e=s,n=p(),r=t())=>e.getQueryData(m(f(n),r))??[],C=(e=s,n,r=t())=>e.getQueryData(h(f(n),r))??{},w=async(e,n,r)=>{let i=f(n);return t()===r?e.fetchQuery({...v(i,r),staleTime:0}):S(e,i,r)},T=async(e,n,r)=>{let i=f(n);return t()===r?e.fetchQuery({...y(i,r),staleTime:0}):C(e,i,r)};function E(e){return e.getActiveProject?.()?.path??null}function D(e){return e.currentDirectory}export{w as a,b as c,C as i,x as l,f as n,T as o,S as r,p as s,u as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderElectronMiniChatApp-C_MTyWYO.js","assets/rolldown-runtime-hePW80VL.js","assets/desktop-CfMDfs6c.js","assets/runtime-auth-ef9W7A43.js","assets/runtime-switch-WzPG6NMR.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/vendor-base-ui-CdzJ6My_.js","assets/gitApiHttp-BhcxUxqo.js","assets/runtime-fetch-BclMrQHc.js","assets/reasoning-projection-client-BEhVknv9.js","assets/vendor-zustand-o69pgTEK.js","assets/vendor-opencode-client-fxfj4IA_.js","assets/vendor-effect-DV9F8PTZ.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/useUIStore-DqtgX2FB.js","assets/persistence-Ck0wskDR.js","assets/vendor-react-BP2cRVqX.js","assets/queryRuntime-CpsVmMzy.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/runtime-file-resource-Disaet9c.js","assets/fileQueries-voABZL1r.js","assets/vendor-tanstack-react-query-CdqCAt40.js","assets/runtime-file-store-BVRgEtI-.js","assets/path-utils-jGozTg9d.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/vendor-reactuses-core-BpfIZ1tg.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-CT7WL0lp.js","assets/store-CGMD02tA.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useMobileNavigationStore-M61L6rKt.js","assets/platform-kv0OsX45.js","assets/vendor-sonner-ZS8XIOVl.js","assets/useAssistantUIStore-4a569vpy.js","assets/clipboard-Bj6jZiuP.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/Icon-DofI60x2.js","assets/useAppFontEffects-dB996j53.js","assets/desktopHosts-BEzVZGiW.js","assets/desktopRelayRestore-aNSNYVEB.js","assets/vendor-pierre-diffs-DPBtNDJ5.js","assets/vendor-hast-util-to-html-Bw_SgZ1t.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-BMOrLc9L.js","assets/agentColors-DWSbQXy2.js","assets/dualLimitLru-D8Sphgua.js","assets/AgentAvatar-BeM4lXfE.js","assets/vendor-dicebear-core-CV95S5Pg.js","assets/vendor-dicebear-styles-7lEG-JsF.js","assets/useThemeSystem-8jhE4Zyk.js","assets/dialog-BpsbJk8Y.js","assets/gitApi-DdK0IlIM.js","assets/vendor-simplewebauthn-browser-Dwhcdg_5.js","assets/projectMeta-DZFuF8rn.js","assets/input-D86Oqf3B.js","assets/tooltip-CnIKZ6bg.js","assets/device-BDrEmxBm.js","assets/MobileResizableSheet-CuRgnS-k.js","assets/vendor-framer-motion-DsGBcZHB.js","assets/MobileWindowStack-DGLdgoGr.js","assets/textarea-CMvxcQhR.js","assets/OverlayScrollbar-Bi17Olmj.js","assets/vendor-dnd-kit-core-5pNnzVdw.js","assets/vendor-dnd-kit-accessibility-COSwgjFs.js","assets/vendor-dnd-kit-sortable-Dm50I0m7.js","assets/speechSettingsQueries-B6_7YC3O.js","assets/dropdown-menu.styles-MkqoyFTv.js","assets/YuriLogo-D9cfwLdW.js","assets/image-loading-Bqi69xpy.js","assets/image-loading-D9Z_BASK.css","assets/sessionChangeSummary-2Bt21ayX.js","assets/LoadingImage-DV6Neoja.js","assets/ImageLoadingPlaceholder-7jM-y96Q.js","assets/sessionChangeSummary-CRYRvpy7.css","assets/fileMentionTouchSelection-BkCvPXYn.js","assets/vendor-fuzzysort-ukaRp9PC.js","assets/insertionBoundaries-B28Dk8Dp.js","assets/appThemeRegistry-DNb0Emjp.js","assets/rasterizePng-056Poix7.js","assets/MarkdownRenderer-Qqpr2mPH.js","assets/useEffectiveDirectory-Cxkuxd4u.js","assets/markdownHeightCache-DB_NzPGt.js","assets/url-MRa-FtQa.js","assets/toolHelpers-DL452NVK.js","assets/react-BYRXYlGz.js","assets/FadeInOnReveal-B8BCjwPb.js","assets/useWorkerHighlightedLines-BjUDrhqD.js","assets/vendor-tanstack-react-virtual-B_EO--9t.js","assets/markdownTheme-DHoKvD6O.js","assets/markdown-worker-oBGEB9Eg.js","assets/vendor-cmdk-RDxC-9Iz.js","assets/vendor-aria-hidden-BbL3cEyI.js","assets/sortable-tabs-strip-CSXgXPyP.js","assets/vendor-motion-CIQx6DBb.js","assets/useFontPreferences-BPTEYhfn.js","assets/terminalApi-B_oHorrS.js","assets/useDesktopWindowControlsLayout-DyTyv6Rk.js","assets/src-D3pZqEZM.css"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./runtimeConfig-BA2rxwwc.js";import{o as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";/* empty css */window.__YURI_RUNTIME_APIS__=e(),t(async()=>{let{renderElectronMiniChatApp:e}=await import(`./renderElectronMiniChatApp-C_MTyWYO.js`);return{renderElectronMiniChatApp:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109])).then(({renderElectronMiniChatApp:t})=>{t(window.__YURI_RUNTIME_APIS__??e())});
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderElectronMiniChatApp-CD4LwiXX.js","assets/rolldown-runtime-hePW80VL.js","assets/desktop-CfMDfs6c.js","assets/runtime-auth-ef9W7A43.js","assets/runtime-switch-WzPG6NMR.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/vendor-base-ui-CdzJ6My_.js","assets/gitApiHttp-BhcxUxqo.js","assets/runtime-fetch-BclMrQHc.js","assets/reasoning-projection-client-BEhVknv9.js","assets/vendor-zustand-o69pgTEK.js","assets/vendor-opencode-client-fxfj4IA_.js","assets/vendor-effect-DV9F8PTZ.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/useUIStore-DqtgX2FB.js","assets/persistence-Ck0wskDR.js","assets/vendor-react-BP2cRVqX.js","assets/queryRuntime-CpsVmMzy.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/runtime-file-resource-Disaet9c.js","assets/fileQueries-voABZL1r.js","assets/vendor-tanstack-react-query-CdqCAt40.js","assets/runtime-file-store-BVRgEtI-.js","assets/path-utils-jGozTg9d.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/vendor-reactuses-core-BpfIZ1tg.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-CT7WL0lp.js","assets/store-CGMD02tA.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useMobileNavigationStore-BPOHzqoM.js","assets/platform-kv0OsX45.js","assets/vendor-sonner-ZS8XIOVl.js","assets/useAssistantUIStore-4a569vpy.js","assets/clipboard-Bj6jZiuP.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/Icon-DofI60x2.js","assets/useAppFontEffects-IGLoyUFr.js","assets/desktopHosts-BEzVZGiW.js","assets/desktopRelayRestore-aNSNYVEB.js","assets/vendor-pierre-diffs-DPBtNDJ5.js","assets/vendor-hast-util-to-html-Bw_SgZ1t.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-BMOrLc9L.js","assets/agentColors-DWSbQXy2.js","assets/dualLimitLru-D8Sphgua.js","assets/AgentAvatar-BeM4lXfE.js","assets/vendor-dicebear-core-CV95S5Pg.js","assets/vendor-dicebear-styles-7lEG-JsF.js","assets/useThemeSystem-8jhE4Zyk.js","assets/dialog-BpsbJk8Y.js","assets/gitApi-DgBiaLFA.js","assets/vendor-simplewebauthn-browser-Dwhcdg_5.js","assets/projectMeta-WDYXNks8.js","assets/input-D86Oqf3B.js","assets/tooltip-CnIKZ6bg.js","assets/device-BDrEmxBm.js","assets/MobileResizableSheet-CuRgnS-k.js","assets/vendor-framer-motion-DsGBcZHB.js","assets/MobileWindowStack-DGLdgoGr.js","assets/textarea-CMvxcQhR.js","assets/OverlayScrollbar-Bi17Olmj.js","assets/vendor-dnd-kit-core-5pNnzVdw.js","assets/vendor-dnd-kit-accessibility-COSwgjFs.js","assets/vendor-dnd-kit-sortable-Dm50I0m7.js","assets/speechSettingsQueries-CHUF4UQ6.js","assets/dropdown-menu.styles-MkqoyFTv.js","assets/YuriLogo-D9cfwLdW.js","assets/image-loading-Bqi69xpy.js","assets/image-loading-D9Z_BASK.css","assets/sessionChangeSummary-BJbopgHT.js","assets/LoadingImage-DV6Neoja.js","assets/ImageLoadingPlaceholder-7jM-y96Q.js","assets/sessionChangeSummary-CRYRvpy7.css","assets/fileMentionTouchSelection-BLvRkcZy.js","assets/vendor-fuzzysort-ukaRp9PC.js","assets/insertionBoundaries-YFGFUgWP.js","assets/appThemeRegistry-BlucERDr.js","assets/rasterizePng-056Poix7.js","assets/MarkdownRenderer-Db-If3tk.js","assets/useEffectiveDirectory-Dhn1RiMm.js","assets/markdownHeightCache-DB_NzPGt.js","assets/url-MRa-FtQa.js","assets/toolHelpers-DL452NVK.js","assets/react-BYRXYlGz.js","assets/FadeInOnReveal-B8BCjwPb.js","assets/useWorkerHighlightedLines-Cgiz5cUq.js","assets/vendor-tanstack-react-virtual-B_EO--9t.js","assets/markdownTheme-DHoKvD6O.js","assets/markdown-worker-oBGEB9Eg.js","assets/vendor-cmdk-RDxC-9Iz.js","assets/vendor-aria-hidden-BbL3cEyI.js","assets/sortable-tabs-strip-CSXgXPyP.js","assets/vendor-motion-CIQx6DBb.js","assets/useFontPreferences-BPTEYhfn.js","assets/terminalApi-B_oHorrS.js","assets/useDesktopWindowControlsLayout-DepZ1Abm.js","assets/src-DISp5rL3.css"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./runtimeConfig-CG-Ua9P-.js";import{o as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";/* empty css */window.__YURI_RUNTIME_APIS__=e(),t(async()=>{let{renderElectronMiniChatApp:e}=await import(`./renderElectronMiniChatApp-CD4LwiXX.js`);return{renderElectronMiniChatApp:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109])).then(({renderElectronMiniChatApp:t})=>{t(window.__YURI_RUNTIME_APIS__??e())});
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderMobileApp-B-tmvQxg.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-auth-ef9W7A43.js","assets/runtime-switch-WzPG6NMR.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/vendor-zustand-o69pgTEK.js","assets/vendor-base-ui-CdzJ6My_.js","assets/gitApiHttp-BhcxUxqo.js","assets/runtime-fetch-BclMrQHc.js","assets/reasoning-projection-client-BEhVknv9.js","assets/desktop-CfMDfs6c.js","assets/vendor-opencode-client-fxfj4IA_.js","assets/vendor-effect-DV9F8PTZ.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/useUIStore-DqtgX2FB.js","assets/persistence-Ck0wskDR.js","assets/vendor-react-BP2cRVqX.js","assets/queryRuntime-CpsVmMzy.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/runtime-file-resource-Disaet9c.js","assets/fileQueries-voABZL1r.js","assets/vendor-tanstack-react-query-CdqCAt40.js","assets/runtime-file-store-BVRgEtI-.js","assets/path-utils-jGozTg9d.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/platform-kv0OsX45.js","assets/capgoAdapter-vYSlprFh.js","assets/types-CfsdaRmC.js","assets/vendor-pierre-diffs-DPBtNDJ5.js","assets/vendor-hast-util-to-html-Bw_SgZ1t.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-BMOrLc9L.js","assets/vendor-sonner-ZS8XIOVl.js","assets/vendor-reactuses-core-BpfIZ1tg.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-CT7WL0lp.js","assets/store-CGMD02tA.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/MobileShareBridge-CbmVqEAx.js","assets/MobileDetailNavigation-BaXXR9xC.js","assets/useMobileNavigationStore-M61L6rKt.js","assets/useAssistantUIStore-4a569vpy.js","assets/clipboard-Bj6jZiuP.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/Icon-DofI60x2.js","assets/AgentAvatar-BeM4lXfE.js","assets/agentColors-DWSbQXy2.js","assets/vendor-dicebear-core-CV95S5Pg.js","assets/vendor-dicebear-styles-7lEG-JsF.js","assets/dualLimitLru-D8Sphgua.js","assets/useThemeSystem-8jhE4Zyk.js","assets/dialog-BpsbJk8Y.js","assets/rasterizePng-056Poix7.js","assets/gitApi-DdK0IlIM.js","assets/useAppFontEffects-dB996j53.js","assets/desktopHosts-BEzVZGiW.js","assets/desktopRelayRestore-aNSNYVEB.js","assets/vendor-simplewebauthn-browser-Dwhcdg_5.js","assets/projectMeta-DZFuF8rn.js","assets/input-D86Oqf3B.js","assets/tooltip-CnIKZ6bg.js","assets/device-BDrEmxBm.js","assets/MobileResizableSheet-CuRgnS-k.js","assets/vendor-framer-motion-DsGBcZHB.js","assets/MobileWindowStack-DGLdgoGr.js","assets/textarea-CMvxcQhR.js","assets/OverlayScrollbar-Bi17Olmj.js","assets/vendor-dnd-kit-core-5pNnzVdw.js","assets/vendor-dnd-kit-accessibility-COSwgjFs.js","assets/vendor-dnd-kit-sortable-Dm50I0m7.js","assets/speechSettingsQueries-B6_7YC3O.js","assets/dropdown-menu.styles-MkqoyFTv.js","assets/YuriLogo-D9cfwLdW.js","assets/image-loading-Bqi69xpy.js","assets/image-loading-D9Z_BASK.css","assets/sessionChangeSummary-2Bt21ayX.js","assets/LoadingImage-DV6Neoja.js","assets/ImageLoadingPlaceholder-7jM-y96Q.js","assets/sessionChangeSummary-CRYRvpy7.css","assets/fileMentionTouchSelection-BkCvPXYn.js","assets/vendor-fuzzysort-ukaRp9PC.js","assets/insertionBoundaries-B28Dk8Dp.js","assets/appThemeRegistry-DNb0Emjp.js","assets/MarkdownRenderer-Qqpr2mPH.js","assets/useEffectiveDirectory-Cxkuxd4u.js","assets/markdownHeightCache-DB_NzPGt.js","assets/url-MRa-FtQa.js","assets/toolHelpers-DL452NVK.js","assets/react-BYRXYlGz.js","assets/FadeInOnReveal-B8BCjwPb.js","assets/useWorkerHighlightedLines-BjUDrhqD.js","assets/vendor-tanstack-react-virtual-B_EO--9t.js","assets/markdownTheme-DHoKvD6O.js","assets/markdown-worker-oBGEB9Eg.js","assets/vendor-cmdk-RDxC-9Iz.js","assets/vendor-aria-hidden-BbL3cEyI.js","assets/sortable-tabs-strip-CSXgXPyP.js","assets/vendor-motion-CIQx6DBb.js","assets/useFontPreferences-BPTEYhfn.js","assets/terminalApi-B_oHorrS.js","assets/MobileTabPageHeader-BIAkmiCb.js","assets/vendor-codemirror-autocomplete-7c2L_4dM.js","assets/vendor-codemirror-lang-angular-DXOgWEVj.js","assets/vendor-codemirror-lang-json-mLulNbwB.js","assets/vendor-codemirror-lang-markdown-CV1IO6Qs.js","assets/vendor-codemirror-lang-python-YM2WVLHF.js","assets/vendor-codemirror-legacy-modes-DwltVFbT.js","assets/mcpQueries-DTbwg6z6.js","assets/collapsible-UDWFNcbF.js","assets/vendor-codemirror-commands-B8KrBQ9B.js","assets/vendor-codemirror-search-ZqtrPLjU.js","assets/vendor-replit-codemirror-vim-DDj0dSVY.js","assets/vendor-codemirror-language-data-Ctd4WxgW.js","assets/projectActions-BX0cjZoq.js","assets/runtimeEndpointReset-BxlxF5X2.js","assets/scheduledTaskNavigation-C6FKpwPD.js","assets/mobileBackNavigation-CaxJVILv.js","assets/sessionLookup-C1nNfbh0.js","assets/readiness-CdLdF_Pp.js","assets/native-errors-06if6eu-.js","assets/scheduling-DCTDfxV-.js","assets/download-progress-MobTWf23.js","assets/vendor-cron-parser-BmO80h0C.js","assets/runtimeEndpointReset-HYSytKO-.css","assets/SettingsView-BbzGMK_z.js","assets/native-config-BfIzLvxi.js","assets/GuiPluginWindow-jUuZl9JF.js","assets/vendor-yaml-C9KlJAlj.js","assets/vendor-qrcode-D7jBCyl-.js","assets/vendor-dijkstrajs-BAzPDGZM.js","assets/AssistantView-C67p8xuJ.js","assets/assistant-attachment-cache-Ul88TuFO.js","assets/renderMobileApp-1G4-5u-t.css","assets/src-D3pZqEZM.css"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./runtimeConfig-BA2rxwwc.js";import{o as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";/* empty css */window.__YURI_RUNTIME_APIS__=e(),t(async()=>{let{renderMobileApp:e}=await import(`./renderMobileApp-B-tmvQxg.js`);return{renderMobileApp:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145])).then(({renderMobileApp:t})=>{t(window.__YURI_RUNTIME_APIS__??e())});
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderMobileApp-NSBm1xYQ.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-auth-ef9W7A43.js","assets/runtime-switch-WzPG6NMR.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/vendor-zustand-o69pgTEK.js","assets/vendor-base-ui-CdzJ6My_.js","assets/gitApiHttp-BhcxUxqo.js","assets/runtime-fetch-BclMrQHc.js","assets/reasoning-projection-client-BEhVknv9.js","assets/desktop-CfMDfs6c.js","assets/vendor-opencode-client-fxfj4IA_.js","assets/vendor-effect-DV9F8PTZ.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/useUIStore-DqtgX2FB.js","assets/persistence-Ck0wskDR.js","assets/vendor-react-BP2cRVqX.js","assets/queryRuntime-CpsVmMzy.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/runtime-file-resource-Disaet9c.js","assets/fileQueries-voABZL1r.js","assets/vendor-tanstack-react-query-CdqCAt40.js","assets/runtime-file-store-BVRgEtI-.js","assets/path-utils-jGozTg9d.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/platform-kv0OsX45.js","assets/capgoAdapter-BvTGibVJ.js","assets/types-BUsGt9HF.js","assets/vendor-pierre-diffs-DPBtNDJ5.js","assets/vendor-hast-util-to-html-Bw_SgZ1t.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-BMOrLc9L.js","assets/vendor-sonner-ZS8XIOVl.js","assets/vendor-reactuses-core-BpfIZ1tg.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-CT7WL0lp.js","assets/store-CGMD02tA.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/MobileShareBridge-DM3xAVdm.js","assets/MobileDetailNavigation-9ZlwSUXP.js","assets/useMobileNavigationStore-BPOHzqoM.js","assets/useAssistantUIStore-4a569vpy.js","assets/clipboard-Bj6jZiuP.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/Icon-DofI60x2.js","assets/AgentAvatar-BeM4lXfE.js","assets/agentColors-DWSbQXy2.js","assets/vendor-dicebear-core-CV95S5Pg.js","assets/vendor-dicebear-styles-7lEG-JsF.js","assets/dualLimitLru-D8Sphgua.js","assets/useThemeSystem-8jhE4Zyk.js","assets/dialog-BpsbJk8Y.js","assets/rasterizePng-056Poix7.js","assets/gitApi-DgBiaLFA.js","assets/useAppFontEffects-IGLoyUFr.js","assets/desktopHosts-BEzVZGiW.js","assets/desktopRelayRestore-aNSNYVEB.js","assets/vendor-simplewebauthn-browser-Dwhcdg_5.js","assets/projectMeta-WDYXNks8.js","assets/input-D86Oqf3B.js","assets/tooltip-CnIKZ6bg.js","assets/device-BDrEmxBm.js","assets/MobileResizableSheet-CuRgnS-k.js","assets/vendor-framer-motion-DsGBcZHB.js","assets/MobileWindowStack-DGLdgoGr.js","assets/textarea-CMvxcQhR.js","assets/OverlayScrollbar-Bi17Olmj.js","assets/vendor-dnd-kit-core-5pNnzVdw.js","assets/vendor-dnd-kit-accessibility-COSwgjFs.js","assets/vendor-dnd-kit-sortable-Dm50I0m7.js","assets/speechSettingsQueries-CHUF4UQ6.js","assets/dropdown-menu.styles-MkqoyFTv.js","assets/YuriLogo-D9cfwLdW.js","assets/image-loading-Bqi69xpy.js","assets/image-loading-D9Z_BASK.css","assets/sessionChangeSummary-BJbopgHT.js","assets/LoadingImage-DV6Neoja.js","assets/ImageLoadingPlaceholder-7jM-y96Q.js","assets/sessionChangeSummary-CRYRvpy7.css","assets/fileMentionTouchSelection-BLvRkcZy.js","assets/vendor-fuzzysort-ukaRp9PC.js","assets/insertionBoundaries-YFGFUgWP.js","assets/appThemeRegistry-BlucERDr.js","assets/MarkdownRenderer-Db-If3tk.js","assets/useEffectiveDirectory-Dhn1RiMm.js","assets/markdownHeightCache-DB_NzPGt.js","assets/url-MRa-FtQa.js","assets/toolHelpers-DL452NVK.js","assets/react-BYRXYlGz.js","assets/FadeInOnReveal-B8BCjwPb.js","assets/useWorkerHighlightedLines-Cgiz5cUq.js","assets/vendor-tanstack-react-virtual-B_EO--9t.js","assets/markdownTheme-DHoKvD6O.js","assets/markdown-worker-oBGEB9Eg.js","assets/vendor-cmdk-RDxC-9Iz.js","assets/vendor-aria-hidden-BbL3cEyI.js","assets/sortable-tabs-strip-CSXgXPyP.js","assets/vendor-motion-CIQx6DBb.js","assets/useFontPreferences-BPTEYhfn.js","assets/terminalApi-B_oHorrS.js","assets/MobileTabPageHeader-LVBIRzcs.js","assets/vendor-codemirror-autocomplete-7c2L_4dM.js","assets/vendor-codemirror-lang-angular-DXOgWEVj.js","assets/vendor-codemirror-lang-json-mLulNbwB.js","assets/vendor-codemirror-lang-markdown-CV1IO6Qs.js","assets/vendor-codemirror-lang-python-YM2WVLHF.js","assets/vendor-codemirror-legacy-modes-DwltVFbT.js","assets/mcpQueries-C-nazLvB.js","assets/collapsible-UDWFNcbF.js","assets/vendor-codemirror-commands-B8KrBQ9B.js","assets/vendor-codemirror-search-ZqtrPLjU.js","assets/vendor-replit-codemirror-vim-DDj0dSVY.js","assets/vendor-codemirror-language-data-Ctd4WxgW.js","assets/projectActions-BX0cjZoq.js","assets/runtimeEndpointReset-BEXrIK9C.js","assets/scheduledTaskNavigation-C6FKpwPD.js","assets/mobileBackNavigation-CyumxcRr.js","assets/sessionLookup-sLNgV6qV.js","assets/readiness-Dp48zAJz.js","assets/native-errors-06if6eu-.js","assets/scheduling-DCTDfxV-.js","assets/download-progress-MobTWf23.js","assets/vendor-cron-parser-BmO80h0C.js","assets/runtimeEndpointReset-HYSytKO-.css","assets/SettingsView-NfjqTxIN.js","assets/native-config-Ban8ER0D.js","assets/GuiPluginWindow-jUuZl9JF.js","assets/vendor-yaml-C9KlJAlj.js","assets/vendor-qrcode-D7jBCyl-.js","assets/vendor-dijkstrajs-BAzPDGZM.js","assets/AssistantView-7qr-iEdP.js","assets/assistant-attachment-cache-Ul88TuFO.js","assets/renderMobileApp-1G4-5u-t.css","assets/src-DISp5rL3.css"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./runtimeConfig-CG-Ua9P-.js";import{o as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";/* empty css */window.__YURI_RUNTIME_APIS__=e(),t(async()=>{let{renderMobileApp:e}=await import(`./renderMobileApp-NSBm1xYQ.js`);return{renderMobileApp:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145])).then(({renderMobileApp:t})=>{t(window.__YURI_RUNTIME_APIS__??e())});
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t}from"./vendor-base-ui-CdzJ6My_.js";import{n}from"./vendor-react-BP2cRVqX.js";import{a as r,n as i}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as a}from"./platform-kv0OsX45.js";import{n as o}from"./vendor-reactuses-core-BpfIZ1tg.js";import{i as s}from"./appThemeRegistry-DNb0Emjp.js";var c=n(),l=e(t(),1),u=`__yuriMobileBackRoute`,d=()=>typeof window>`u`||a()?null:{currentState:()=>window.history.state&&typeof window.history.state==`object`?window.history.state:null,pushState:e=>window.history.pushState(e,``,window.location.href),back:()=>window.history.back(),subscribe:e=>{let t=t=>e(t.state&&typeof t.state==`object`?t.state:null);return window.addEventListener(`popstate`,t),()=>window.removeEventListener(`popstate`,t)}},f=e=>{let t=e?.[u];return typeof t==`number`&&Number.isFinite(t)?t:null},p=new class{routes=[];listeners=new Set;nextToken=1;history;removeHistoryListener=null;programmaticHistoryBackToken=null;pendingHistoryRemovals=new Map;animatedBackDriver=null;presentationCancelDriver=null;constructor(e=d()){this.history=e}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getTopRoute=()=>this.routes.at(-1)??null;register=e=>{let t=this.pendingHistoryRemovals.get(e.id);this.pendingHistoryRemovals.delete(e.id);let n=!!(this.history&&t!==void 0&&f(this.history.currentState())===t),r={...e,token:n&&t!==void 0?t:this.nextToken++};this.routes.push(r),this.ensureHistoryListener(),this.history&&!n&&this.history.pushState({...this.history.currentState()??{},[u]:r.token}),this.notify();let i=!0;return()=>{if(!i)return;i=!1;let e=this.routes.indexOf(r);e<0||(this.routes.splice(e,1),this.history&&f(this.history.currentState())===r.token?(this.pendingHistoryRemovals.set(r.id,r.token),queueMicrotask(()=>{if(this.pendingHistoryRemovals.get(r.id)===r.token){if(this.pendingHistoryRemovals.delete(r.id),!this.history||f(this.history.currentState())!==r.token){this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener();return}this.programmaticHistoryBackToken=r.token,this.history.back(),this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener()}})):this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener(),this.notify())}};backImmediately=e=>{let t=this.getTopRoute();return!t||e&&t.layer!==e?!1:t.onBack()!==!1};requestAnimatedBack=e=>{let t=this.getTopRoute();return!t||e&&t.layer!==e?!1:this.animatedBackDriver?.(t)?!0:this.backImmediately(e)};setAnimatedBackDriver=e=>(this.animatedBackDriver=e,()=>{this.animatedBackDriver===e&&(this.animatedBackDriver=null)});setPresentationCancelDriver=e=>(this.presentationCancelDriver=e,()=>{this.presentationCancelDriver===e&&(this.presentationCancelDriver=null)});cancelPresentation=()=>{this.presentationCancelDriver?.()};requestBrowserBack=()=>{let e=this.getTopRoute();return e?this.history&&f(this.history.currentState())===e.token?(this.history.back(),!0):e.onBack()!==!1:!1};ensureHistoryListener(){!this.history||this.removeHistoryListener||(this.removeHistoryListener=this.history.subscribe(e=>{if(this.programmaticHistoryBackToken!==null){this.programmaticHistoryBackToken=null;return}let t=this.getTopRoute();t&&f(e)!==t.token&&t.onBack()===!1&&this.history&&this.history.pushState({...this.history.currentState()??{},[u]:t.token})}))}disposeHistoryListener(){this.removeHistoryListener?.(),this.removeHistoryListener=null,this.programmaticHistoryBackToken=null,this.pendingHistoryRemovals.clear()}notify(){this.listeners.forEach(e=>e())}},m=e=>{let t=(0,c.c)(8),{id:n,active:r,layer:i,onBack:a,surfaceRef:s,underlayRef:u}=e,d=i===void 0?`root`:i,f=o(a),m,h;t[0]!==r||t[1]!==f||t[2]!==n||t[3]!==d||t[4]!==s||t[5]!==u?(m=()=>{if(r)return p.register({id:n,layer:d,onBack:f,getSurface:()=>s.current,getUnderlay:()=>u?.current??null})},h=[r,f,n,d,s,u],t[0]=r,t[1]=f,t[2]=n,t[3]=d,t[4]=s,t[5]=u,t[6]=m,t[7]=h):(m=t[6],h=t[7]),l.useEffect(m,h)},h=r(`YuriNavigation`),g=e=>Math.min(1,Math.max(0,Number.isFinite(e)?e:0)),_=(e,t)=>!e||!t?!1:e.onBack()!==!1,v=e=>{let t=g(e.progress),n=e.commit?1-t:t;if(n<=.001)return 0;let r=Math.max(1,e.viewportWidth??390),i=Math.abs(e.velocityX??0)/r,a=n/Math.max(e.commit?2.4:2.8,i)*1e3,o=e.commit?90:100,s=e.commit?320:260;return Math.round(Math.min(s,Math.max(o,a)))},y=e=>{let{surface:t,underlay:n,surfaceTransition:r,surfaceAnimation:i,underlayTransition:a,underlayAnimation:o}=e;t.style.removeProperty(`transform`),t.style.removeProperty(`opacity`),t.style.removeProperty(`will-change`),t.style.removeProperty(`box-shadow`),t.style.transition=r,t.style.animation=i,n&&(n.style.removeProperty(`transform`),n.style.removeProperty(`opacity`),n.style.removeProperty(`will-change`),n.style.transition=a??``,n.style.animation=o??``)},b=(e,t)=>{let n=g(t),{surface:r}=e;r.style.transform=`translate3d(${n*100}%, 0, 0)`},x=e=>!e.surfaceConnected||e.topRouteToken!==e.routeToken||e.routeSurface!==e.outgoingSurface,S=async(e,t,n,r)=>{if(!r&&typeof e.animate==`function`){let r=e.style.transform||`translate3d(0%, 0, 0)`,i=`translate3d(${t}%, 0, 0)`,a=e.animate([{transform:r},{transform:i}],{duration:n,easing:`cubic-bezier(0.22, 1, 0.36, 1)`,fill:`forwards`}),o=!1;try{await a.finished,o=!0}catch{}finally{o&&(e.style.transform=i),a.cancel()}return}e.style.transform=`translate3d(${t}%, 0, 0)`},C=async(e,t,n=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,r=v({progress:Number.parseFloat(e.style.transform.match(/translate3d\(([-\d.]+)%/)?.[1]??`0`)/100,commit:t}))=>S(e,t?100:0,r,n),w=class{pending=0;enqueue(){this.pending+=1}take(){return this.pending!==0&&(--this.pending,!0)}clear(){this.pending=0}},T=e=>{let t=(0,c.c)(4),{enabled:n,rootRoutesBlocked:r}=e,o,u;t[0]!==n||t[1]!==r?(o=()=>{if(!n||!a()||i.getPlatform()===`web`)return;let e=!1,t=null,o=null,c=0,l=0,u=0,d=new w,f=[],m=e=>!!e&&(!r||e?.layer===`overlay`),x=()=>{let e=m(p.getTopRoute());h.setEnabled({enabled:e}).catch(E)},S=()=>{if(p.cancelPresentation(),o)return;let e=p.getTopRoute();if(!m(e))return;let n=e.getSurface();if(!n)return;n.getAnimations().forEach(D),o=null;let r=e.layer===`root`?e.getUnderlay():null,i=n.style.transition,a=n.style.animation,s=r?.style.transition??null,c=r?.style.animation??null;r?.getAnimations().forEach(O),n.style.transition=`none`,n.style.animation=`none`,n.style.willChange=`transform`,r&&(r.style.removeProperty(`transform`),r.style.removeProperty(`will-change`)),u+=1,t={route:e,surface:n,underlay:r,surfaceTransition:i,surfaceAnimation:a,underlayTransition:s,underlayAnimation:c},b(t,0)},T=e=>{l=g(e),!c&&(c=window.requestAnimationFrame(()=>{c=0,t&&b(t,l)}))},F=k,I=(n,r,i)=>{if(n&&s(),o)return n&&m(p.getTopRoute())?(d.enqueue(),!0):!1;c&&=(window.cancelAnimationFrame(c),0),t||S(),t&&r!==void 0&&b(t,r);let a=t,f=u;if(t=null,!a){if(!n)return!1;let e=p.getTopRoute();return _(e,m(e))}o=a;let h=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1,x=v({progress:g(r??l),commit:n,velocityX:i,viewportWidth:window.innerWidth});return C(a.surface,n,h,x).then(async()=>{f===u&&(!e&&n&&(a.route.onBack(),await F(a)),f===u&&(y(a),o===a&&(o=null),!e&&d.take()&&I(!0,0,0)))}),!0},L=p.setAnimatedBackDriver(e=>e!==p.getTopRoute()||!m(e)?!1:I(!0,0,0)),R=p.subscribe(x);return(async()=>{let t=await h.addListener(`backStarted`,S),n=await h.addListener(`backProgressed`,e=>T(e.progress??0)),r=await h.addListener(`backCancelled`,e=>I(!1,e.progress,e.velocityX)),i=await h.addListener(`backInvoked`,e=>I(!0,e.progress,e.velocityX));if(e){await Promise.all([t.remove(),n.remove(),r.remove(),i.remove()]);return}f.push(t,n,r,i),x()})().catch(A),x(),()=>{e=!0,u+=1,d.clear(),R(),L(),c&&window.cancelAnimationFrame(c),t&&y(t),o&&(o.surface.getAnimations().forEach(j),o.underlay?.getAnimations().forEach(M),y(o)),t=null,o=null,h.setEnabled({enabled:!1}).catch(N),f.forEach(P)}},u=[n,r],t[0]=n,t[1]=r,t[2]=o,t[3]=u):(o=t[2],u=t[3]),l.useEffect(o,u)};function E(){}function D(e){return e.cancel()}function O(e){return e.cancel()}function k(e){return new Promise(t=>{let n=0,r=12,i=!1,a=()=>{i||(i=!0,c(),n&&window.cancelAnimationFrame(n),t())},o=()=>{let t=p.getTopRoute();return x({surfaceConnected:e.surface.isConnected,routeToken:e.route.token,topRouteToken:t?.token??null,routeSurface:e.route.getSurface(),outgoingSurface:e.surface})},s=()=>{if(o()||r<=0){a();return}--r,n=window.requestAnimationFrame(s)},c=p.subscribe(()=>{o()&&a()});s()})}function A(){}function j(e){return e.cancel()}function M(e){return e.cancel()}function N(){}function P(e){e.remove()}export{m as n,T as r,p as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t}from"./vendor-base-ui-CdzJ6My_.js";import{n}from"./vendor-react-BP2cRVqX.js";import{a as r,n as i}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as a}from"./platform-kv0OsX45.js";import{n as o}from"./vendor-reactuses-core-BpfIZ1tg.js";import{i as s}from"./appThemeRegistry-BlucERDr.js";var c=n(),l=e(t(),1),u=`__yuriMobileBackRoute`,d=()=>typeof window>`u`||a()?null:{currentState:()=>window.history.state&&typeof window.history.state==`object`?window.history.state:null,pushState:e=>window.history.pushState(e,``,window.location.href),back:()=>window.history.back(),subscribe:e=>{let t=t=>e(t.state&&typeof t.state==`object`?t.state:null);return window.addEventListener(`popstate`,t),()=>window.removeEventListener(`popstate`,t)}},f=e=>{let t=e?.[u];return typeof t==`number`&&Number.isFinite(t)?t:null},p=new class{routes=[];listeners=new Set;nextToken=1;history;removeHistoryListener=null;programmaticHistoryBackToken=null;pendingHistoryRemovals=new Map;animatedBackDriver=null;presentationCancelDriver=null;constructor(e=d()){this.history=e}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getTopRoute=()=>this.routes.at(-1)??null;register=e=>{let t=this.pendingHistoryRemovals.get(e.id);this.pendingHistoryRemovals.delete(e.id);let n=!!(this.history&&t!==void 0&&f(this.history.currentState())===t),r={...e,token:n&&t!==void 0?t:this.nextToken++};this.routes.push(r),this.ensureHistoryListener(),this.history&&!n&&this.history.pushState({...this.history.currentState()??{},[u]:r.token}),this.notify();let i=!0;return()=>{if(!i)return;i=!1;let e=this.routes.indexOf(r);e<0||(this.routes.splice(e,1),this.history&&f(this.history.currentState())===r.token?(this.pendingHistoryRemovals.set(r.id,r.token),queueMicrotask(()=>{if(this.pendingHistoryRemovals.get(r.id)===r.token){if(this.pendingHistoryRemovals.delete(r.id),!this.history||f(this.history.currentState())!==r.token){this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener();return}this.programmaticHistoryBackToken=r.token,this.history.back(),this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener()}})):this.routes.length===0&&this.pendingHistoryRemovals.size===0&&this.disposeHistoryListener(),this.notify())}};backImmediately=e=>{let t=this.getTopRoute();return!t||e&&t.layer!==e?!1:t.onBack()!==!1};requestAnimatedBack=e=>{let t=this.getTopRoute();return!t||e&&t.layer!==e?!1:this.animatedBackDriver?.(t)?!0:this.backImmediately(e)};setAnimatedBackDriver=e=>(this.animatedBackDriver=e,()=>{this.animatedBackDriver===e&&(this.animatedBackDriver=null)});setPresentationCancelDriver=e=>(this.presentationCancelDriver=e,()=>{this.presentationCancelDriver===e&&(this.presentationCancelDriver=null)});cancelPresentation=()=>{this.presentationCancelDriver?.()};requestBrowserBack=()=>{let e=this.getTopRoute();return e?this.history&&f(this.history.currentState())===e.token?(this.history.back(),!0):e.onBack()!==!1:!1};ensureHistoryListener(){!this.history||this.removeHistoryListener||(this.removeHistoryListener=this.history.subscribe(e=>{if(this.programmaticHistoryBackToken!==null){this.programmaticHistoryBackToken=null;return}let t=this.getTopRoute();t&&f(e)!==t.token&&t.onBack()===!1&&this.history&&this.history.pushState({...this.history.currentState()??{},[u]:t.token})}))}disposeHistoryListener(){this.removeHistoryListener?.(),this.removeHistoryListener=null,this.programmaticHistoryBackToken=null,this.pendingHistoryRemovals.clear()}notify(){this.listeners.forEach(e=>e())}},m=e=>{let t=(0,c.c)(8),{id:n,active:r,layer:i,onBack:a,surfaceRef:s,underlayRef:u}=e,d=i===void 0?`root`:i,f=o(a),m,h;t[0]!==r||t[1]!==f||t[2]!==n||t[3]!==d||t[4]!==s||t[5]!==u?(m=()=>{if(r)return p.register({id:n,layer:d,onBack:f,getSurface:()=>s.current,getUnderlay:()=>u?.current??null})},h=[r,f,n,d,s,u],t[0]=r,t[1]=f,t[2]=n,t[3]=d,t[4]=s,t[5]=u,t[6]=m,t[7]=h):(m=t[6],h=t[7]),l.useEffect(m,h)},h=r(`YuriNavigation`),g=e=>Math.min(1,Math.max(0,Number.isFinite(e)?e:0)),_=(e,t)=>!e||!t?!1:e.onBack()!==!1,v=e=>{let t=g(e.progress),n=e.commit?1-t:t;if(n<=.001)return 0;let r=Math.max(1,e.viewportWidth??390),i=Math.abs(e.velocityX??0)/r,a=n/Math.max(e.commit?2.4:2.8,i)*1e3,o=e.commit?90:100,s=e.commit?320:260;return Math.round(Math.min(s,Math.max(o,a)))},y=e=>{let{surface:t,underlay:n,surfaceTransition:r,surfaceAnimation:i,underlayTransition:a,underlayAnimation:o}=e;t.style.removeProperty(`transform`),t.style.removeProperty(`opacity`),t.style.removeProperty(`will-change`),t.style.removeProperty(`box-shadow`),t.style.transition=r,t.style.animation=i,n&&(n.style.removeProperty(`transform`),n.style.removeProperty(`opacity`),n.style.removeProperty(`will-change`),n.style.transition=a??``,n.style.animation=o??``)},b=(e,t)=>{let n=g(t),{surface:r}=e;r.style.transform=`translate3d(${n*100}%, 0, 0)`},x=e=>!e.surfaceConnected||e.topRouteToken!==e.routeToken||e.routeSurface!==e.outgoingSurface,S=async(e,t,n,r)=>{if(!r&&typeof e.animate==`function`){let r=e.style.transform||`translate3d(0%, 0, 0)`,i=`translate3d(${t}%, 0, 0)`,a=e.animate([{transform:r},{transform:i}],{duration:n,easing:`cubic-bezier(0.22, 1, 0.36, 1)`,fill:`forwards`}),o=!1;try{await a.finished,o=!0}catch{}finally{o&&(e.style.transform=i),a.cancel()}return}e.style.transform=`translate3d(${t}%, 0, 0)`},C=async(e,t,n=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,r=v({progress:Number.parseFloat(e.style.transform.match(/translate3d\(([-\d.]+)%/)?.[1]??`0`)/100,commit:t}))=>S(e,t?100:0,r,n),w=class{pending=0;enqueue(){this.pending+=1}take(){return this.pending!==0&&(--this.pending,!0)}clear(){this.pending=0}},T=e=>{let t=(0,c.c)(4),{enabled:n,rootRoutesBlocked:r}=e,o,u;t[0]!==n||t[1]!==r?(o=()=>{if(!n||!a()||i.getPlatform()===`web`)return;let e=!1,t=null,o=null,c=0,l=0,u=0,d=new w,f=[],m=e=>!!e&&(!r||e?.layer===`overlay`),x=()=>{let e=m(p.getTopRoute());h.setEnabled({enabled:e}).catch(E)},S=()=>{if(p.cancelPresentation(),o)return;let e=p.getTopRoute();if(!m(e))return;let n=e.getSurface();if(!n)return;n.getAnimations().forEach(D),o=null;let r=e.layer===`root`?e.getUnderlay():null,i=n.style.transition,a=n.style.animation,s=r?.style.transition??null,c=r?.style.animation??null;r?.getAnimations().forEach(O),n.style.transition=`none`,n.style.animation=`none`,n.style.willChange=`transform`,r&&(r.style.removeProperty(`transform`),r.style.removeProperty(`will-change`)),u+=1,t={route:e,surface:n,underlay:r,surfaceTransition:i,surfaceAnimation:a,underlayTransition:s,underlayAnimation:c},b(t,0)},T=e=>{l=g(e),!c&&(c=window.requestAnimationFrame(()=>{c=0,t&&b(t,l)}))},F=k,I=(n,r,i)=>{if(n&&s(),o)return n&&m(p.getTopRoute())?(d.enqueue(),!0):!1;c&&=(window.cancelAnimationFrame(c),0),t||S(),t&&r!==void 0&&b(t,r);let a=t,f=u;if(t=null,!a){if(!n)return!1;let e=p.getTopRoute();return _(e,m(e))}o=a;let h=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1,x=v({progress:g(r??l),commit:n,velocityX:i,viewportWidth:window.innerWidth});return C(a.surface,n,h,x).then(async()=>{f===u&&(!e&&n&&(a.route.onBack(),await F(a)),f===u&&(y(a),o===a&&(o=null),!e&&d.take()&&I(!0,0,0)))}),!0},L=p.setAnimatedBackDriver(e=>e!==p.getTopRoute()||!m(e)?!1:I(!0,0,0)),R=p.subscribe(x);return(async()=>{let t=await h.addListener(`backStarted`,S),n=await h.addListener(`backProgressed`,e=>T(e.progress??0)),r=await h.addListener(`backCancelled`,e=>I(!1,e.progress,e.velocityX)),i=await h.addListener(`backInvoked`,e=>I(!0,e.progress,e.velocityX));if(e){await Promise.all([t.remove(),n.remove(),r.remove(),i.remove()]);return}f.push(t,n,r,i),x()})().catch(A),x(),()=>{e=!0,u+=1,d.clear(),R(),L(),c&&window.cancelAnimationFrame(c),t&&y(t),o&&(o.surface.getAnimations().forEach(j),o.underlay?.getAnimations().forEach(M),y(o)),t=null,o=null,h.setEnabled({enabled:!1}).catch(N),f.forEach(P)}},u=[n,r],t[0]=n,t[1]=r,t[2]=o,t[3]=u):(o=t[2],u=t[3]),l.useEffect(o,u)};function E(){}function D(e){return e.cancel()}function O(e){return e.cancel()}function k(e){return new Promise(t=>{let n=0,r=12,i=!1,a=()=>{i||(i=!0,c(),n&&window.cancelAnimationFrame(n),t())},o=()=>{let t=p.getTopRoute();return x({surfaceConnected:e.surface.isConnected,routeToken:e.route.token,topRouteToken:t?.token??null,routeSurface:e.route.getSurface(),outgoingSurface:e.surface})},s=()=>{if(o()||r<=0){a();return}--r,n=window.requestAnimationFrame(s)},c=p.subscribe(()=>{o()&&a()});s()})}function A(){}function j(e){return e.cancel()}function M(e){return e.cancel()}function N(){}function P(e){e.remove()}export{m as n,T as r,p as t};
@@ -1,3 +1,3 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{b as t}from"./desktop-CfMDfs6c.js";import{a as n,r}from"./vendor-zustand-o69pgTEK.js";import{it as i,rt as a}from"./vendor-base-ui-CdzJ6My_.js";import{At as o,Hn as s,In as c,bt as l}from"./gitApiHttp-BhcxUxqo.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{n as u}from"./useUIStore-DqtgX2FB.js";import{n as d}from"./vendor-react-BP2cRVqX.js";import{u as f}from"./fileQueries-voABZL1r.js";import{n as p}from"./vendor-reactuses-core-BpfIZ1tg.js";import{d as m,i as h,r as g,t as _,y as v}from"./button-CT7WL0lp.js";import{Fa as y,La as b,Pr as x,Rr as S,d as C,fo as w,gr as T,nr as E,or as D,rr as O,u as k,wa as A}from"./useMobileNavigationStore-M61L6rKt.js";import{n as j}from"./Icon-DofI60x2.js";import{n as ee}from"./gitApi-DdK0IlIM.js";import{A as M,D as te,O as N,S as ne,_ as re,a as ie,b as ae,f as oe,g as P,h as se,i as ce,m as le,n as F,v as I,x as ue,y as L}from"./projectMeta-DZFuF8rn.js";import{t as R}from"./input-D86Oqf3B.js";import{i as z,n as B,t as V}from"./tooltip-CnIKZ6bg.js";import{a as de}from"./device-BDrEmxBm.js";import{D as H,a as U,b as W,c as G,f as K,h as q,l as J,o as Y,p as X,r as fe,w as pe,y as me}from"./insertionBoundaries-B28Dk8Dp.js";import{r as he,t as ge}from"./textarea-CMvxcQhR.js";import{n as _e,r as ve,t as ye}from"./collapsible-UDWFNcbF.js";var Z=e(i(),1),be=d(),xe=/^[a-z0-9](?:[a-z0-9-]{0,48}[a-z0-9])?$/,Se=/^g[1-9]\d*$/,Q=(e,t,n,r,i)=>{if(!xe.test(e)||t!==void 0&&!Se.test(t)||!n?.trim()||!r?.trim()||n!==n.trim()||r!==r.trim())return null;if(i===void 0)return{groupSlug:e,runGroup:t,providerID:n,modelID:r,fusion:!1};if(i===`fusion`)return{groupSlug:e,runGroup:t,providerID:n,modelID:r,fusion:!0};if(!/^\d+$/.test(i))return null;let a=Number.parseInt(i,10);return!Number.isSafeInteger(a)||a<=0?null:{groupSlug:e,runGroup:t,providerID:n,modelID:r,index:a,fusion:!1}},Ce=e=>{if(!e)return null;let t=e.split(`/`);if(t.length<3||t.length>5)return null;let[n]=t;if(t.length===3)return Q(n,void 0,t[1],t[2],void 0);if(t.length===4){let[,e,r,i]=t;return Se.test(e)?Q(n,e,r,i,void 0):Q(n,void 0,e,r,i)}let[,r,i,a,o]=t;return r===``?Q(n,void 0,i,a,o):Q(n,r,i,a,o)},we=e=>{let t=[e.groupSlug];return e.runGroup&&t.push(e.runGroup),t.push(e.providerID,e.modelID),e.index!==void 0&&t.push(String(e.index)),t.join(`/`)},Te=(e,t,n,r)=>{let i=[e];return r&&i.push(r),i.push(t,n,`fusion`),i.join(`/`)},Ee=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).substring(0,50),De=(e,t)=>`${Ee(e)}-${Ee(t)}`.substring(0,60),Oe=(e,t)=>`${e}/${t}`,ke=e=>{let t=e.replace(/\\/g,`/`);return t===`/`?`/`:t.length>1?t.replace(/\/+$/,``):t},Ae=(e,t)=>{let n=ke(t),r=e.directory,i=typeof r==`string`&&r.trim().length>0?e:{...e,directory:n};s(e.id,n),C.getState().markSessionAsYuriCreated(e.id),x.getState().upsertSession(i);try{c().ensureChild(n,{bootstrap:!1}).setState(t=>{let n=t.session.findIndex(t=>t.id===e.id);if(n>=0&&t.session[n]===i)return t;let r=n>=0?t.session.map((e,t)=>t===n?i:e):[...t.session,i].sort((e,t)=>e.id.localeCompare(t.id));return{session:r,sessionTotal:Math.max(t.sessionTotal,r.length),limit:Math.max(t.limit,r.length)}})}catch{}return i},je=()=>{let e=w.getState(),t=e.activeProjectId;if(!t)return null;let n=e.projects.find(e=>e.id===t);if(n?.path)return{id:n.id,path:n.path};let r=l.getState().currentDirectory??null;if(r&&r.trim().length>0){let e=r.replace(/\\/g,`/`).replace(/\/+$/,``)||r;return{id:`path:${e}`,path:e}}return null},Me=n()(r(e=>({isLoading:!1,error:null,createMultiRun:async t=>{let n=t.name.trim(),{groups:r,agent:i,files:a,setupCommands:s}=t;if(!n)return e({error:`Group name is required`}),null;if(!r||r.length===0)return e({error:`At least one run group is required`}),null;for(let t=0;t<r.length;t++){if(!r[t].prompt.trim())return e({error:`Group ${t+1}: prompt is required`}),null;if(r[t].models.length<1)return e({error:`Group ${t+1}: select at least 1 model`}),null;if(r[t].models.length>5)return e({error:`Group ${t+1}: maximum 5 models allowed`}),null}e({isLoading:!0,error:null});try{let c=je();if(!c)return e({error:`Select a project`,isLoading:!1}),null;let l=c.path,u=await ee(l)&&t.isolateRuns!==!1,d=Ee(n),f=u?await oe(l):void 0,p=u?await J(l):null,m=[],h=s?.filter(e=>e.trim().length>0)??[];for(let e=0;e<r.length;e++){let n=r[e],i=n.prompt,a=new Map;for(let e of n.models){let t=`${e.providerID}:${e.modelID}`;a.set(t,(a.get(t)||0)+1)}let s=new Map;for(let g of n.models){let n=`${g.providerID}:${g.modelID}`,_=a.get(n)||1,v=(s.get(n)||0)+1;s.set(n,v);let y=De(g.providerID,g.modelID),b=r.length>1?`g${e+1}`:void 0,x=_>1?Oe(d,`${y}/${v}`):Oe(d,y),S=b?`${b}/${x}`:x,w=we({groupSlug:d,runGroup:b,providerID:g.providerID,modelID:g.modelID,index:_>1?v:void 0});try{if(!u){let e=await o.withDirectory(l,()=>o.createSession({title:w}));Ae(e,l),m.push({sessionId:e.id,worktreePath:l,providerID:g.providerID,modelID:g.modelID,variant:g.variant,prompt:i});continue}let e=await G(c,{preferredName:S,mode:`new`,branchName:S,worktreeName:S,startRef:t.worktreeBaseBranch||`HEAD`,setupCommands:h,returnAfterDirectoryCreated:!0},{resolvedRootTrackingRemote:p}),n={...e,createdFromBranch:f,kind:`standard`};await O(c)&&await T(e.path);let r=await o.withDirectory(e.path,()=>o.createSession({title:w}));Ae(r,e.path),C.getState().setWorktreeMetadata(r.id,n),m.push({sessionId:r.id,worktreePath:e.path,providerID:g.providerID,modelID:g.modelID,variant:g.variant,prompt:i})}catch(e){console.warn(`[MultiRun] Failed to create session:`,e)}}}let g=s?.filter(e=>e.trim().length>0)??[];g.length>0&&D(c,g).catch(()=>{console.warn(`[MultiRun] Failed to save worktree setup commands`)});let _=m.map(e=>e.sessionId),v=m[0]?.sessionId??null;if(_.length===0)return e({error:`Failed to create any sessions`,isLoading:!1}),null;let y=a?.map(e=>({type:`file`,mime:e.mime,filename:e.filename,url:e.url}));return(async()=>{try{await Promise.allSettled(m.map(async e=>{try{await k({sessionId:e.sessionId,directory:e.worktreePath,content:e.prompt,providerID:e.providerID,modelID:e.modelID,variant:e.variant,agent:i,files:y})}catch(e){console.warn(`[MultiRun] Failed to start run:`,e)}}))}catch(e){console.warn(`[MultiRun] Failed to start runs:`,e)}})(),e({isLoading:!1}),{groupSlug:d,sessionIds:_,firstSessionId:v}}catch(t){return e({error:t instanceof Error?t.message:`Failed to create Multi-Run`,isLoading:!1}),null}},clearError:()=>{e({error:null})}}),{name:`multirun-store`})),$=a(),Ne=`h-7`,Pe=()=>`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Fe=e=>{let t=(0,be.c)(13),{model:n,instanceIndex:r,totalSameModel:i,onRemove:a}=e,o=n.displayName||`${n.providerID}/${n.modelID}`,s=i>1?`${o} (${r})`:o,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=g(`flex items-center gap-1.5 px-2 rounded-md bg-interactive-selection/20 border border-border/30`,Ne),t[0]=c):c=t[0];let l;t[1]!==n.modelID||t[2]!==n.providerID?(l=(0,$.jsx)(N,{modelId:n.modelID,providerId:n.providerID,className:`h-3.5 w-3.5`}),t[1]=n.modelID,t[2]=n.providerID,t[3]=l):l=t[3];let u;t[4]===s?u=t[5]:(u=(0,$.jsx)(`span`,{className:`typography-meta font-medium truncate max-w-[140px]`,children:s}),t[4]=s,t[5]=u);let d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(j,{name:`close`,className:`h-3.5 w-3.5`}),t[6]=d):d=t[6];let f;t[7]===a?f=t[8]:(f=(0,$.jsx)(`button`,{type:`button`,onClick:a,className:`text-muted-foreground hover:text-foreground ml-0.5`,children:d}),t[7]=a,t[8]=f);let p;return t[9]!==l||t[10]!==u||t[11]!==f?(p=(0,$.jsxs)(`div`,{className:c,children:[l,u,f]}),t[9]=l,t[10]=u,t[11]=f,t[12]=p):p=t[12],p},Ie=e=>{let t=(0,be.c)(131),{selectedModels:n,onAdd:r,onRemove:i,onUpdate:a,minModels:o,addButtonLabel:s,showChips:c,maxModels:l,addButtonClassName:d,dropdownSide:f,dropdownClassName:p,containerClassName:h,triggerIcon:v}=e,y=c===void 0||c,x=f===void 0?`top`:f,{t:S}=m(),C=A(Le),w=A(Re),T=u(ze),E=u(Be),{favoriteModelsList:D,recentModelsList:O}=te(),k=u(Ve),ee=u(He),[M,N]=Z.useState(!1),[ie,oe]=Z.useState(``),[P,ce]=Z.useState(null),F=Z.useRef(null),I=Z.useRef(null),L=l===1,R=l===void 0||n.length<l||L,z;if(t[0]!==n){z=new Map;for(let e of n){let t=`${e.providerID}:${e.modelID}`;z.set(t,(z.get(t)||0)+1)}t[0]=n,t[1]=z}else z=t[1];let B=z,V;t[2]===n?V=t[3]:(V=e=>n.filter(t=>t.providerID===e.providerID&&t.modelID===e.modelID).findIndex(t=>t.instanceId===e.instanceId)+1,t[2]=n,t[3]=V);let de=V,H,U;t[4]!==x||t[5]!==M?(H=()=>{if(!M||!I.current)return;let e=I.current.getBoundingClientRect();if(x===`bottom`){let t=(window.visualViewport?.height??document.documentElement.clientHeight??window.innerHeight)-e.bottom-16-112;ce(Math.max(160,Math.min(320,t)));return}let t=I.current.parentElement;for(;t&&!(t.getAttribute(`role`)===`dialog`||t.hasAttribute(`data-scroll-shadow`));){let e=getComputedStyle(t);if(e.overflow===`auto`||e.overflow===`hidden`||e.overflowY===`auto`||e.overflowY===`hidden`)break;t=t.parentElement}let n=t?t.getBoundingClientRect().top:0,r=e.top-n-16;ce(Math.max(150,Math.min(300,r)))},U=[x,M],t[4]=x,t[5]=M,t[6]=H,t[7]=U):(H=t[6],U=t[7]),Z.useEffect(H,U);let W,G;t[8]!==R||t[9]!==M?(W=()=>{!R&&M&&(N(!1),oe(``))},G=[R,M],t[8]=R,t[9]=M,t[10]=W,t[11]=G):(W=t[10],G=t[11]),Z.useEffect(W,G);let K,q;t[12]===M?(K=t[13],q=t[14]):(K=()=>{if(!M)return;let e=e=>{F.current&&!F.current.contains(e.target)&&(N(!1),oe(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},q=[M],t[12]=M,t[13]=K,t[14]=q),Z.useEffect(K,q);let J;t[15]!==L||t[16]!==r||t[17]!==a||t[18]!==n.length?(J=e=>{let t={providerID:e.providerID,modelID:e.modelID,displayName:b(e.model,e.modelID)||e.modelID,instanceId:Pe()};L&&n.length>0&&a?a(0,t):r(t),L&&(N(!1),oe(``))},t[15]=L,t[16]=r,t[17]=a,t[18]=n.length,t[19]=J):J=t[19];let Y=J,X;t[20]===S?X=t[21]:(X=S(`multirun.modelMultiSelect.search.placeholder`),t[20]=S,t[21]=X);let fe;t[22]===S?fe=t[23]:(fe=S(`multirun.modelMultiSelect.search.noResults`),t[22]=S,t[23]=fe);let pe;t[24]===S?pe=t[25]:(pe=S(`multirun.modelMultiSelect.sections.favorites`),t[24]=S,t[25]=pe);let me;t[26]===S?me=t[27]:(me=S(`multirun.modelMultiSelect.sections.recent`),t[26]=S,t[27]=me);let he;t[28]===S?he=t[29]:(he=S(`multirun.modelMultiSelect.keyboard.hint`),t[28]=S,t[29]=he);let ge;t[30]===S?ge=t[31]:(ge=S(`settings.agents.modelSelector.actions.favorite`),t[30]=S,t[31]=ge);let _e;t[32]===S?_e=t[33]:(_e=S(`settings.agents.modelSelector.actions.unfavorite`),t[32]=S,t[33]=_e);let ve;t[34]===S?ve=t[35]:(ve=S(`chat.modelControls.provider`),t[34]=S,t[35]=ve);let ye;t[36]===S?ye=t[37]:(ye=S(`chat.modelControls.capabilities`),t[36]=S,t[37]=ye);let xe;t[38]===S?xe=t[39]:(xe=S(`chat.modelControls.capability.toolCalling`),t[38]=S,t[39]=xe);let Se;t[40]===S?Se=t[41]:(Se=S(`chat.modelControls.capability.reasoning`),t[40]=S,t[41]=Se);let Q;t[42]===S?Q=t[43]:(Q=S(`chat.modelControls.modality.image`),t[42]=S,t[43]=Q);let Ce;t[44]===S?Ce=t[45]:(Ce=S(`chat.modelControls.modality.video`),t[44]=S,t[45]=Ce);let we;t[46]===S?we=t[47]:(we=S(`chat.modelControls.modality.audio`),t[46]=S,t[47]=we);let Te;t[48]===S?Te=t[49]:(Te=S(`chat.modelControls.costPerMillion`),t[48]=S,t[49]=Te);let Ee;t[50]===S?Ee=t[51]:(Ee=S(`chat.modelControls.costInput`),t[50]=S,t[51]=Ee);let De;t[52]===S?De=t[53]:(De=S(`chat.modelControls.costOutput`),t[52]=S,t[53]=De);let Oe;t[54]!==X||t[55]!==fe||t[56]!==pe||t[57]!==me||t[58]!==he||t[59]!==ge||t[60]!==_e||t[61]!==ve||t[62]!==ye||t[63]!==xe||t[64]!==Se||t[65]!==Q||t[66]!==Ce||t[67]!==we||t[68]!==Te||t[69]!==Ee||t[70]!==De?(Oe={searchPlaceholder:X,noResults:fe,favorites:pe,recent:me,keyboardHint:he,favorite:ge,unfavorite:_e,provider:ve,capabilities:ye,capabilityToolCalling:xe,capabilityReasoning:Se,modalityImage:Q,modalityVideo:Ce,modalityAudio:we,costPerMillion:Te,costInput:Ee,costOutput:De},t[54]=X,t[55]=fe,t[56]=pe,t[57]=me,t[58]=he,t[59]=ge,t[60]=_e,t[61]=ve,t[62]=ye,t[63]=xe,t[64]=Se,t[65]=Q,t[66]=Ce,t[67]=we,t[68]=Te,t[69]=Ee,t[70]=De,t[71]=Oe):Oe=t[71];let ke=Oe,Ae;t[72]===h?Ae=t[73]:(Ae=g(`relative`,h),t[72]=h,t[73]=Ae);let je;t[74]===d?je=t[75]:(je=g(Ne,`!border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70`,d),t[74]=d,t[75]=je);let Me=!R,Ie;t[76]===M?Ie=t[77]:(Ie=()=>{N(!M)},t[76]=M,t[77]=Ie);let We;t[78]===v?We=t[79]:(We=v??(0,$.jsx)(j,{name:`add`,className:`h-3.5 w-3.5 mr-1`}),t[78]=v,t[79]=We);let Ge;t[80]!==s||t[81]!==S?(Ge=s??S(`multirun.modelMultiSelect.actions.addModel`),t[80]=s,t[81]=S,t[82]=Ge):Ge=t[82];let Ke;t[83]!==je||t[84]!==Me||t[85]!==Ie||t[86]!==We||t[87]!==Ge?(Ke=(0,$.jsxs)(_,{ref:I,type:`button`,variant:`outline`,size:`sm`,className:je,disabled:Me,onClick:Ie,children:[We,Ge]}),t[83]=je,t[84]=Me,t[85]=Ie,t[86]=We,t[87]=Ge,t[88]=Ke):Ke=t[88];let qe;t[89]!==P||t[90]!==R||t[91]!==p||t[92]!==x||t[93]!==D||t[94]!==w||t[95]!==Y||t[96]!==k||t[97]!==E||t[98]!==M||t[99]!==ke||t[100]!==B||t[101]!==ee||t[102]!==C||t[103]!==O||t[104]!==ie||t[105]!==T?(qe=M?(0,$.jsx)(`div`,{className:g(`absolute left-0 z-50 w-[min(420px,calc(100vw-2rem))] max-w-[calc(100vw-2rem)] flex flex-col overflow-hidden rounded-xl border border-border/50 shadow-lg`,x===`top`?`bottom-full mb-1`:`top-full mt-1`,p),style:{background:`linear-gradient(var(--surface-elevated),var(--surface-elevated)),linear-gradient(var(--surface-background),var(--surface-background))`},children:(0,$.jsx)(ne,{providers:C,providerOrder:ee,favoriteModels:D,recentModels:O,getMetadata:w,hiddenModels:k,searchQuery:ie,onSearchQueryChange:oe,onSelect:Y,labels:ke,selectionCount:e=>B.get(`${e.providerID}:${e.modelID}`)||0,disabled:!R,maxHeightClassName:`flex-1`,maxHeightStyle:{maxHeight:P?`${P}px`:`300px`},stickyHeaders:!0,tooltipsEnabled:M,isFavorite:e=>E(e.providerID,e.modelID),onToggleFavorite:e=>T(e.providerID,e.modelID),onEscape:()=>{N(!1),oe(``)}})}):null,t[89]=P,t[90]=R,t[91]=p,t[92]=x,t[93]=D,t[94]=w,t[95]=Y,t[96]=k,t[97]=E,t[98]=M,t[99]=ke,t[100]=B,t[101]=ee,t[102]=C,t[103]=O,t[104]=ie,t[105]=T,t[106]=qe):qe=t[106];let Je;t[107]!==Ae||t[108]!==Ke||t[109]!==qe?(Je=(0,$.jsxs)(`div`,{className:Ae,ref:F,children:[Ke,qe]}),t[107]=Ae,t[108]=Ke,t[109]=qe,t[110]=Je):Je=t[110];let Ye;t[111]!==de||t[112]!==B||t[113]!==i||t[114]!==a||t[115]!==C||t[116]!==n||t[117]!==y||t[118]!==S?(Ye=y&&n.length>0&&(0,$.jsx)(`div`,{className:`flex flex-col gap-2 w-full`,children:n.map((e,t)=>{let n=`${e.providerID}:${e.modelID}`,r=B.get(n)||1,o=de(e),s=C.find(t=>t.id===e.providerID)?.models?.find(t=>t.id===e.modelID),c=s?.variants?Object.keys(s.variants):[],l=c.length>0,u=e.variant??`__default__`;return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,$.jsx)(Fe,{model:e,instanceIndex:o,totalSameModel:r,onRemove:()=>i(t)}),l&&(0,$.jsxs)(le,{value:u,onValueChange:n=>{if(!a)return;let r=n===`__default__`?void 0:n;a(t,{...e,variant:r})},children:[(0,$.jsxs)(ae,{size:`chip`,className:`px-2 gap-1.5 rounded-md !border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70 typography-meta font-medium text-foreground`,children:[(0,$.jsx)(j,{name:`brain-ai-3`,className:g(`h-3.5 w-3.5 flex-shrink-0`,u===`__default__`?`text-muted-foreground`:`text-[color:var(--status-info)]`)}),(0,$.jsx)(ue,{placeholder:S(`multirun.modelMultiSelect.variant.placeholder`),children:e=>e===`__default__`?S(`multirun.modelMultiSelect.variant.default`):e})]}),(0,$.jsxs)(se,{fitContent:!0,children:[(0,$.jsx)(re,{value:`__default__`,className:`pr-2 [&>span:first-child]:hidden`,children:S(`multirun.modelMultiSelect.variant.default`)}),c.map(Ue)]})]})]},e.instanceId)})}),t[111]=de,t[112]=B,t[113]=i,t[114]=a,t[115]=C,t[116]=n,t[117]=y,t[118]=S,t[119]=Ye):Ye=t[119];let Xe;t[120]!==Je||t[121]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 items-center`,children:[Je,Ye]}),t[120]=Je,t[121]=Ye,t[122]=Xe):Xe=t[122];let Ze;t[123]!==l||t[124]!==o||t[125]!==n.length||t[126]!==S?(Ze=o!==void 0&&n.length<o&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground`,children:l===void 0?S(`multirun.modelMultiSelect.validation.minOnly`,{min:o}):S(`multirun.modelMultiSelect.validation.minToMax`,{min:o,max:l})}),t[123]=l,t[124]=o,t[125]=n.length,t[126]=S,t[127]=Ze):Ze=t[127];let Qe;return t[128]!==Xe||t[129]!==Ze?(Qe=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[Xe,Ze]}),t[128]=Xe,t[129]=Ze,t[130]=Qe):Qe=t[130],Qe};function Le(e){return e.providers}function Re(e){return e.getModelMetadata}function ze(e){return e.toggleFavoriteModel}function Be(e){return e.isFavoriteModel}function Ve(e){return e.hiddenModels}function He(e){return e.providerOrder}function Ue(e){return(0,$.jsx)(re,{value:e,className:`pr-2 [&>span:first-child]:hidden`,children:e},e)}function We(e){let t=(0,be.c)(30),{git:n}=f(),r=K(e),i=W(e),a=q(e),o=X(e),s=me(Ye),c=me(Je),l,u;t[0]!==e||t[1]!==c||t[2]!==n||t[3]!==i||t[4]!==a?(l=()=>{!e||!n||i!==null||a||c(e,n,{silent:!0})},u=[e,n,c,i,a],t[0]=e,t[1]=c,t[2]=n,t[3]=i,t[4]=a,t[5]=l,t[6]=u):(l=t[5],u=t[6]),Z.useEffect(l,u);let d;t[7]!==r?.all||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==i?(d=()=>{!e||!n||i===!0&&(r?.all||s(e,n))},t[7]=r?.all,t[8]=e,t[9]=s,t[10]=n,t[11]=i,t[12]=d):d=t[12];let p=r?.all,m;t[13]!==e||t[14]!==s||t[15]!==n||t[16]!==i||t[17]!==p?(m=[e,n,i,p,s],t[13]=e,t[14]=s,t[15]=n,t[16]=i,t[17]=p,t[18]=m):m=t[18],Z.useEffect(d,m);let h=a||i===!0&&o,g;bb0:{if(!r?.all){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[19]=e):e=t[19],g=e;break bb0}let e;t[20]===r.all?e=t[21]:(e=r.all.filter(qe).sort(),t[20]=r.all,t[21]=e),g=e}let _=g,v;bb1:{if(!r?.all){let e;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[22]=e):e=t[22],v=e;break bb1}let e;t[23]===r.all?e=t[24]:(e=r.all.filter(Ke).map(Ge).sort(),t[23]=r.all,t[24]=e),v=e}let y=v,b;bb2:{if(!e){b=null;break bb2}if(i!==null){b=i;break bb2}if(h){b=null;break bb2}b=r?.all?!0:null}let x=b,S;return t[25]!==x||t[26]!==h||t[27]!==_||t[28]!==y?(S={localBranches:_,remoteBranches:y,isLoading:h,isGitRepository:x},t[25]=x,t[26]=h,t[27]=_,t[28]=y,t[29]=S):S=t[29],S}function Ge(e){return e.replace(/^remotes\//,``)}function Ke(e){return e.startsWith(`remotes/`)}function qe(e){return!e.startsWith(`remotes/`)}function Je(e){return e.fetchStatus}function Ye(e){return e.fetchBranches}var Xe=({directory:e,value:t,onChange:n,className:r,disabled:i,id:a})=>{let{t:o}=m(),{localBranches:s,remoteBranches:c,isLoading:l,isGitRepository:u}=We(e),d=Z.useMemo(()=>[...s,...c.map(e=>`remotes/${e}`)],[s,c]);return Z.useEffect(()=>{if(i||l||d.length===0||t&&d.includes(t))return;let r=t,a=!1;return(async()=>{try{let t=e?await oe(e).catch(()=>null):null;if(a)return;let i=localStorage.getItem(U),{sourceBranch:o,shouldClearSavedSourceBranch:s}=Y({branches:d,savedSourceBranch:i,rootBranch:t});if(s&&localStorage.removeItem(U),a||r&&d.includes(r))return;o&&n(o)}catch{}})(),()=>{a=!0}},[d,e,i,l,n,t]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(le,{value:t,onValueChange:n,disabled:i||!u||l,children:[(0,$.jsx)(ae,{id:a,size:`lg`,className:r??`w-fit typography-meta text-foreground`,children:(0,$.jsx)(ue,{placeholder:o(l?`multiRun.branchSelector.status.loadingBranches`:`multiRun.branchSelector.placeholder.selectSourceBranch`)})}),(0,$.jsx)(se,{className:`max-h-[280px] max-w-[320px]`,children:l?(0,$.jsx)(`div`,{className:`px-2 py-4 text-center typography-meta text-muted-foreground`,children:o(`multiRun.branchSelector.status.loadingBranches`)}):s.length===0&&c.length===0?(0,$.jsx)(`div`,{className:`px-2 py-4 text-center typography-meta text-muted-foreground`,children:o(`multiRun.branchSelector.status.noBranchesFound`)}):(0,$.jsxs)($.Fragment,{children:[s.length>0&&(0,$.jsxs)(P,{children:[(0,$.jsx)(I,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.localBranches`)}),s.map(e=>(0,$.jsx)(re,{value:e,className:`whitespace-normal break-all`,children:e},e))]}),s.length>0&&c.length>0&&(0,$.jsx)(L,{}),c.length>0&&(0,$.jsxs)(P,{children:[(0,$.jsx)(I,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.remoteBranches`)}),c.map(e=>(0,$.jsx)(re,{value:`remotes/${e}`,className:`whitespace-normal break-all`,children:e},`remotes/${e}`))]})]})})]}),u===!1&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground/70 mt-2`,children:o(`multiRun.branchSelector.status.notInGitRepository`)})]})},Ze=e=>{let t=(0,be.c)(36),{value:n,onChange:r,className:i,disabled:a,id:o,portalToBody:s}=e,{t:c}=m(),l=A(Qe),u=A($e),d=A(et),f;t[0]===l?f=t[1]:(f=l(),t[0]=l,t[1]=f);let p=f,h;t[2]===p?h=t[3]:(h=p.filter(tt),t[2]=p,t[3]=h);let _=h,v,y;t[4]!==p.length||t[5]!==u?(v=()=>{p.length===0&&u()},y=[p.length,u],t[4]=p.length,t[5]=u,t[6]=v,t[7]=y):(v=t[6],y=t[7]),Z.useEffect(v,y);let b,x;t[8]!==d||t[9]!==a||t[10]!==r||t[11]!==_||t[12]!==n?(b=()=>{if(a)return;let e=n.trim();if(e.length>0&&_.some(t=>t.name===e))return;let t=typeof d==`string`&&d.trim().length>0?d.trim():null;if(t&&_.some(e=>e.name===t)){r(t);return}let i=_[0]?.name;i&&r(i)},x=[d,a,r,_,n],t[8]=d,t[9]=a,t[10]=r,t[11]=_,t[12]=n,t[13]=b,t[14]=x):(b=t[13],x=t[14]),Z.useEffect(b,x);let S=n.trim().length>0?n:void 0,C;t[15]===i?C=t[16]:(C=g(`max-w-full typography-meta text-foreground !border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70 data-[popup-open]:!bg-[var(--interactive-active)]/70`,i),t[15]=i,t[16]=C);let w;t[17]===c?w=t[18]:(w=c(`multirun.agentSelector.placeholder`),t[17]=c,t[18]=w);let T;t[19]===w?T=t[20]:(T=(0,$.jsx)(ue,{placeholder:w}),t[19]=w,t[20]=T);let E;t[21]!==o||t[22]!==C||t[23]!==T?(E=(0,$.jsx)(ae,{id:o,size:`lg`,className:C,children:T}),t[21]=o,t[22]=C,t[23]=T,t[24]=E):E=t[24];let D;t[25]===_?D=t[26]:(D=_.length>0&&(0,$.jsx)(P,{children:_.map(nt)}),t[25]=_,t[26]=D);let O;t[27]!==s||t[28]!==D?(O=(0,$.jsx)(se,{fitContent:!0,portalToBody:s,children:D}),t[27]=s,t[28]=D,t[29]=O):O=t[29];let k;return t[30]!==a||t[31]!==r||t[32]!==S||t[33]!==E||t[34]!==O?(k=(0,$.jsxs)(le,{value:S,onValueChange:r,disabled:a,children:[E,O]}),t[30]=a,t[31]=r,t[32]=S,t[33]=E,t[34]=O,t[35]=k):k=t[35],k};function Qe(e){return e.getVisibleAgents}function $e(e){return e.loadAgents}function et(e){return e.currentAgentName}function tt(e){return y(e.mode)}function nt(e){return(0,$.jsx)(re,{value:e.name,className:`w-auto whitespace-nowrap`,children:e.name},e.name)}var rt=10485760,it=5,at=e=>{let t=(0,be.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(z,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,className:`inline-flex items-center justify-center text-muted-foreground/50 hover:text-muted-foreground transition-colors`,children:(0,$.jsx)(j,{name:`information`,className:`h-3.5 w-3.5`})})}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,$.jsxs)(V,{children:[r,(0,$.jsx)(B,{side:`top`,className:`max-w-[240px]`,children:n})]}),t[1]=n,t[2]=i),i},ot=e=>{let t=(0,be.c)(9),{htmlFor:n,required:r,children:i,info:a}=e,o;t[0]===r?o=t[1]:(o=r&&(0,$.jsx)(`span`,{className:`text-destructive ml-0.5`,children:`*`}),t[0]=r,t[1]=o);let s;t[2]!==i||t[3]!==n||t[4]!==o?(s=(0,$.jsxs)(`label`,{htmlFor:n,className:`typography-meta font-medium text-foreground`,children:[i,o]}),t[2]=i,t[3]=n,t[4]=o,t[5]=s):s=t[5];let c=a&&a,l;return t[6]!==s||t[7]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l},st=e=>{let t=h(e.path),n=e.icon?ce[e.icon]:null,r=e.color?F[e.color]:void 0,i=(0,$.jsx)(j,{name:n??`folder`,className:`h-3.5 w-3.5`,style:r?{color:r}:void 0});return(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center overflow-hidden text-muted-foreground`,children:e.iconImage?(0,$.jsx)(ie,{project:e,className:`size-full object-contain`,fallback:i}):i}),(0,$.jsx)(`span`,{className:`truncate`,children:t})]})},ct=({initialPrompt:e,onCreated:n,onCancel:r,isWindowed:i=!1})=>{let{t:a}=m(),[o,s]=Z.useState(``),[c,u]=Z.useState(()=>[{id:Pe(),prompt:``,models:[]}]),[d,f]=Z.useState(``),[h,y]=Z.useState([]),[b,x]=Z.useState(!1),[T,D]=Z.useState([]),[O,k]=Z.useState(!1),[A,ee]=Z.useState(!1),[te,N]=Z.useState(!0),ne=Z.useRef(null),ie=l(e=>e.currentDirectory??null),oe=Z.useMemo(()=>{if(typeof window>`u`)return null;let e=window.__VSCODE_CONFIG__?.workspaceFolder;return typeof e==`string`&&e.trim().length>0?e.trim():null},[]),P=w(e=>e.activeProjectId),ce=w(e=>e.setActiveProjectIdOnly),F=w(e=>e.projects),[I,L]=Z.useState(()=>P??null);Z.useEffect(()=>{if(P){L(P);return}!I&&F.length>0&&L(F[0].id)},[P,F,I]);let H=Z.useMemo(()=>I?F.find(e=>e.id===I)??null:null,[F,I]),U=H?.path??ie,W=p(e=>{L(e),e!==P&&ce(e)}),G=Z.useMemo(()=>{if(H?.path)return{id:H.id,path:H.path};let e=ie??oe;return e?{id:`path:${e}`,path:e}:null},[H,ie,oe]),[K]=Z.useState(()=>typeof window<`u`&&t()),q=Z.useMemo(()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),[]),J=de(),Y=Z.useMemo(()=>{if(typeof window>`u`)return null;let e=window.__YURI_MACOS_MAJOR__;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;if(typeof navigator>`u`)return null;let t=(navigator.userAgent||``).match(/Mac OS X (\d+)[._](\d+)/);if(!t)return null;let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);return Number.isNaN(n)?null:n===10?r:n},[]),X=Z.useMemo(()=>K&&q||J?`pl-[5.5rem]`:`pl-3`,[K,q,J]),fe=Z.useMemo(()=>!K||!q||Y===null?``:Y>=26?`h-12`:Y<=15?`h-14`:``,[K,q,Y]),pe=p(async e=>{e.target.closest(`button, a, input, select, textarea`)||e.button===0&&K&&await v()}),me=p(e=>{r&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r())}),ge=!!r;Z.useEffect(()=>{if(ge)return window.addEventListener(`keydown`,me,!0),()=>window.removeEventListener(`keydown`,me,!0)},[ge]);let[be,xe]=Z.useState(``),{isLoading:Se,isGitRepository:Q}=We(U),Ce=Z.useRef(!1),we=Q===!0,Te=we&&te;Z.useEffect(()=>{if(Q===!1){Ce.current=!0,N(!1);return}Q===!0&&Ce.current&&(Ce.current=!1,N(!0))},[Q]);let Ee=Me(e=>e.createMultiRun),De=Me(e=>e.error),Oe=Me(e=>e.clearError);Z.useEffect(()=>{typeof e==`string`&&e.trim().length>0&&u(t=>{let n=[...t];return n.length>0&&!n[0].prompt.trim()&&(n[0]={...n[0],prompt:e}),n})},[e]),Z.useEffect(()=>{if(!G)return;let e=!1;return ee(!0),(async()=>{try{let t=await E(G);e||D(t)}catch{}finally{e||ee(!1)}})(),()=>{e=!0}},[G]);let ke=p((e,t)=>{u(n=>n.map(n=>n.id===e?{...n,...t}:n))}),Ae=p(e=>{u(t=>t.filter(t=>t.id!==e))}),je=p(()=>{u(e=>[...e,{id:Pe(),prompt:``,models:[]}])}),Ne=async e=>{let t=e.target.files;if(!t)return;let n=0;for(let e=0;e<t.length;e++){let r=t[e];if(r.size>rt){S.error(a(`multirun.launcher.toast.fileTooLarge`,{fileName:r.name}));continue}try{let e=await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=t,n.readAsDataURL(r)});y(t=>[...t,{id:Pe(),filename:r.name,mimeType:r.type||`application/octet-stream`,size:r.size,dataUrl:e}]),n++}catch(e){console.error(`File attach failed`,e),S.error(a(`multirun.launcher.toast.attachFailed`,{fileName:r.name}))}}n>0&&S.success(a(n===1?`multirun.launcher.toast.attachedSingle`:`multirun.launcher.toast.attachedPlural`,{count:n})),ne.current&&(ne.current.value=``)},Fe=e=>{y(t=>t.filter(t=>t.id!==e))},Ie=Z.useMemo(()=>c.reduce((e,t)=>e+t.models.length,0),[c]),Le=async e=>{e.preventDefault();let t=c.filter(e=>e.prompt.trim()&&e.models.length>=1);if(t.length!==0&&!(Ie<1)){x(!0),Oe();try{I&&I!==P&&ce(I);let e=h.map(e=>({mime:e.mimeType,filename:e.filename,url:e.dataUrl})),r=T.filter(e=>e.trim().length>0),i=t.map(e=>({prompt:e.prompt.trim(),models:e.models.map(e=>({providerID:e.providerID,modelID:e.modelID,displayName:e.displayName,variant:e.variant}))})),a={name:o.trim(),groups:i,agent:d||void 0,worktreeBaseBranch:Te?be:void 0,isolateRuns:Te,files:e.length>0?e:void 0,setupCommands:r.length>0?r:void 0},s=await Ee(a);s&&(s.firstSessionId&&C.getState().setCurrentSession(s.firstSessionId),n?.())}finally{x(!1)}}},Re=!!(o.trim()&&c.some(e=>e.prompt.trim()&&e.models.length>=1)&&Ie>=1&&U&&!Se&&(Q===!1||!Te||be)),ze=T.filter(e=>e.trim()).length;return(0,$.jsxs)(`form`,{onSubmit:Le,className:`flex flex-col h-full bg-background`,children:[i?null:(0,$.jsxs)(`header`,{onMouseDown:pe,className:g(`relative flex h-12 shrink-0 items-center justify-center border-b app-region-drag select-none`,X,fe),style:{borderColor:`var(--interactive-border)`},children:[(0,$.jsx)(`h1`,{className:`typography-ui-label font-medium`,children:a(`multirun.launcher.title`)}),r&&(0,$.jsx)(`div`,{className:`absolute right-0 flex items-center pr-3`,children:(0,$.jsxs)(V,{children:[(0,$.jsx)(z,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,onClick:r,"aria-label":a(`multirun.launcher.actions.closeEsc`),className:`inline-flex h-9 w-9 items-center justify-center p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-interactive-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary app-region-no-drag`,children:(0,$.jsx)(j,{name:`close`,className:`h-5 w-5`})})}),(0,$.jsx)(B,{children:(0,$.jsx)(`p`,{children:a(`multirun.launcher.actions.closeEsc`)})})]})})]}),(0,$.jsx)(he,{className:`flex-1 min-h-0 overflow-auto`,size:64,hideTopShadow:!0,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-2xl px-4 sm:px-6 py-5`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,$.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-project`,required:!0,children:a(`multirun.launcher.project.label`)}),F.length>0?(0,$.jsxs)(le,{value:I??void 0,onValueChange:W,children:[(0,$.jsx)(ae,{id:`multirun-project`,size:`lg`,className:`w-fit max-w-full`,children:H?(0,$.jsx)(ue,{children:st(H)}):(0,$.jsx)(ue,{placeholder:a(`multirun.launcher.project.placeholder`)})}),(0,$.jsx)(se,{fitContent:!0,children:F.map(e=>(0,$.jsx)(re,{value:e.id,className:`max-w-[24rem]`,children:st(e)},e.id))})]}):(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground py-2`,children:a(`multirun.launcher.project.empty`)})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`group-name`,required:!0,info:(0,$.jsx)(at,{children:a(`multirun.launcher.groupName.info`)}),children:a(`multirun.launcher.groupName.label`)}),(0,$.jsx)(R,{id:`group-name`,value:o,onChange:e=>s(e.target.value),placeholder:a(`multirun.launcher.groupName.placeholder`),className:`typography-meta w-full`,required:!0})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-worktree-base-branch`,info:(0,$.jsx)(at,{children:a(`multirun.launcher.baseBranch.info`)}),children:a(`multirun.launcher.baseBranch.label`)}),(0,$.jsx)(Xe,{directory:U,value:be,onChange:xe,disabled:!Te,id:`multirun-worktree-base-branch`}),(0,$.jsxs)(`label`,{className:`mt-1.5 flex w-fit items-center gap-1.5 typography-micro text-muted-foreground`,children:[(0,$.jsx)(M,{checked:te,onChange:N,disabled:!we,ariaLabel:a(`multirun.launcher.isolateRuns.label`)}),(0,$.jsx)(`span`,{children:a(`multirun.launcher.isolateRuns.label`)})]})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-agent`,info:(0,$.jsx)(at,{children:a(`multirun.launcher.agent.info`)}),children:a(`multirun.launcher.agent.label`)}),(0,$.jsx)(Ze,{value:d,onChange:f,id:`multirun-agent`})]})]}),(0,$.jsxs)(ye,{open:O,onOpenChange:k,children:[(0,$.jsxs)(ve,{className:`w-full flex items-center gap-2 py-1.5 px-2 -mx-2 rounded-lg hover:bg-[var(--interactive-hover)]/50 transition-colors group`,children:[(0,$.jsx)(j,{name:`terminal`,className:`h-3.5 w-3.5 text-muted-foreground/70`}),(0,$.jsx)(`span`,{className:`typography-meta font-medium text-muted-foreground group-hover:text-foreground transition-colors`,children:a(`multirun.launcher.setupCommands.label`)}),ze>0&&(0,$.jsx)(`span`,{className:`inline-flex items-center justify-center h-4 min-w-4 px-1 rounded-full typography-micro font-medium`,style:{backgroundColor:`var(--primary-base)`,color:`var(--primary-foreground)`,fontSize:`0.625rem`,lineHeight:1},children:ze}),(0,$.jsx)(j,{name:`arrow-down-s`,className:g(`h-3.5 w-3.5 text-muted-foreground/50 transition-transform duration-200 ml-auto`,O&&`rotate-180`)})]}),(0,$.jsx)(_e,{children:(0,$.jsx)(`div`,{className:`pt-2 space-y-1.5`,children:A?(0,$.jsx)(`p`,{className:`typography-meta text-muted-foreground/70 px-2`,children:a(`multirun.launcher.setupCommands.loading`)}):(0,$.jsxs)($.Fragment,{children:[T.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(R,{value:e,onChange:e=>{let n=[...T];n[t]=e.target.value,D(n)},placeholder:a(`multirun.launcher.setupCommands.commandPlaceholder`),className:`h-8 flex-1 font-mono text-xs`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>D(T.filter((e,n)=>n!==t)),className:`flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,"aria-label":a(`multirun.launcher.setupCommands.removeCommandAria`),children:(0,$.jsx)(j,{name:`close`,className:`h-3.5 w-3.5`})})]},`${e}-${t}`)),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>D([...T,``]),className:`flex items-center gap-1 typography-meta text-muted-foreground hover:text-foreground transition-colors px-1`,children:[(0,$.jsx)(j,{name:`add`,className:`h-3 w-3`}),a(`multirun.launcher.setupCommands.addCommand`)]})]})})})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(ot,{htmlFor:`prompt`,required:!0,children:a(`multirun.launcher.attachments.label`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,$.jsx)(`input`,{ref:ne,type:`file`,multiple:!0,className:`hidden`,onChange:Ne,accept:`*/*`}),(0,$.jsxs)(V,{children:[(0,$.jsx)(z,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>ne.current?.click(),className:`inline-flex items-center gap-1 h-6 px-2 rounded-md typography-micro text-muted-foreground hover:text-foreground hover:bg-[var(--interactive-hover)]/50 transition-colors`,children:[(0,$.jsx)(j,{name:`attachment-2`,className:`h-3 w-3`}),a(`multirun.launcher.attachments.attach`)]})}),(0,$.jsx)(B,{children:a(`multirun.launcher.attachments.tooltip`)})]}),h.map(e=>(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md typography-micro border`,style:{backgroundColor:`var(--surface-elevated)`,borderColor:`var(--interactive-border)`},children:[e.mimeType.startsWith(`image/`)?(0,$.jsx)(j,{name:`file-image`,className:`h-3 w-3 text-muted-foreground`}):(0,$.jsx)(j,{name:`file`,className:`h-3 w-3 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`truncate max-w-[100px]`,title:e.filename,children:e.filename}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>Fe(e.id),className:`text-muted-foreground hover:text-destructive`,children:(0,$.jsx)(j,{name:`close`,className:`h-3 w-3`})})]},e.id))]})]}),c.map((e,t)=>(0,$.jsx)(lt,{group:e,groupIndex:t,canRemove:c.length>1,onUpdate:ke,onRemove:Ae},e.id)),(0,$.jsxs)(`button`,{type:`button`,onClick:je,className:`flex items-center gap-1.5 py-2 px-3 -mx-3 rounded-lg typography-meta font-medium text-muted-foreground hover:text-foreground hover:bg-[var(--interactive-hover)]/50 transition-colors`,children:[(0,$.jsx)(j,{name:`add`,className:`h-3.5 w-3.5`}),a(`multirun.launcher.groups.addGroup`)]}),De&&(0,$.jsx)(`div`,{className:`px-3 py-2 rounded-lg typography-meta`,style:{backgroundColor:`var(--status-error-background)`,color:`var(--status-error)`,borderWidth:1,borderColor:`var(--status-error-border)`},children:De})]})})}),(0,$.jsx)(`div`,{className:`shrink-0 px-4 sm:px-6 py-3`,children:(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-2xl flex items-center justify-end gap-2`,children:[!Te&&Q!==null?(0,$.jsxs)(`div`,{className:`mr-auto flex min-w-0 items-center gap-1.5 typography-micro text-muted-foreground`,children:[(0,$.jsx)(j,{name:`information`,className:`h-3.5 w-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:a(`multirun.launcher.project.gitRequired`)})]}):null,(0,$.jsx)(_,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:a(`multirun.launcher.actions.cancel`)}),(0,$.jsx)(_,{type:`submit`,size:`sm`,disabled:!Re||b,children:b?a(`multirun.launcher.actions.creating`):(0,$.jsx)($.Fragment,{children:a(`multirun.launcher.actions.startWithRunCount`,{count:Ie})})})]})})]})},lt=e=>{let t=(0,be.c)(94),{group:n,groupIndex:r,canRemove:i,onUpdate:a,onRemove:o}=e,{t:s}=m(),[c,l]=Z.useState(!1),[u,d]=Z.useState(``),[f,h]=Z.useState(!1),[g,_]=Z.useState(``),v=Z.useRef(null),y=Z.useRef(null),b=Z.useRef(null),x;t[0]!==n.id||t[1]!==n.models||t[2]!==a?(x=e=>{n.models.length>=it||a(n.id,{models:[...n.models,e]})},t[0]=n.id,t[1]=n.models,t[2]=a,t[3]=x):x=t[3];let S=p(x),C;t[4]!==n.id||t[5]!==n.models||t[6]!==a?(C=e=>{a(n.id,{models:n.models.filter((t,n)=>n!==e)})},t[4]=n.id,t[5]=n.models,t[6]=a,t[7]=C):C=t[7];let w=p(C),T;t[8]!==n.id||t[9]!==n.models||t[10]!==a?(T=(e,t)=>{a(n.id,{models:n.models.map((n,r)=>r===e?t:n)})},t[8]=n.id,t[9]=n.models,t[10]=a,t[11]=T):T=t[11];let E=p(T),D;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(e,t)=>{if(e.startsWith(`/`)){let n=e.indexOf(` `),r=e.indexOf(`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{b as t}from"./desktop-CfMDfs6c.js";import{a as n,r}from"./vendor-zustand-o69pgTEK.js";import{it as i,rt as a}from"./vendor-base-ui-CdzJ6My_.js";import{At as o,Hn as s,In as c,bt as l}from"./gitApiHttp-BhcxUxqo.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{n as u}from"./useUIStore-DqtgX2FB.js";import{n as d}from"./vendor-react-BP2cRVqX.js";import{u as f}from"./fileQueries-voABZL1r.js";import{n as p}from"./vendor-reactuses-core-BpfIZ1tg.js";import{d as m,i as h,r as g,t as _,y as v}from"./button-CT7WL0lp.js";import{Fa as y,La as b,Pr as x,Rr as S,d as C,fo as w,gr as T,nr as E,or as D,rr as O,u as k,wa as A}from"./useMobileNavigationStore-BPOHzqoM.js";import{n as j}from"./Icon-DofI60x2.js";import{n as ee}from"./gitApi-DgBiaLFA.js";import{A as M,D as te,O as N,S as ne,_ as re,a as ie,b as ae,f as oe,g as P,h as se,i as ce,m as le,n as F,v as I,x as ue,y as L}from"./projectMeta-WDYXNks8.js";import{t as R}from"./input-D86Oqf3B.js";import{i as z,n as B,t as V}from"./tooltip-CnIKZ6bg.js";import{a as de}from"./device-BDrEmxBm.js";import{D as H,a as U,b as W,c as G,f as K,h as q,l as J,o as Y,p as X,r as fe,w as pe,y as me}from"./insertionBoundaries-YFGFUgWP.js";import{r as he,t as ge}from"./textarea-CMvxcQhR.js";import{n as _e,r as ve,t as ye}from"./collapsible-UDWFNcbF.js";var Z=e(i(),1),be=d(),xe=/^[a-z0-9](?:[a-z0-9-]{0,48}[a-z0-9])?$/,Se=/^g[1-9]\d*$/,Q=(e,t,n,r,i)=>{if(!xe.test(e)||t!==void 0&&!Se.test(t)||!n?.trim()||!r?.trim()||n!==n.trim()||r!==r.trim())return null;if(i===void 0)return{groupSlug:e,runGroup:t,providerID:n,modelID:r,fusion:!1};if(i===`fusion`)return{groupSlug:e,runGroup:t,providerID:n,modelID:r,fusion:!0};if(!/^\d+$/.test(i))return null;let a=Number.parseInt(i,10);return!Number.isSafeInteger(a)||a<=0?null:{groupSlug:e,runGroup:t,providerID:n,modelID:r,index:a,fusion:!1}},Ce=e=>{if(!e)return null;let t=e.split(`/`);if(t.length<3||t.length>5)return null;let[n]=t;if(t.length===3)return Q(n,void 0,t[1],t[2],void 0);if(t.length===4){let[,e,r,i]=t;return Se.test(e)?Q(n,e,r,i,void 0):Q(n,void 0,e,r,i)}let[,r,i,a,o]=t;return r===``?Q(n,void 0,i,a,o):Q(n,r,i,a,o)},we=e=>{let t=[e.groupSlug];return e.runGroup&&t.push(e.runGroup),t.push(e.providerID,e.modelID),e.index!==void 0&&t.push(String(e.index)),t.join(`/`)},Te=(e,t,n,r)=>{let i=[e];return r&&i.push(r),i.push(t,n,`fusion`),i.join(`/`)},Ee=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).substring(0,50),De=(e,t)=>`${Ee(e)}-${Ee(t)}`.substring(0,60),Oe=(e,t)=>`${e}/${t}`,ke=e=>{let t=e.replace(/\\/g,`/`);return t===`/`?`/`:t.length>1?t.replace(/\/+$/,``):t},Ae=(e,t)=>{let n=ke(t),r=e.directory,i=typeof r==`string`&&r.trim().length>0?e:{...e,directory:n};s(e.id,n),C.getState().markSessionAsYuriCreated(e.id),x.getState().upsertSession(i);try{c().ensureChild(n,{bootstrap:!1}).setState(t=>{let n=t.session.findIndex(t=>t.id===e.id);if(n>=0&&t.session[n]===i)return t;let r=n>=0?t.session.map((e,t)=>t===n?i:e):[...t.session,i].sort((e,t)=>e.id.localeCompare(t.id));return{session:r,sessionTotal:Math.max(t.sessionTotal,r.length),limit:Math.max(t.limit,r.length)}})}catch{}return i},je=()=>{let e=w.getState(),t=e.activeProjectId;if(!t)return null;let n=e.projects.find(e=>e.id===t);if(n?.path)return{id:n.id,path:n.path};let r=l.getState().currentDirectory??null;if(r&&r.trim().length>0){let e=r.replace(/\\/g,`/`).replace(/\/+$/,``)||r;return{id:`path:${e}`,path:e}}return null},Me=n()(r(e=>({isLoading:!1,error:null,createMultiRun:async t=>{let n=t.name.trim(),{groups:r,agent:i,files:a,setupCommands:s}=t;if(!n)return e({error:`Group name is required`}),null;if(!r||r.length===0)return e({error:`At least one run group is required`}),null;for(let t=0;t<r.length;t++){if(!r[t].prompt.trim())return e({error:`Group ${t+1}: prompt is required`}),null;if(r[t].models.length<1)return e({error:`Group ${t+1}: select at least 1 model`}),null;if(r[t].models.length>5)return e({error:`Group ${t+1}: maximum 5 models allowed`}),null}e({isLoading:!0,error:null});try{let c=je();if(!c)return e({error:`Select a project`,isLoading:!1}),null;let l=c.path,u=await ee(l)&&t.isolateRuns!==!1,d=Ee(n),f=u?await oe(l):void 0,p=u?await J(l):null,m=[],h=s?.filter(e=>e.trim().length>0)??[];for(let e=0;e<r.length;e++){let n=r[e],i=n.prompt,a=new Map;for(let e of n.models){let t=`${e.providerID}:${e.modelID}`;a.set(t,(a.get(t)||0)+1)}let s=new Map;for(let g of n.models){let n=`${g.providerID}:${g.modelID}`,_=a.get(n)||1,v=(s.get(n)||0)+1;s.set(n,v);let y=De(g.providerID,g.modelID),b=r.length>1?`g${e+1}`:void 0,x=_>1?Oe(d,`${y}/${v}`):Oe(d,y),S=b?`${b}/${x}`:x,w=we({groupSlug:d,runGroup:b,providerID:g.providerID,modelID:g.modelID,index:_>1?v:void 0});try{if(!u){let e=await o.withDirectory(l,()=>o.createSession({title:w}));Ae(e,l),m.push({sessionId:e.id,worktreePath:l,providerID:g.providerID,modelID:g.modelID,variant:g.variant,prompt:i});continue}let e=await G(c,{preferredName:S,mode:`new`,branchName:S,worktreeName:S,startRef:t.worktreeBaseBranch||`HEAD`,setupCommands:h,returnAfterDirectoryCreated:!0},{resolvedRootTrackingRemote:p}),n={...e,createdFromBranch:f,kind:`standard`};await O(c)&&await T(e.path);let r=await o.withDirectory(e.path,()=>o.createSession({title:w}));Ae(r,e.path),C.getState().setWorktreeMetadata(r.id,n),m.push({sessionId:r.id,worktreePath:e.path,providerID:g.providerID,modelID:g.modelID,variant:g.variant,prompt:i})}catch(e){console.warn(`[MultiRun] Failed to create session:`,e)}}}let g=s?.filter(e=>e.trim().length>0)??[];g.length>0&&D(c,g).catch(()=>{console.warn(`[MultiRun] Failed to save worktree setup commands`)});let _=m.map(e=>e.sessionId),v=m[0]?.sessionId??null;if(_.length===0)return e({error:`Failed to create any sessions`,isLoading:!1}),null;let y=a?.map(e=>({type:`file`,mime:e.mime,filename:e.filename,url:e.url}));return(async()=>{try{await Promise.allSettled(m.map(async e=>{try{await k({sessionId:e.sessionId,directory:e.worktreePath,content:e.prompt,providerID:e.providerID,modelID:e.modelID,variant:e.variant,agent:i,files:y})}catch(e){console.warn(`[MultiRun] Failed to start run:`,e)}}))}catch(e){console.warn(`[MultiRun] Failed to start runs:`,e)}})(),e({isLoading:!1}),{groupSlug:d,sessionIds:_,firstSessionId:v}}catch(t){return e({error:t instanceof Error?t.message:`Failed to create Multi-Run`,isLoading:!1}),null}},clearError:()=>{e({error:null})}}),{name:`multirun-store`})),$=a(),Ne=`h-7`,Pe=()=>`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Fe=e=>{let t=(0,be.c)(13),{model:n,instanceIndex:r,totalSameModel:i,onRemove:a}=e,o=n.displayName||`${n.providerID}/${n.modelID}`,s=i>1?`${o} (${r})`:o,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=g(`flex items-center gap-1.5 px-2 rounded-md bg-interactive-selection/20 border border-border/30`,Ne),t[0]=c):c=t[0];let l;t[1]!==n.modelID||t[2]!==n.providerID?(l=(0,$.jsx)(N,{modelId:n.modelID,providerId:n.providerID,className:`h-3.5 w-3.5`}),t[1]=n.modelID,t[2]=n.providerID,t[3]=l):l=t[3];let u;t[4]===s?u=t[5]:(u=(0,$.jsx)(`span`,{className:`typography-meta font-medium truncate max-w-[140px]`,children:s}),t[4]=s,t[5]=u);let d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(j,{name:`close`,className:`h-3.5 w-3.5`}),t[6]=d):d=t[6];let f;t[7]===a?f=t[8]:(f=(0,$.jsx)(`button`,{type:`button`,onClick:a,className:`text-muted-foreground hover:text-foreground ml-0.5`,children:d}),t[7]=a,t[8]=f);let p;return t[9]!==l||t[10]!==u||t[11]!==f?(p=(0,$.jsxs)(`div`,{className:c,children:[l,u,f]}),t[9]=l,t[10]=u,t[11]=f,t[12]=p):p=t[12],p},Ie=e=>{let t=(0,be.c)(131),{selectedModels:n,onAdd:r,onRemove:i,onUpdate:a,minModels:o,addButtonLabel:s,showChips:c,maxModels:l,addButtonClassName:d,dropdownSide:f,dropdownClassName:p,containerClassName:h,triggerIcon:v}=e,y=c===void 0||c,x=f===void 0?`top`:f,{t:S}=m(),C=A(Le),w=A(Re),T=u(ze),E=u(Be),{favoriteModelsList:D,recentModelsList:O}=te(),k=u(Ve),ee=u(He),[M,N]=Z.useState(!1),[ie,oe]=Z.useState(``),[P,ce]=Z.useState(null),F=Z.useRef(null),I=Z.useRef(null),L=l===1,R=l===void 0||n.length<l||L,z;if(t[0]!==n){z=new Map;for(let e of n){let t=`${e.providerID}:${e.modelID}`;z.set(t,(z.get(t)||0)+1)}t[0]=n,t[1]=z}else z=t[1];let B=z,V;t[2]===n?V=t[3]:(V=e=>n.filter(t=>t.providerID===e.providerID&&t.modelID===e.modelID).findIndex(t=>t.instanceId===e.instanceId)+1,t[2]=n,t[3]=V);let de=V,H,U;t[4]!==x||t[5]!==M?(H=()=>{if(!M||!I.current)return;let e=I.current.getBoundingClientRect();if(x===`bottom`){let t=(window.visualViewport?.height??document.documentElement.clientHeight??window.innerHeight)-e.bottom-16-112;ce(Math.max(160,Math.min(320,t)));return}let t=I.current.parentElement;for(;t&&!(t.getAttribute(`role`)===`dialog`||t.hasAttribute(`data-scroll-shadow`));){let e=getComputedStyle(t);if(e.overflow===`auto`||e.overflow===`hidden`||e.overflowY===`auto`||e.overflowY===`hidden`)break;t=t.parentElement}let n=t?t.getBoundingClientRect().top:0,r=e.top-n-16;ce(Math.max(150,Math.min(300,r)))},U=[x,M],t[4]=x,t[5]=M,t[6]=H,t[7]=U):(H=t[6],U=t[7]),Z.useEffect(H,U);let W,G;t[8]!==R||t[9]!==M?(W=()=>{!R&&M&&(N(!1),oe(``))},G=[R,M],t[8]=R,t[9]=M,t[10]=W,t[11]=G):(W=t[10],G=t[11]),Z.useEffect(W,G);let K,q;t[12]===M?(K=t[13],q=t[14]):(K=()=>{if(!M)return;let e=e=>{F.current&&!F.current.contains(e.target)&&(N(!1),oe(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},q=[M],t[12]=M,t[13]=K,t[14]=q),Z.useEffect(K,q);let J;t[15]!==L||t[16]!==r||t[17]!==a||t[18]!==n.length?(J=e=>{let t={providerID:e.providerID,modelID:e.modelID,displayName:b(e.model,e.modelID)||e.modelID,instanceId:Pe()};L&&n.length>0&&a?a(0,t):r(t),L&&(N(!1),oe(``))},t[15]=L,t[16]=r,t[17]=a,t[18]=n.length,t[19]=J):J=t[19];let Y=J,X;t[20]===S?X=t[21]:(X=S(`multirun.modelMultiSelect.search.placeholder`),t[20]=S,t[21]=X);let fe;t[22]===S?fe=t[23]:(fe=S(`multirun.modelMultiSelect.search.noResults`),t[22]=S,t[23]=fe);let pe;t[24]===S?pe=t[25]:(pe=S(`multirun.modelMultiSelect.sections.favorites`),t[24]=S,t[25]=pe);let me;t[26]===S?me=t[27]:(me=S(`multirun.modelMultiSelect.sections.recent`),t[26]=S,t[27]=me);let he;t[28]===S?he=t[29]:(he=S(`multirun.modelMultiSelect.keyboard.hint`),t[28]=S,t[29]=he);let ge;t[30]===S?ge=t[31]:(ge=S(`settings.agents.modelSelector.actions.favorite`),t[30]=S,t[31]=ge);let _e;t[32]===S?_e=t[33]:(_e=S(`settings.agents.modelSelector.actions.unfavorite`),t[32]=S,t[33]=_e);let ve;t[34]===S?ve=t[35]:(ve=S(`chat.modelControls.provider`),t[34]=S,t[35]=ve);let ye;t[36]===S?ye=t[37]:(ye=S(`chat.modelControls.capabilities`),t[36]=S,t[37]=ye);let xe;t[38]===S?xe=t[39]:(xe=S(`chat.modelControls.capability.toolCalling`),t[38]=S,t[39]=xe);let Se;t[40]===S?Se=t[41]:(Se=S(`chat.modelControls.capability.reasoning`),t[40]=S,t[41]=Se);let Q;t[42]===S?Q=t[43]:(Q=S(`chat.modelControls.modality.image`),t[42]=S,t[43]=Q);let Ce;t[44]===S?Ce=t[45]:(Ce=S(`chat.modelControls.modality.video`),t[44]=S,t[45]=Ce);let we;t[46]===S?we=t[47]:(we=S(`chat.modelControls.modality.audio`),t[46]=S,t[47]=we);let Te;t[48]===S?Te=t[49]:(Te=S(`chat.modelControls.costPerMillion`),t[48]=S,t[49]=Te);let Ee;t[50]===S?Ee=t[51]:(Ee=S(`chat.modelControls.costInput`),t[50]=S,t[51]=Ee);let De;t[52]===S?De=t[53]:(De=S(`chat.modelControls.costOutput`),t[52]=S,t[53]=De);let Oe;t[54]!==X||t[55]!==fe||t[56]!==pe||t[57]!==me||t[58]!==he||t[59]!==ge||t[60]!==_e||t[61]!==ve||t[62]!==ye||t[63]!==xe||t[64]!==Se||t[65]!==Q||t[66]!==Ce||t[67]!==we||t[68]!==Te||t[69]!==Ee||t[70]!==De?(Oe={searchPlaceholder:X,noResults:fe,favorites:pe,recent:me,keyboardHint:he,favorite:ge,unfavorite:_e,provider:ve,capabilities:ye,capabilityToolCalling:xe,capabilityReasoning:Se,modalityImage:Q,modalityVideo:Ce,modalityAudio:we,costPerMillion:Te,costInput:Ee,costOutput:De},t[54]=X,t[55]=fe,t[56]=pe,t[57]=me,t[58]=he,t[59]=ge,t[60]=_e,t[61]=ve,t[62]=ye,t[63]=xe,t[64]=Se,t[65]=Q,t[66]=Ce,t[67]=we,t[68]=Te,t[69]=Ee,t[70]=De,t[71]=Oe):Oe=t[71];let ke=Oe,Ae;t[72]===h?Ae=t[73]:(Ae=g(`relative`,h),t[72]=h,t[73]=Ae);let je;t[74]===d?je=t[75]:(je=g(Ne,`!border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70`,d),t[74]=d,t[75]=je);let Me=!R,Ie;t[76]===M?Ie=t[77]:(Ie=()=>{N(!M)},t[76]=M,t[77]=Ie);let We;t[78]===v?We=t[79]:(We=v??(0,$.jsx)(j,{name:`add`,className:`h-3.5 w-3.5 mr-1`}),t[78]=v,t[79]=We);let Ge;t[80]!==s||t[81]!==S?(Ge=s??S(`multirun.modelMultiSelect.actions.addModel`),t[80]=s,t[81]=S,t[82]=Ge):Ge=t[82];let Ke;t[83]!==je||t[84]!==Me||t[85]!==Ie||t[86]!==We||t[87]!==Ge?(Ke=(0,$.jsxs)(_,{ref:I,type:`button`,variant:`outline`,size:`sm`,className:je,disabled:Me,onClick:Ie,children:[We,Ge]}),t[83]=je,t[84]=Me,t[85]=Ie,t[86]=We,t[87]=Ge,t[88]=Ke):Ke=t[88];let qe;t[89]!==P||t[90]!==R||t[91]!==p||t[92]!==x||t[93]!==D||t[94]!==w||t[95]!==Y||t[96]!==k||t[97]!==E||t[98]!==M||t[99]!==ke||t[100]!==B||t[101]!==ee||t[102]!==C||t[103]!==O||t[104]!==ie||t[105]!==T?(qe=M?(0,$.jsx)(`div`,{className:g(`absolute left-0 z-50 w-[min(420px,calc(100vw-2rem))] max-w-[calc(100vw-2rem)] flex flex-col overflow-hidden rounded-xl border border-border/50 shadow-lg`,x===`top`?`bottom-full mb-1`:`top-full mt-1`,p),style:{background:`linear-gradient(var(--surface-elevated),var(--surface-elevated)),linear-gradient(var(--surface-background),var(--surface-background))`},children:(0,$.jsx)(ne,{providers:C,providerOrder:ee,favoriteModels:D,recentModels:O,getMetadata:w,hiddenModels:k,searchQuery:ie,onSearchQueryChange:oe,onSelect:Y,labels:ke,selectionCount:e=>B.get(`${e.providerID}:${e.modelID}`)||0,disabled:!R,maxHeightClassName:`flex-1`,maxHeightStyle:{maxHeight:P?`${P}px`:`300px`},stickyHeaders:!0,tooltipsEnabled:M,isFavorite:e=>E(e.providerID,e.modelID),onToggleFavorite:e=>T(e.providerID,e.modelID),onEscape:()=>{N(!1),oe(``)}})}):null,t[89]=P,t[90]=R,t[91]=p,t[92]=x,t[93]=D,t[94]=w,t[95]=Y,t[96]=k,t[97]=E,t[98]=M,t[99]=ke,t[100]=B,t[101]=ee,t[102]=C,t[103]=O,t[104]=ie,t[105]=T,t[106]=qe):qe=t[106];let Je;t[107]!==Ae||t[108]!==Ke||t[109]!==qe?(Je=(0,$.jsxs)(`div`,{className:Ae,ref:F,children:[Ke,qe]}),t[107]=Ae,t[108]=Ke,t[109]=qe,t[110]=Je):Je=t[110];let Ye;t[111]!==de||t[112]!==B||t[113]!==i||t[114]!==a||t[115]!==C||t[116]!==n||t[117]!==y||t[118]!==S?(Ye=y&&n.length>0&&(0,$.jsx)(`div`,{className:`flex flex-col gap-2 w-full`,children:n.map((e,t)=>{let n=`${e.providerID}:${e.modelID}`,r=B.get(n)||1,o=de(e),s=C.find(t=>t.id===e.providerID)?.models?.find(t=>t.id===e.modelID),c=s?.variants?Object.keys(s.variants):[],l=c.length>0,u=e.variant??`__default__`;return(0,$.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,$.jsx)(Fe,{model:e,instanceIndex:o,totalSameModel:r,onRemove:()=>i(t)}),l&&(0,$.jsxs)(le,{value:u,onValueChange:n=>{if(!a)return;let r=n===`__default__`?void 0:n;a(t,{...e,variant:r})},children:[(0,$.jsxs)(ae,{size:`chip`,className:`px-2 gap-1.5 rounded-md !border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70 typography-meta font-medium text-foreground`,children:[(0,$.jsx)(j,{name:`brain-ai-3`,className:g(`h-3.5 w-3.5 flex-shrink-0`,u===`__default__`?`text-muted-foreground`:`text-[color:var(--status-info)]`)}),(0,$.jsx)(ue,{placeholder:S(`multirun.modelMultiSelect.variant.placeholder`),children:e=>e===`__default__`?S(`multirun.modelMultiSelect.variant.default`):e})]}),(0,$.jsxs)(se,{fitContent:!0,children:[(0,$.jsx)(re,{value:`__default__`,className:`pr-2 [&>span:first-child]:hidden`,children:S(`multirun.modelMultiSelect.variant.default`)}),c.map(Ue)]})]})]},e.instanceId)})}),t[111]=de,t[112]=B,t[113]=i,t[114]=a,t[115]=C,t[116]=n,t[117]=y,t[118]=S,t[119]=Ye):Ye=t[119];let Xe;t[120]!==Je||t[121]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 items-center`,children:[Je,Ye]}),t[120]=Je,t[121]=Ye,t[122]=Xe):Xe=t[122];let Ze;t[123]!==l||t[124]!==o||t[125]!==n.length||t[126]!==S?(Ze=o!==void 0&&n.length<o&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground`,children:l===void 0?S(`multirun.modelMultiSelect.validation.minOnly`,{min:o}):S(`multirun.modelMultiSelect.validation.minToMax`,{min:o,max:l})}),t[123]=l,t[124]=o,t[125]=n.length,t[126]=S,t[127]=Ze):Ze=t[127];let Qe;return t[128]!==Xe||t[129]!==Ze?(Qe=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[Xe,Ze]}),t[128]=Xe,t[129]=Ze,t[130]=Qe):Qe=t[130],Qe};function Le(e){return e.providers}function Re(e){return e.getModelMetadata}function ze(e){return e.toggleFavoriteModel}function Be(e){return e.isFavoriteModel}function Ve(e){return e.hiddenModels}function He(e){return e.providerOrder}function Ue(e){return(0,$.jsx)(re,{value:e,className:`pr-2 [&>span:first-child]:hidden`,children:e},e)}function We(e){let t=(0,be.c)(30),{git:n}=f(),r=K(e),i=W(e),a=q(e),o=X(e),s=me(Ye),c=me(Je),l,u;t[0]!==e||t[1]!==c||t[2]!==n||t[3]!==i||t[4]!==a?(l=()=>{!e||!n||i!==null||a||c(e,n,{silent:!0})},u=[e,n,c,i,a],t[0]=e,t[1]=c,t[2]=n,t[3]=i,t[4]=a,t[5]=l,t[6]=u):(l=t[5],u=t[6]),Z.useEffect(l,u);let d;t[7]!==r?.all||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==i?(d=()=>{!e||!n||i===!0&&(r?.all||s(e,n))},t[7]=r?.all,t[8]=e,t[9]=s,t[10]=n,t[11]=i,t[12]=d):d=t[12];let p=r?.all,m;t[13]!==e||t[14]!==s||t[15]!==n||t[16]!==i||t[17]!==p?(m=[e,n,i,p,s],t[13]=e,t[14]=s,t[15]=n,t[16]=i,t[17]=p,t[18]=m):m=t[18],Z.useEffect(d,m);let h=a||i===!0&&o,g;bb0:{if(!r?.all){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[19]=e):e=t[19],g=e;break bb0}let e;t[20]===r.all?e=t[21]:(e=r.all.filter(qe).sort(),t[20]=r.all,t[21]=e),g=e}let _=g,v;bb1:{if(!r?.all){let e;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[22]=e):e=t[22],v=e;break bb1}let e;t[23]===r.all?e=t[24]:(e=r.all.filter(Ke).map(Ge).sort(),t[23]=r.all,t[24]=e),v=e}let y=v,b;bb2:{if(!e){b=null;break bb2}if(i!==null){b=i;break bb2}if(h){b=null;break bb2}b=r?.all?!0:null}let x=b,S;return t[25]!==x||t[26]!==h||t[27]!==_||t[28]!==y?(S={localBranches:_,remoteBranches:y,isLoading:h,isGitRepository:x},t[25]=x,t[26]=h,t[27]=_,t[28]=y,t[29]=S):S=t[29],S}function Ge(e){return e.replace(/^remotes\//,``)}function Ke(e){return e.startsWith(`remotes/`)}function qe(e){return!e.startsWith(`remotes/`)}function Je(e){return e.fetchStatus}function Ye(e){return e.fetchBranches}var Xe=({directory:e,value:t,onChange:n,className:r,disabled:i,id:a})=>{let{t:o}=m(),{localBranches:s,remoteBranches:c,isLoading:l,isGitRepository:u}=We(e),d=Z.useMemo(()=>[...s,...c.map(e=>`remotes/${e}`)],[s,c]);return Z.useEffect(()=>{if(i||l||d.length===0||t&&d.includes(t))return;let r=t,a=!1;return(async()=>{try{let t=e?await oe(e).catch(()=>null):null;if(a)return;let i=localStorage.getItem(U),{sourceBranch:o,shouldClearSavedSourceBranch:s}=Y({branches:d,savedSourceBranch:i,rootBranch:t});if(s&&localStorage.removeItem(U),a||r&&d.includes(r))return;o&&n(o)}catch{}})(),()=>{a=!0}},[d,e,i,l,n,t]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(le,{value:t,onValueChange:n,disabled:i||!u||l,children:[(0,$.jsx)(ae,{id:a,size:`lg`,className:r??`w-fit typography-meta text-foreground`,children:(0,$.jsx)(ue,{placeholder:o(l?`multiRun.branchSelector.status.loadingBranches`:`multiRun.branchSelector.placeholder.selectSourceBranch`)})}),(0,$.jsx)(se,{className:`max-h-[280px] max-w-[320px]`,children:l?(0,$.jsx)(`div`,{className:`px-2 py-4 text-center typography-meta text-muted-foreground`,children:o(`multiRun.branchSelector.status.loadingBranches`)}):s.length===0&&c.length===0?(0,$.jsx)(`div`,{className:`px-2 py-4 text-center typography-meta text-muted-foreground`,children:o(`multiRun.branchSelector.status.noBranchesFound`)}):(0,$.jsxs)($.Fragment,{children:[s.length>0&&(0,$.jsxs)(P,{children:[(0,$.jsx)(I,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.localBranches`)}),s.map(e=>(0,$.jsx)(re,{value:e,className:`whitespace-normal break-all`,children:e},e))]}),s.length>0&&c.length>0&&(0,$.jsx)(L,{}),c.length>0&&(0,$.jsxs)(P,{children:[(0,$.jsx)(I,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.remoteBranches`)}),c.map(e=>(0,$.jsx)(re,{value:`remotes/${e}`,className:`whitespace-normal break-all`,children:e},`remotes/${e}`))]})]})})]}),u===!1&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground/70 mt-2`,children:o(`multiRun.branchSelector.status.notInGitRepository`)})]})},Ze=e=>{let t=(0,be.c)(36),{value:n,onChange:r,className:i,disabled:a,id:o,portalToBody:s}=e,{t:c}=m(),l=A(Qe),u=A($e),d=A(et),f;t[0]===l?f=t[1]:(f=l(),t[0]=l,t[1]=f);let p=f,h;t[2]===p?h=t[3]:(h=p.filter(tt),t[2]=p,t[3]=h);let _=h,v,y;t[4]!==p.length||t[5]!==u?(v=()=>{p.length===0&&u()},y=[p.length,u],t[4]=p.length,t[5]=u,t[6]=v,t[7]=y):(v=t[6],y=t[7]),Z.useEffect(v,y);let b,x;t[8]!==d||t[9]!==a||t[10]!==r||t[11]!==_||t[12]!==n?(b=()=>{if(a)return;let e=n.trim();if(e.length>0&&_.some(t=>t.name===e))return;let t=typeof d==`string`&&d.trim().length>0?d.trim():null;if(t&&_.some(e=>e.name===t)){r(t);return}let i=_[0]?.name;i&&r(i)},x=[d,a,r,_,n],t[8]=d,t[9]=a,t[10]=r,t[11]=_,t[12]=n,t[13]=b,t[14]=x):(b=t[13],x=t[14]),Z.useEffect(b,x);let S=n.trim().length>0?n:void 0,C;t[15]===i?C=t[16]:(C=g(`max-w-full typography-meta text-foreground !border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70 data-[popup-open]:!bg-[var(--interactive-active)]/70`,i),t[15]=i,t[16]=C);let w;t[17]===c?w=t[18]:(w=c(`multirun.agentSelector.placeholder`),t[17]=c,t[18]=w);let T;t[19]===w?T=t[20]:(T=(0,$.jsx)(ue,{placeholder:w}),t[19]=w,t[20]=T);let E;t[21]!==o||t[22]!==C||t[23]!==T?(E=(0,$.jsx)(ae,{id:o,size:`lg`,className:C,children:T}),t[21]=o,t[22]=C,t[23]=T,t[24]=E):E=t[24];let D;t[25]===_?D=t[26]:(D=_.length>0&&(0,$.jsx)(P,{children:_.map(nt)}),t[25]=_,t[26]=D);let O;t[27]!==s||t[28]!==D?(O=(0,$.jsx)(se,{fitContent:!0,portalToBody:s,children:D}),t[27]=s,t[28]=D,t[29]=O):O=t[29];let k;return t[30]!==a||t[31]!==r||t[32]!==S||t[33]!==E||t[34]!==O?(k=(0,$.jsxs)(le,{value:S,onValueChange:r,disabled:a,children:[E,O]}),t[30]=a,t[31]=r,t[32]=S,t[33]=E,t[34]=O,t[35]=k):k=t[35],k};function Qe(e){return e.getVisibleAgents}function $e(e){return e.loadAgents}function et(e){return e.currentAgentName}function tt(e){return y(e.mode)}function nt(e){return(0,$.jsx)(re,{value:e.name,className:`w-auto whitespace-nowrap`,children:e.name},e.name)}var rt=10485760,it=5,at=e=>{let t=(0,be.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(z,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,className:`inline-flex items-center justify-center text-muted-foreground/50 hover:text-muted-foreground transition-colors`,children:(0,$.jsx)(j,{name:`information`,className:`h-3.5 w-3.5`})})}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,$.jsxs)(V,{children:[r,(0,$.jsx)(B,{side:`top`,className:`max-w-[240px]`,children:n})]}),t[1]=n,t[2]=i),i},ot=e=>{let t=(0,be.c)(9),{htmlFor:n,required:r,children:i,info:a}=e,o;t[0]===r?o=t[1]:(o=r&&(0,$.jsx)(`span`,{className:`text-destructive ml-0.5`,children:`*`}),t[0]=r,t[1]=o);let s;t[2]!==i||t[3]!==n||t[4]!==o?(s=(0,$.jsxs)(`label`,{htmlFor:n,className:`typography-meta font-medium text-foreground`,children:[i,o]}),t[2]=i,t[3]=n,t[4]=o,t[5]=s):s=t[5];let c=a&&a,l;return t[6]!==s||t[7]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l},st=e=>{let t=h(e.path),n=e.icon?ce[e.icon]:null,r=e.color?F[e.color]:void 0,i=(0,$.jsx)(j,{name:n??`folder`,className:`h-3.5 w-3.5`,style:r?{color:r}:void 0});return(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center overflow-hidden text-muted-foreground`,children:e.iconImage?(0,$.jsx)(ie,{project:e,className:`size-full object-contain`,fallback:i}):i}),(0,$.jsx)(`span`,{className:`truncate`,children:t})]})},ct=({initialPrompt:e,onCreated:n,onCancel:r,isWindowed:i=!1})=>{let{t:a}=m(),[o,s]=Z.useState(``),[c,u]=Z.useState(()=>[{id:Pe(),prompt:``,models:[]}]),[d,f]=Z.useState(``),[h,y]=Z.useState([]),[b,x]=Z.useState(!1),[T,D]=Z.useState([]),[O,k]=Z.useState(!1),[A,ee]=Z.useState(!1),[te,N]=Z.useState(!0),ne=Z.useRef(null),ie=l(e=>e.currentDirectory??null),oe=Z.useMemo(()=>{if(typeof window>`u`)return null;let e=window.__VSCODE_CONFIG__?.workspaceFolder;return typeof e==`string`&&e.trim().length>0?e.trim():null},[]),P=w(e=>e.activeProjectId),ce=w(e=>e.setActiveProjectIdOnly),F=w(e=>e.projects),[I,L]=Z.useState(()=>P??null);Z.useEffect(()=>{if(P){L(P);return}!I&&F.length>0&&L(F[0].id)},[P,F,I]);let H=Z.useMemo(()=>I?F.find(e=>e.id===I)??null:null,[F,I]),U=H?.path??ie,W=p(e=>{L(e),e!==P&&ce(e)}),G=Z.useMemo(()=>{if(H?.path)return{id:H.id,path:H.path};let e=ie??oe;return e?{id:`path:${e}`,path:e}:null},[H,ie,oe]),[K]=Z.useState(()=>typeof window<`u`&&t()),q=Z.useMemo(()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),[]),J=de(),Y=Z.useMemo(()=>{if(typeof window>`u`)return null;let e=window.__YURI_MACOS_MAJOR__;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;if(typeof navigator>`u`)return null;let t=(navigator.userAgent||``).match(/Mac OS X (\d+)[._](\d+)/);if(!t)return null;let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);return Number.isNaN(n)?null:n===10?r:n},[]),X=Z.useMemo(()=>K&&q||J?`pl-[5.5rem]`:`pl-3`,[K,q,J]),fe=Z.useMemo(()=>!K||!q||Y===null?``:Y>=26?`h-12`:Y<=15?`h-14`:``,[K,q,Y]),pe=p(async e=>{e.target.closest(`button, a, input, select, textarea`)||e.button===0&&K&&await v()}),me=p(e=>{r&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r())}),ge=!!r;Z.useEffect(()=>{if(ge)return window.addEventListener(`keydown`,me,!0),()=>window.removeEventListener(`keydown`,me,!0)},[ge]);let[be,xe]=Z.useState(``),{isLoading:Se,isGitRepository:Q}=We(U),Ce=Z.useRef(!1),we=Q===!0,Te=we&&te;Z.useEffect(()=>{if(Q===!1){Ce.current=!0,N(!1);return}Q===!0&&Ce.current&&(Ce.current=!1,N(!0))},[Q]);let Ee=Me(e=>e.createMultiRun),De=Me(e=>e.error),Oe=Me(e=>e.clearError);Z.useEffect(()=>{typeof e==`string`&&e.trim().length>0&&u(t=>{let n=[...t];return n.length>0&&!n[0].prompt.trim()&&(n[0]={...n[0],prompt:e}),n})},[e]),Z.useEffect(()=>{if(!G)return;let e=!1;return ee(!0),(async()=>{try{let t=await E(G);e||D(t)}catch{}finally{e||ee(!1)}})(),()=>{e=!0}},[G]);let ke=p((e,t)=>{u(n=>n.map(n=>n.id===e?{...n,...t}:n))}),Ae=p(e=>{u(t=>t.filter(t=>t.id!==e))}),je=p(()=>{u(e=>[...e,{id:Pe(),prompt:``,models:[]}])}),Ne=async e=>{let t=e.target.files;if(!t)return;let n=0;for(let e=0;e<t.length;e++){let r=t[e];if(r.size>rt){S.error(a(`multirun.launcher.toast.fileTooLarge`,{fileName:r.name}));continue}try{let e=await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=t,n.readAsDataURL(r)});y(t=>[...t,{id:Pe(),filename:r.name,mimeType:r.type||`application/octet-stream`,size:r.size,dataUrl:e}]),n++}catch(e){console.error(`File attach failed`,e),S.error(a(`multirun.launcher.toast.attachFailed`,{fileName:r.name}))}}n>0&&S.success(a(n===1?`multirun.launcher.toast.attachedSingle`:`multirun.launcher.toast.attachedPlural`,{count:n})),ne.current&&(ne.current.value=``)},Fe=e=>{y(t=>t.filter(t=>t.id!==e))},Ie=Z.useMemo(()=>c.reduce((e,t)=>e+t.models.length,0),[c]),Le=async e=>{e.preventDefault();let t=c.filter(e=>e.prompt.trim()&&e.models.length>=1);if(t.length!==0&&!(Ie<1)){x(!0),Oe();try{I&&I!==P&&ce(I);let e=h.map(e=>({mime:e.mimeType,filename:e.filename,url:e.dataUrl})),r=T.filter(e=>e.trim().length>0),i=t.map(e=>({prompt:e.prompt.trim(),models:e.models.map(e=>({providerID:e.providerID,modelID:e.modelID,displayName:e.displayName,variant:e.variant}))})),a={name:o.trim(),groups:i,agent:d||void 0,worktreeBaseBranch:Te?be:void 0,isolateRuns:Te,files:e.length>0?e:void 0,setupCommands:r.length>0?r:void 0},s=await Ee(a);s&&(s.firstSessionId&&C.getState().setCurrentSession(s.firstSessionId),n?.())}finally{x(!1)}}},Re=!!(o.trim()&&c.some(e=>e.prompt.trim()&&e.models.length>=1)&&Ie>=1&&U&&!Se&&(Q===!1||!Te||be)),ze=T.filter(e=>e.trim()).length;return(0,$.jsxs)(`form`,{onSubmit:Le,className:`flex flex-col h-full bg-background`,children:[i?null:(0,$.jsxs)(`header`,{onMouseDown:pe,className:g(`relative flex h-12 shrink-0 items-center justify-center border-b app-region-drag select-none`,X,fe),style:{borderColor:`var(--interactive-border)`},children:[(0,$.jsx)(`h1`,{className:`typography-ui-label font-medium`,children:a(`multirun.launcher.title`)}),r&&(0,$.jsx)(`div`,{className:`absolute right-0 flex items-center pr-3`,children:(0,$.jsxs)(V,{children:[(0,$.jsx)(z,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,onClick:r,"aria-label":a(`multirun.launcher.actions.closeEsc`),className:`inline-flex h-9 w-9 items-center justify-center p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-interactive-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary app-region-no-drag`,children:(0,$.jsx)(j,{name:`close`,className:`h-5 w-5`})})}),(0,$.jsx)(B,{children:(0,$.jsx)(`p`,{children:a(`multirun.launcher.actions.closeEsc`)})})]})})]}),(0,$.jsx)(he,{className:`flex-1 min-h-0 overflow-auto`,size:64,hideTopShadow:!0,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-2xl px-4 sm:px-6 py-5`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,$.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-project`,required:!0,children:a(`multirun.launcher.project.label`)}),F.length>0?(0,$.jsxs)(le,{value:I??void 0,onValueChange:W,children:[(0,$.jsx)(ae,{id:`multirun-project`,size:`lg`,className:`w-fit max-w-full`,children:H?(0,$.jsx)(ue,{children:st(H)}):(0,$.jsx)(ue,{placeholder:a(`multirun.launcher.project.placeholder`)})}),(0,$.jsx)(se,{fitContent:!0,children:F.map(e=>(0,$.jsx)(re,{value:e.id,className:`max-w-[24rem]`,children:st(e)},e.id))})]}):(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground py-2`,children:a(`multirun.launcher.project.empty`)})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`group-name`,required:!0,info:(0,$.jsx)(at,{children:a(`multirun.launcher.groupName.info`)}),children:a(`multirun.launcher.groupName.label`)}),(0,$.jsx)(R,{id:`group-name`,value:o,onChange:e=>s(e.target.value),placeholder:a(`multirun.launcher.groupName.placeholder`),className:`typography-meta w-full`,required:!0})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-worktree-base-branch`,info:(0,$.jsx)(at,{children:a(`multirun.launcher.baseBranch.info`)}),children:a(`multirun.launcher.baseBranch.label`)}),(0,$.jsx)(Xe,{directory:U,value:be,onChange:xe,disabled:!Te,id:`multirun-worktree-base-branch`}),(0,$.jsxs)(`label`,{className:`mt-1.5 flex w-fit items-center gap-1.5 typography-micro text-muted-foreground`,children:[(0,$.jsx)(M,{checked:te,onChange:N,disabled:!we,ariaLabel:a(`multirun.launcher.isolateRuns.label`)}),(0,$.jsx)(`span`,{children:a(`multirun.launcher.isolateRuns.label`)})]})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(ot,{htmlFor:`multirun-agent`,info:(0,$.jsx)(at,{children:a(`multirun.launcher.agent.info`)}),children:a(`multirun.launcher.agent.label`)}),(0,$.jsx)(Ze,{value:d,onChange:f,id:`multirun-agent`})]})]}),(0,$.jsxs)(ye,{open:O,onOpenChange:k,children:[(0,$.jsxs)(ve,{className:`w-full flex items-center gap-2 py-1.5 px-2 -mx-2 rounded-lg hover:bg-[var(--interactive-hover)]/50 transition-colors group`,children:[(0,$.jsx)(j,{name:`terminal`,className:`h-3.5 w-3.5 text-muted-foreground/70`}),(0,$.jsx)(`span`,{className:`typography-meta font-medium text-muted-foreground group-hover:text-foreground transition-colors`,children:a(`multirun.launcher.setupCommands.label`)}),ze>0&&(0,$.jsx)(`span`,{className:`inline-flex items-center justify-center h-4 min-w-4 px-1 rounded-full typography-micro font-medium`,style:{backgroundColor:`var(--primary-base)`,color:`var(--primary-foreground)`,fontSize:`0.625rem`,lineHeight:1},children:ze}),(0,$.jsx)(j,{name:`arrow-down-s`,className:g(`h-3.5 w-3.5 text-muted-foreground/50 transition-transform duration-200 ml-auto`,O&&`rotate-180`)})]}),(0,$.jsx)(_e,{children:(0,$.jsx)(`div`,{className:`pt-2 space-y-1.5`,children:A?(0,$.jsx)(`p`,{className:`typography-meta text-muted-foreground/70 px-2`,children:a(`multirun.launcher.setupCommands.loading`)}):(0,$.jsxs)($.Fragment,{children:[T.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(R,{value:e,onChange:e=>{let n=[...T];n[t]=e.target.value,D(n)},placeholder:a(`multirun.launcher.setupCommands.commandPlaceholder`),className:`h-8 flex-1 font-mono text-xs`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>D(T.filter((e,n)=>n!==t)),className:`flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,"aria-label":a(`multirun.launcher.setupCommands.removeCommandAria`),children:(0,$.jsx)(j,{name:`close`,className:`h-3.5 w-3.5`})})]},`${e}-${t}`)),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>D([...T,``]),className:`flex items-center gap-1 typography-meta text-muted-foreground hover:text-foreground transition-colors px-1`,children:[(0,$.jsx)(j,{name:`add`,className:`h-3 w-3`}),a(`multirun.launcher.setupCommands.addCommand`)]})]})})})]}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(ot,{htmlFor:`prompt`,required:!0,children:a(`multirun.launcher.attachments.label`)}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,$.jsx)(`input`,{ref:ne,type:`file`,multiple:!0,className:`hidden`,onChange:Ne,accept:`*/*`}),(0,$.jsxs)(V,{children:[(0,$.jsx)(z,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>ne.current?.click(),className:`inline-flex items-center gap-1 h-6 px-2 rounded-md typography-micro text-muted-foreground hover:text-foreground hover:bg-[var(--interactive-hover)]/50 transition-colors`,children:[(0,$.jsx)(j,{name:`attachment-2`,className:`h-3 w-3`}),a(`multirun.launcher.attachments.attach`)]})}),(0,$.jsx)(B,{children:a(`multirun.launcher.attachments.tooltip`)})]}),h.map(e=>(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md typography-micro border`,style:{backgroundColor:`var(--surface-elevated)`,borderColor:`var(--interactive-border)`},children:[e.mimeType.startsWith(`image/`)?(0,$.jsx)(j,{name:`file-image`,className:`h-3 w-3 text-muted-foreground`}):(0,$.jsx)(j,{name:`file`,className:`h-3 w-3 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`truncate max-w-[100px]`,title:e.filename,children:e.filename}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>Fe(e.id),className:`text-muted-foreground hover:text-destructive`,children:(0,$.jsx)(j,{name:`close`,className:`h-3 w-3`})})]},e.id))]})]}),c.map((e,t)=>(0,$.jsx)(lt,{group:e,groupIndex:t,canRemove:c.length>1,onUpdate:ke,onRemove:Ae},e.id)),(0,$.jsxs)(`button`,{type:`button`,onClick:je,className:`flex items-center gap-1.5 py-2 px-3 -mx-3 rounded-lg typography-meta font-medium text-muted-foreground hover:text-foreground hover:bg-[var(--interactive-hover)]/50 transition-colors`,children:[(0,$.jsx)(j,{name:`add`,className:`h-3.5 w-3.5`}),a(`multirun.launcher.groups.addGroup`)]}),De&&(0,$.jsx)(`div`,{className:`px-3 py-2 rounded-lg typography-meta`,style:{backgroundColor:`var(--status-error-background)`,color:`var(--status-error)`,borderWidth:1,borderColor:`var(--status-error-border)`},children:De})]})})}),(0,$.jsx)(`div`,{className:`shrink-0 px-4 sm:px-6 py-3`,children:(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-2xl flex items-center justify-end gap-2`,children:[!Te&&Q!==null?(0,$.jsxs)(`div`,{className:`mr-auto flex min-w-0 items-center gap-1.5 typography-micro text-muted-foreground`,children:[(0,$.jsx)(j,{name:`information`,className:`h-3.5 w-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:a(`multirun.launcher.project.gitRequired`)})]}):null,(0,$.jsx)(_,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:a(`multirun.launcher.actions.cancel`)}),(0,$.jsx)(_,{type:`submit`,size:`sm`,disabled:!Re||b,children:b?a(`multirun.launcher.actions.creating`):(0,$.jsx)($.Fragment,{children:a(`multirun.launcher.actions.startWithRunCount`,{count:Ie})})})]})})]})},lt=e=>{let t=(0,be.c)(94),{group:n,groupIndex:r,canRemove:i,onUpdate:a,onRemove:o}=e,{t:s}=m(),[c,l]=Z.useState(!1),[u,d]=Z.useState(``),[f,h]=Z.useState(!1),[g,_]=Z.useState(``),v=Z.useRef(null),y=Z.useRef(null),b=Z.useRef(null),x;t[0]!==n.id||t[1]!==n.models||t[2]!==a?(x=e=>{n.models.length>=it||a(n.id,{models:[...n.models,e]})},t[0]=n.id,t[1]=n.models,t[2]=a,t[3]=x):x=t[3];let S=p(x),C;t[4]!==n.id||t[5]!==n.models||t[6]!==a?(C=e=>{a(n.id,{models:n.models.filter((t,n)=>n!==e)})},t[4]=n.id,t[5]=n.models,t[6]=a,t[7]=C):C=t[7];let w=p(C),T;t[8]!==n.id||t[9]!==n.models||t[10]!==a?(T=(e,t)=>{a(n.id,{models:n.models.map((n,r)=>r===e?t:n)})},t[8]=n.id,t[9]=n.models,t[10]=a,t[11]=T):T=t[11];let E=p(T),D;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(e,t)=>{if(e.startsWith(`/`)){let n=e.indexOf(` `),r=e.indexOf(`
2
2
  `),i=Math.min(n===-1?e.length:n,r===-1?e.length:r);if(t<=i&&n===-1){_(e.substring(1,i)),h(!0),l(!1);return}}h(!1);let n=e.substring(0,t),r=n.lastIndexOf(`@`);if(r!==-1){let e=r>0?n[r-1]:null,t=n.substring(r+1);(!e||/\s/.test(e))&&!t.includes(` `)&&!t.includes(`
3
3
  `)?(d(t),l(!0)):l(!1);return}l(!1)},t[12]=D):D=t[12];let O=p(D),k;t[13]!==n.id||t[14]!==a?(k=e=>{a(n.id,{prompt:e})},t[13]=n.id,t[14]=a,t[15]=k):k=t[15];let A=p(k),ee;t[16]!==n.prompt||t[17]!==A||t[18]!==O?(ee=e=>{let t=n.prompt,r=v.current?.selectionStart??t.length,i=t.substring(0,r).lastIndexOf(`@`),a=e.relativePath&&e.relativePath.trim().length>0?e.relativePath.trim():e.path||e.name,o=fe(t,i===-1?r:i,r,`@${a}`);A(o.text),l(!1),d(``),requestAnimationFrame(()=>{let e=v.current;e&&(e.selectionStart=o.caret,e.selectionEnd=o.caret,e.focus()),O(o.text,o.caret)})},t[16]=n.prompt,t[17]=A,t[18]=O,t[19]=ee):ee=t[19];let M=p(ee),te;t[20]!==n.prompt||t[21]!==A||t[22]!==O?(te=e=>{let t=n.prompt,r=v.current?.selectionStart??t.length,i=t.substring(0,r).lastIndexOf(`@`),a=fe(t,i===-1?r:i,r,`@${e}`);A(a.text),l(!1),d(``),requestAnimationFrame(()=>{let e=v.current;e&&(e.selectionStart=a.caret,e.selectionEnd=a.caret,e.focus()),O(a.text,a.caret)})},t[20]=n.prompt,t[21]=A,t[22]=O,t[23]=te):te=t[23];let N=p(te),ne;t[24]!==A||t[25]!==O?(ne=e=>{let t=`/${e.name} `;A(t),h(!1),_(``),requestAnimationFrame(()=>{let e=v.current;e&&(e.focus(),e.selectionStart=e.value.length,e.selectionEnd=e.value.length),O(t,t.length)})},t[24]=A,t[25]=O,t[26]=ne):ne=t[26];let re=p(ne),ie;t[27]!==f||t[28]!==c?(ie=e=>{if(f&&b.current&&(e.key===`Enter`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`Escape`||e.key===`Tab`)){e.preventDefault(),b.current.handleKeyDown(e.key);return}c&&y.current&&(e.key===`Enter`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`Escape`||e.key===`Tab`)&&(e.preventDefault(),y.current.handleKeyDown(e.key))},t[27]=f,t[28]=c,t[29]=ie):ie=t[29];let ae=p(ie),oe=r+1,P;t[30]!==s||t[31]!==oe?(P=s(`multirun.launcher.groups.groupLabel`,{index:oe}),t[30]=s,t[31]=oe,t[32]=P):P=t[32];let se;t[33]===P?se=t[34]:(se=(0,$.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:P}),t[33]=P,t[34]=se);let ce;t[35]!==i||t[36]!==n.id||t[37]!==o||t[38]!==s?(ce=i&&(0,$.jsx)(`button`,{type:`button`,onClick:()=>o(n.id),className:`inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10`,"aria-label":s(`multirun.launcher.groups.removeGroup`),children:(0,$.jsx)(j,{name:`close`,className:`h-3.5 w-3.5`})}),t[35]=i,t[36]=n.id,t[37]=o,t[38]=s,t[39]=ce):ce=t[39];let le;t[40]!==se||t[41]!==ce?(le=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[se,ce]}),t[40]=se,t[41]=ce,t[42]=le):le=t[42];let F;t[43]===s?F=t[44]:(F=s(`multirun.launcher.groups.prompt.label`),t[43]=s,t[44]=F);let I;t[45]===F?I=t[46]:(I=(0,$.jsx)(ot,{required:!0,children:F}),t[45]=F,t[46]=I);let ue=n.prompt,L;t[47]!==A||t[48]!==O?(L=e=>{let t=e.target.value;A(t);let n=e.target.selectionStart??t.length;O(t,n)},t[47]=A,t[48]=O,t[49]=L):L=t[49];let R;t[50]===s?R=t[51]:(R=s(`multirun.launcher.groups.prompt.placeholder`),t[50]=s,t[51]=R);let z;t[52]!==n.prompt||t[53]!==ae||t[54]!==L||t[55]!==R?(z=(0,$.jsx)(ge,{ref:v,value:ue,onChange:L,onKeyDown:ae,placeholder:R,className:`typography-meta min-h-[80px] max-h-[200px] resize-none overflow-y-auto field-sizing-content`,required:!0}),t[52]=n.prompt,t[53]=ae,t[54]=L,t[55]=R,t[56]=z):z=t[56];let B;t[57]!==g||t[58]!==re||t[59]!==f?(B=f?(0,$.jsx)(pe,{ref:b,searchQuery:g,onCommandSelect:re,onClose:()=>h(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[57]=g,t[58]=re,t[59]=f,t[60]=B):B=t[60];let V;t[61]!==N||t[62]!==M||t[63]!==u||t[64]!==c?(V=c?(0,$.jsx)(H,{ref:y,searchQuery:u,onFileSelect:M,onAgentSelect:N,onSkillSelect:e=>N(e.name),onClose:()=>l(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[61]=N,t[62]=M,t[63]=u,t[64]=c,t[65]=V):V=t[65];let de;t[66]!==z||t[67]!==B||t[68]!==V?(de=(0,$.jsxs)(`div`,{className:`relative`,children:[z,B,V]}),t[66]=z,t[67]=B,t[68]=V,t[69]=de):de=t[69];let U;t[70]!==I||t[71]!==de?(U=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[I,de]}),t[70]=I,t[71]=de,t[72]=U):U=t[72];let W;t[73]===s?W=t[74]:(W=s(`multirun.launcher.models.info`,{max:it}),t[73]=s,t[74]=W);let G;t[75]===W?G=t[76]:(G=(0,$.jsx)(at,{children:W}),t[75]=W,t[76]=G);let K;t[77]===s?K=t[78]:(K=s(`multirun.launcher.models.label`),t[77]=s,t[78]=K);let q;t[79]!==G||t[80]!==K?(q=(0,$.jsx)(ot,{required:!0,info:G,children:K}),t[79]=G,t[80]=K,t[81]=q):q=t[81];let J;t[82]!==n.models||t[83]!==S||t[84]!==w||t[85]!==E?(J=(0,$.jsx)(Ie,{selectedModels:n.models,onAdd:S,onRemove:w,onUpdate:E,minModels:1,maxModels:it}),t[82]=n.models,t[83]=S,t[84]=w,t[85]=E,t[86]=J):J=t[86];let Y;t[87]!==q||t[88]!==J?(Y=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[q,J]}),t[87]=q,t[88]=J,t[89]=Y):Y=t[89];let X;return t[90]!==le||t[91]!==U||t[92]!==Y?(X=(0,$.jsxs)(`div`,{className:`rounded-lg border border-border p-3 space-y-3`,children:[le,U,Y]}),t[90]=le,t[91]=U,t[92]=Y,t[93]=X):X=t[93],X};export{Te as a,Pe as i,Ze as n,Ce as o,Ie as r,ct as t};
@@ -1 +1 @@
1
- import{a as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as t}from"./platform-kv0OsX45.js";import{t as n}from"./types-CfsdaRmC.js";var r=e(`YuriUpdateConfig`);async function i(){if(!t())throw new n;let e=await r.getConfiguration();if(e.channel!==`stable`&&e.channel!==`beta`||typeof e.shellApiVersion!=`number`||!Number.isInteger(e.shellApiVersion)||e.shellApiVersion<1)throw Error(`Invalid native update configuration`);return{channel:e.channel,shellApiVersion:e.shellApiVersion}}export{i as t};
1
+ import{a as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as t}from"./platform-kv0OsX45.js";import{t as n}from"./types-BUsGt9HF.js";var r=e(`YuriUpdateConfig`);async function i(){if(!t())throw new n;let e=await r.getConfiguration();if(e.channel!==`stable`&&e.channel!==`beta`||typeof e.shellApiVersion!=`number`||!Number.isInteger(e.shellApiVersion)||e.shellApiVersion<1)throw Error(`Invalid native update configuration`);return{channel:e.channel,shellApiVersion:e.shellApiVersion}}export{i as t};