@yuriai/web 0.3.3-beta.2 → 0.3.3-beta.6

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 (127) hide show
  1. package/dist/assets/{AgentAvatar-tFfpSF5F.js → AgentAvatar-CrUv9gTt.js} +1 -1
  2. package/dist/assets/{AssistantConversationSurface-B-iO-AUW.js → AssistantConversationSurface-Cc6aVDu6.js} +3 -3
  3. package/dist/assets/{AssistantSessionCard-DTPufGP2.js → AssistantSessionCard-BmhD5W6i.js} +2 -2
  4. package/dist/assets/{AssistantUnreadBadge-BV2cbiJo.js → AssistantUnreadBadge-ChMjxJpd.js} +1 -1
  5. package/dist/assets/{AssistantView-iKt4ZcoR.js → AssistantView-DvvRhVy5.js} +1 -1
  6. package/dist/assets/{DiagramView-SHoXhtXa.js → DiagramView-Bx4MHn6w.js} +1 -1
  7. package/dist/assets/{FadeInOnReveal-4E61VUmD.js → FadeInOnReveal-CCYD6XoW.js} +1 -1
  8. package/dist/assets/{GuiPluginPage-Bt5j7vkr.js → GuiPluginPage-Dk98X93G.js} +1 -1
  9. package/dist/assets/{GuiPluginSurface-Bs9Pauc8.js → GuiPluginSurface-D7HG0akj.js} +1 -1
  10. package/dist/assets/{GuiPluginWindow-cnUkWFge.js → GuiPluginWindow-GczL--5K.js} +1 -1
  11. package/dist/assets/Icon-Di_QdcPG.js +1 -0
  12. package/dist/assets/{ImageLoadingPlaceholder-BBMhxtKr.js → ImageLoadingPlaceholder-Bl9JFPan.js} +1 -1
  13. package/dist/assets/{LoadingImage-6BZsPXXb.js → LoadingImage-C4cAJD72.js} +1 -1
  14. package/dist/assets/{MarkdownRenderer-Bjl6sXps.js → MarkdownRenderer-B5s2OsEB.js} +2 -2
  15. package/dist/assets/{MarkdownRendererImpl-tZSoVcrU.js → MarkdownRendererImpl-D-UkyQuG.js} +2 -2
  16. package/dist/assets/{MarkstreamRendererImpl-Br2_lE4f.js → MarkstreamRendererImpl-CR66WFFY.js} +1 -1
  17. package/dist/assets/{MobileDetailNavigation-B7vAsqVU.js → MobileDetailNavigation-BBD0XNgQ.js} +1 -1
  18. package/dist/assets/{MobileResizableSheet-BJs0jEqn.js → MobileResizableSheet-BnyO-EeM.js} +1 -1
  19. package/dist/assets/{MobileShareBridge-Cb9GvxGv.js → MobileShareBridge-B9_01pMV.js} +1 -1
  20. package/dist/assets/MobileSurface-D80bMoDS.js +2 -0
  21. package/dist/assets/{MultiRunWindow-DPM25lxz.js → MultiRunWindow-CHNKLgpu.js} +1 -1
  22. package/dist/assets/{OnboardingScreen-D7ns1Tb2.js → OnboardingScreen-IW7mgTbp.js} +1 -1
  23. package/dist/assets/{OverlayScrollbar-B1PH1Jtv.js → OverlayScrollbar-Y8emBCvD.js} +1 -1
  24. package/dist/assets/{RemoteAssistantSessionCard-BLp9NZhL.js → RemoteAssistantSessionCard-CsS0IEzX.js} +1 -1
  25. package/dist/assets/{SettingsView-CaC2DI4Z.js → SettingsView-DsdNryfB.js} +10 -10
  26. package/dist/assets/{SettingsWindow-gVPRXQDh.js → SettingsWindow-Duoh0yJA.js} +1 -1
  27. package/dist/assets/{SetupTourDialog-BoQIvdEP.js → SetupTourDialog-CorV2qZg.js} +1 -1
  28. package/dist/assets/{TerminalView-CxlIRxha.js → TerminalView-Dkk1cVgf.js} +3 -3
  29. package/dist/assets/{ToolOutputDialog-Bsx1wpVW.js → ToolOutputDialog-BnOil_Y-.js} +1 -1
  30. package/dist/assets/{VoiceSettings-DhA9feRU.js → VoiceSettings-ciGa8WKn.js} +2 -2
  31. package/dist/assets/{YuriLogo-BKdnDJwl.js → YuriLogo-BJ6Ao0du.js} +1 -1
  32. package/dist/assets/{capgoAdapter-vj-M8YQp.js → capgoAdapter-BR9RFIfy.js} +1 -1
  33. package/dist/assets/{checkbox-DVMeOiMB.js → checkbox-Dytz3_ID.js} +1 -1
  34. package/dist/assets/{collapsible-D_R6x2Q_.js → collapsible-BBQwZmAQ.js} +1 -1
  35. package/dist/assets/{context-menu-BFDbtdmK.js → context-menu-xDEMpuCk.js} +1 -1
  36. package/dist/assets/{diagram-CrjNCLmc.js → diagram-DSwu2yKQ.js} +1 -1
  37. package/dist/assets/dialog-D9CkSNCA.css +1 -0
  38. package/dist/assets/{dialog-CHzvxSP4.js → dialog-Dzn-bQVo.js} +1 -1
  39. package/dist/assets/{es-DuTK1iYh.js → es-DeIqmCOk.js} +1 -1
  40. package/dist/assets/{fileMentionTouchSelection-D9GbR7zD.js → fileMentionTouchSelection-CFrWx6JK.js} +1 -1
  41. package/dist/assets/{fileReferenceActions-DLTUzjwi.js → fileReferenceActions-I56JyL1L.js} +1 -1
  42. package/dist/assets/{fr-C_XToFWm.js → fr-6zgvS9k_.js} +1 -1
  43. package/dist/assets/{gitApi-i_uT8MNk.js → gitApi-Cxw-b-S_.js} +1 -1
  44. package/dist/assets/gitApiHttp-CODO8JTV.js +3 -0
  45. package/dist/assets/{i18n-BvjeIWrT.js → i18n-Bfzj0WR9.js} +1 -1
  46. package/dist/assets/{input-Ck9_Qln_.js → input-D7D-3e9R.js} +1 -1
  47. package/dist/assets/insertionBoundaries-JO44Mllr.js +1 -0
  48. package/dist/assets/{ja-D0pDybpB.js → ja-DQM9NnCu.js} +1 -1
  49. package/dist/assets/{ko-CAzlaaDJ.js → ko-BSB5UaTU.js} +1 -1
  50. package/dist/assets/main-BVNVtnJ2.js +169 -0
  51. package/dist/assets/{main-_RMi6lwy.js → main-ezlqSGuw.js} +2 -2
  52. package/dist/assets/{markdownHeightCache-CnLR3-I2.js → markdownHeightCache-BPOYloX8.js} +1 -1
  53. package/dist/assets/{mcpQueries-MmcRk0_G.js → mcpQueries-D1Y8jS59.js} +1 -1
  54. package/dist/assets/{miniChat-CEE6OnLk.js → miniChat-DjyhdG-q.js} +2 -2
  55. package/dist/assets/{mobile-Cc6EYN5S.js → mobile-jNSOJK8S.js} +2 -2
  56. package/dist/assets/{mobileBackNavigation-C6UPWCkI.js → mobileBackNavigation-CDjFrmY0.js} +1 -1
  57. package/dist/assets/{mobileConnections-D8TC3-vN.js → mobileConnections-CAWX3Kcj.js} +2 -2
  58. package/dist/assets/multirun-Cm02Mr2G.js +3 -0
  59. package/dist/assets/{native-config-JMwpif8a.js → native-config-DsW9-ijz.js} +1 -1
  60. package/dist/assets/{navigation-toBhZ-X8.js → navigation-DPATOY-c.js} +1 -1
  61. package/dist/assets/{openRemoteProjectSession-BD2tHXKw.js → openRemoteProjectSession-DyFX_iVc.js} +1 -1
  62. package/dist/assets/{pl-BvjbUcJV.js → pl-CLtzYvN2.js} +1 -1
  63. package/dist/assets/projectMeta-CfR3wyL_.js +1 -0
  64. package/dist/assets/{pt-BR-D71qrP91.js → pt-BR-DHHBbOs_.js} +1 -1
  65. package/dist/assets/pwa-NS2m1emq.js +2 -0
  66. package/dist/assets/{queue-abort-optimistic-BizaMpYT.js → queue-abort-optimistic-b6yciGim.js} +1 -1
  67. package/dist/assets/{react-DeCzn0Uc.js → react-Tx7JylRi.js} +1 -1
  68. package/dist/assets/{readiness-CekKZ6au.js → readiness-DSoWdMsS.js} +2 -2
  69. package/dist/assets/{reference-history-cPgFTsku.js → reference-history-C-uAk3vA.js} +1 -1
  70. package/dist/assets/{remoteSessionReference-Da4ThgtH.js → remoteSessionReference-Dt-1LC6L.js} +1 -1
  71. package/dist/assets/renderElectronMiniChatApp-P2AchMs8.js +2 -0
  72. package/dist/assets/renderMobileApp-MngDLpRV.js +29 -0
  73. package/dist/assets/{runtimeConfig-CPU1CoUI.js → runtimeConfig-BL7RTChM.js} +1 -1
  74. package/dist/assets/runtimeEndpointReset-DtqLL5aK.js +151 -0
  75. package/dist/assets/{scheduledTaskNavigation-CdBHn9ti.js → scheduledTaskNavigation-DkvuAc9T.js} +1 -1
  76. package/dist/assets/{select-BnDfHG_T.js → select-CFaRXt8t.js} +1 -1
  77. package/dist/assets/{sessionLookup-mQtUvdep.js → sessionLookup-5sf3gI5Y.js} +1 -1
  78. package/dist/assets/{sortable-tabs-strip-BwnT5maB.js → sortable-tabs-strip-CbBdtUqa.js} +1 -1
  79. package/dist/assets/{speechSettingsQueries-mH-OoFPq.js → speechSettingsQueries-BiYS8kXM.js} +1 -1
  80. package/dist/assets/src-AdfuQoIg.css +2 -0
  81. package/dist/assets/{store-Dj5cSf8B.js → store-DHAsbqgT.js} +3 -3
  82. package/dist/assets/{terminalApi-CwTOFYhX.js → terminalApi-G5w9aIzr.js} +1 -1
  83. package/dist/assets/{textarea-CVswImHY.js → textarea-BmnYSVu_.js} +1 -1
  84. package/dist/assets/{tooltip-DovnVenD.js → tooltip-R2z0xQFW.js} +1 -1
  85. package/dist/assets/{types-CnPxR5yQ.js → types-e0zJKRUL.js} +1 -1
  86. package/dist/assets/{uk-C7c1Zece.js → uk-CyIloyBp.js} +1 -1
  87. package/dist/assets/{useAppFontEffects-wm0ojvh7.js → useAppFontEffects-oL2HGfzG.js} +32 -32
  88. package/dist/assets/{useAssistantUIStore-CI42fWZh.js → useAssistantUIStore-MY4QWnVQ.js} +1 -1
  89. package/dist/assets/useDesktopWindowControlsLayout-BuN9KNjx.js +1 -0
  90. package/dist/assets/{useDictation-OLmxagFb.js → useDictation-BNEvKslr.js} +1 -1
  91. package/dist/assets/{useEffectiveDirectory-BN5qbhev.js → useEffectiveDirectory-gMI2T7Pz.js} +1 -1
  92. package/dist/assets/{useFontPreferences-DN1mCOsX.js → useFontPreferences-BqPDrGZM.js} +1 -1
  93. package/dist/assets/{useMobileNavigationStore-oveTY29a.js → useMobileNavigationStore-DRQ4Efws.js} +12 -12
  94. package/dist/assets/{usePluginsStore-DErHgEFY.js → usePluginsStore-Bj97xU5Y.js} +1 -1
  95. package/dist/assets/{useProjectRuntimeAPIs-B-ShHy6s.js → useProjectRuntimeAPIs-BfWU7Tyh.js} +1 -1
  96. package/dist/assets/{useStreamingTextThrottle-BOvHQRrH.js → useStreamingTextThrottle-DrOvDNCU.js} +1 -1
  97. package/dist/assets/useUIStore-mVT8ipsT.js +1 -0
  98. package/dist/assets/{zh-CN-D2ENuI1-.js → zh-CN-BTolbntg.js} +1 -1
  99. package/dist/assets/{zh-TW-C40BXFhK.js → zh-TW-D00IKXY1.js} +1 -1
  100. package/dist/index.html +9 -9
  101. package/dist/mini-chat.html +9 -9
  102. package/dist/mobile.html +2 -2
  103. package/package.json +1 -1
  104. package/server/lib/opencode/settings-helpers.js +6 -0
  105. package/server/lib/opencode/settings-helpers.test.js +8 -0
  106. package/server/lib/session-index/DOCUMENTATION.md +27 -0
  107. package/server/lib/session-index/event-ingest.js +6 -2
  108. package/server/lib/session-index/event-ingest.test.js +12 -0
  109. package/server/lib/session-index/routes.js +26 -0
  110. package/server/lib/session-index/routes.test.js +53 -0
  111. package/server/lib/session-index/service.js +79 -1
  112. package/server/lib/session-index/service.test.js +125 -1
  113. package/dist/assets/Icon-DebSeH2D.js +0 -1
  114. package/dist/assets/MobileSurface-BaT1L70D.js +0 -2
  115. package/dist/assets/dialog-DYOEW9DC.css +0 -1
  116. package/dist/assets/gitApiHttp-BgUDBfaJ.js +0 -3
  117. package/dist/assets/insertionBoundaries-BFmZupL3.js +0 -1
  118. package/dist/assets/main-RbzEHxam.js +0 -169
  119. package/dist/assets/multirun-BJgG4Ymw.js +0 -3
  120. package/dist/assets/projectMeta-Bh7dUtdB.js +0 -1
  121. package/dist/assets/pwa-B2AKIaf6.js +0 -2
  122. package/dist/assets/renderElectronMiniChatApp-CmmEVsXV.js +0 -2
  123. package/dist/assets/renderMobileApp-D1D1s_ia.js +0 -29
  124. package/dist/assets/runtimeEndpointReset-Bwa7I9vS.js +0 -151
  125. package/dist/assets/src-2lmG4z55.css +0 -2
  126. package/dist/assets/useDesktopWindowControlsLayout-BBizNJUb.js +0 -1
  127. package/dist/assets/useUIStore-DjizmHAt.js +0 -1
@@ -0,0 +1,3 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{F as t}from"./platform-CiUKDeXd.js";import{a as n,r}from"./vendor-zustand-CNn3HHhT.js";import{ot as i,st as a}from"./vendor-base-ui-fom6orB6.js";import{St as o}from"./gitApiHttp-CODO8JTV.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{_t as s,ft as c,n as l}from"./client-CzjApAA4.js";import{n as u}from"./vendor-react-D5BntRmA.js";import{V as d}from"./runtime-file-resource-CKQQEwNv.js";import{r as f}from"./vendor-reactuses-core-B8s-Rcd-.js";import{r as p}from"./useUIStore-mVT8ipsT.js";import{c as m,t as ee}from"./i18n-Bfzj0WR9.js";import{$r as h,Bn as g,Br as _,Ei as v,Hr as y,Ln as b,Wr as x,bi as S,f as C,ha as w,na as te,p as T,pa as E,qa as D,zn as O}from"./useMobileNavigationStore-DRQ4Efws.js";import{n as k}from"./Icon-Di_QdcPG.js";import{t as ne}from"./gitApi-Cxw-b-S_.js";import{t as A}from"./checkbox-Dytz3_ID.js";import{t as re}from"./input-D7D-3e9R.js";import{i as ie,n as j,t as ae}from"./tooltip-R2z0xQFW.js";import{a as oe}from"./device-BlmHHWT1.js";import{S as se,_ as M,a as N,c as P,f as F,l as I,m as L,o as R,p as z,r as ce,v as B,y as le}from"./insertionBoundaries-JO44Mllr.js";import{a as V,c as ue,d as H,i as U,n as de,o as W,r as G,s as fe,t as pe}from"./select-CFaRXt8t.js";import{r as K,t as me}from"./textarea-BmnYSVu_.js";import{a as q,f as J,h as he,i as Y,m as ge,n as _e}from"./projectMeta-CfR3wyL_.js";import{n as ve,r as ye,t as be}from"./collapsible-BBQwZmAQ.js";var X=e(a(),1),xe=u(),Se=/^[a-z0-9](?:[a-z0-9-]{0,48}[a-z0-9])?$/,Ce=/^g[1-9]\d*$/,Z=(e,t,n,r,i)=>{if(!Se.test(e)||t!==void 0&&!Ce.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}},we=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 Z(n,void 0,t[1],t[2],void 0);if(t.length===4){let[,e,r,i]=t;return Ce.test(e)?Z(n,e,r,i,void 0):Z(n,void 0,e,r,i)}let[,r,i,a,o]=t;return r===``?Z(n,void 0,i,a,o):Z(n,r,i,a,o)},Te=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(`/`)},Q=(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),T.getState().markSessionAsYuriCreated(e.id),S.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=D.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=o.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:o}=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 s=je();if(!s)return e({error:`Select a project`,isLoading:!1}),null;let c=s.path,u=await ne(c)&&t.isolateRuns!==!1,d=Ee(n),f=u?await J(c):void 0,p=u?await I(c):null,m=[],ee=o?.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 o=new Map;for(let g of n.models){let n=`${g.providerID}:${g.modelID}`,_=a.get(n)||1,v=(o.get(n)||0)+1;o.set(n,v);let b=De(g.providerID,g.modelID),x=r.length>1?`g${e+1}`:void 0,S=_>1?Oe(d,`${b}/${v}`):Oe(d,b),C=x?`${x}/${S}`:S,w=Te({groupSlug:d,runGroup:x,providerID:g.providerID,modelID:g.modelID,index:_>1?v:void 0});try{if(!u){let e=await l.withDirectory(c,()=>l.createSession({title:w}));Ae(e,c),m.push({sessionId:e.id,worktreePath:c,providerID:g.providerID,modelID:g.modelID,variant:g.variant,prompt:i});continue}let e=await P(s,{preferredName:C,mode:`new`,branchName:C,worktreeName:C,startRef:t.worktreeBaseBranch||`HEAD`,setupCommands:ee,returnAfterDirectoryCreated:!0},{resolvedRootTrackingRemote:p}),n={...e,createdFromBranch:f,kind:`standard`};await y(s)&&await h(e.worktreeRoot??e.path);let r=await l.withDirectory(e.path,()=>l.createSession({title:w}));Ae(r,e.path),T.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=o?.filter(e=>e.trim().length>0)??[];g.length>0&&x(s,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 b=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 C({sessionId:e.sessionId,directory:e.worktreePath,content:e.prompt,providerID:e.providerID,modelID:e.modelID,variant:e.variant,agent:i,files:b})}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`})),$=i(),Ne=`h-7`,Pe=()=>`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Fe=e=>{let t=(0,xe.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=O(`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)(H,{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)(k,{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,xe.c)(131),{selectedModels:n,onAdd:r,onRemove:i,onUpdate:a,minModels:o,addButtonLabel:s,showChips:c,maxModels:l,addButtonClassName:u,dropdownSide:d,dropdownClassName:f,containerClassName:m,triggerIcon:h}=e,g=c===void 0||c,_=d===void 0?`top`:d,{t:v}=ee(),y=te(Le),x=te(Re),S=p(ze),C=p(Be),{favoriteModelsList:T,recentModelsList:E}=ge(),D=p(Ve),ne=p(He),[A,re]=X.useState(!1),[ie,j]=X.useState(``),[ae,oe]=X.useState(null),se=X.useRef(null),M=X.useRef(null),N=l===1,P=l===void 0||n.length<l||N,F;if(t[0]!==n){F=new Map;for(let e of n){let t=`${e.providerID}:${e.modelID}`;F.set(t,(F.get(t)||0)+1)}t[0]=n,t[1]=F}else F=t[1];let I=F,L;t[2]===n?L=t[3]:(L=e=>n.filter(t=>t.providerID===e.providerID&&t.modelID===e.modelID).findIndex(t=>t.instanceId===e.instanceId)+1,t[2]=n,t[3]=L);let R=L,z,ce;t[4]!==_||t[5]!==A?(z=()=>{if(!A||!M.current)return;let e=M.current.getBoundingClientRect();if(_===`bottom`){let t=(window.visualViewport?.height??document.documentElement.clientHeight??window.innerHeight)-e.bottom-16-112;oe(Math.max(160,Math.min(320,t)));return}let t=M.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;oe(Math.max(150,Math.min(300,r)))},ce=[_,A],t[4]=_,t[5]=A,t[6]=z,t[7]=ce):(z=t[6],ce=t[7]),X.useEffect(z,ce);let B,le;t[8]!==P||t[9]!==A?(B=()=>{!P&&A&&(re(!1),j(``))},le=[P,A],t[8]=P,t[9]=A,t[10]=B,t[11]=le):(B=t[10],le=t[11]),X.useEffect(B,le);let V,H;t[12]===A?(V=t[13],H=t[14]):(V=()=>{if(!A)return;let e=e=>{se.current&&!se.current.contains(e.target)&&(re(!1),j(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},H=[A],t[12]=A,t[13]=V,t[14]=H),X.useEffect(V,H);let W;t[15]!==N||t[16]!==r||t[17]!==a||t[18]!==n.length?(W=e=>{let t={providerID:e.providerID,modelID:e.modelID,displayName:w(e.model,e.modelID)||e.modelID,instanceId:Pe()};N&&n.length>0&&a?a(0,t):r(t),N&&(re(!1),j(``))},t[15]=N,t[16]=r,t[17]=a,t[18]=n.length,t[19]=W):W=t[19];let G=W,K;t[20]===v?K=t[21]:(K=v(`multirun.modelMultiSelect.search.placeholder`),t[20]=v,t[21]=K);let me;t[22]===v?me=t[23]:(me=v(`multirun.modelMultiSelect.search.noResults`),t[22]=v,t[23]=me);let q;t[24]===v?q=t[25]:(q=v(`multirun.modelMultiSelect.sections.favorites`),t[24]=v,t[25]=q);let J;t[26]===v?J=t[27]:(J=v(`multirun.modelMultiSelect.sections.recent`),t[26]=v,t[27]=J);let Y;t[28]===v?Y=t[29]:(Y=v(`multirun.modelMultiSelect.keyboard.hint`),t[28]=v,t[29]=Y);let _e;t[30]===v?_e=t[31]:(_e=v(`settings.agents.modelSelector.actions.favorite`),t[30]=v,t[31]=_e);let ve;t[32]===v?ve=t[33]:(ve=v(`settings.agents.modelSelector.actions.unfavorite`),t[32]=v,t[33]=ve);let ye;t[34]===v?ye=t[35]:(ye=v(`chat.modelControls.provider`),t[34]=v,t[35]=ye);let be;t[36]===v?be=t[37]:(be=v(`chat.modelControls.capabilities`),t[36]=v,t[37]=be);let Se;t[38]===v?Se=t[39]:(Se=v(`chat.modelControls.capability.toolCalling`),t[38]=v,t[39]=Se);let Ce;t[40]===v?Ce=t[41]:(Ce=v(`chat.modelControls.capability.reasoning`),t[40]=v,t[41]=Ce);let Z;t[42]===v?Z=t[43]:(Z=v(`chat.modelControls.modality.image`),t[42]=v,t[43]=Z);let we;t[44]===v?we=t[45]:(we=v(`chat.modelControls.modality.video`),t[44]=v,t[45]=we);let Te;t[46]===v?Te=t[47]:(Te=v(`chat.modelControls.modality.audio`),t[46]=v,t[47]=Te);let Q;t[48]===v?Q=t[49]:(Q=v(`chat.modelControls.costPerMillion`),t[48]=v,t[49]=Q);let Ee;t[50]===v?Ee=t[51]:(Ee=v(`chat.modelControls.costInput`),t[50]=v,t[51]=Ee);let De;t[52]===v?De=t[53]:(De=v(`chat.modelControls.costOutput`),t[52]=v,t[53]=De);let Oe;t[54]!==K||t[55]!==me||t[56]!==q||t[57]!==J||t[58]!==Y||t[59]!==_e||t[60]!==ve||t[61]!==ye||t[62]!==be||t[63]!==Se||t[64]!==Ce||t[65]!==Z||t[66]!==we||t[67]!==Te||t[68]!==Q||t[69]!==Ee||t[70]!==De?(Oe={searchPlaceholder:K,noResults:me,favorites:q,recent:J,keyboardHint:Y,favorite:_e,unfavorite:ve,provider:ye,capabilities:be,capabilityToolCalling:Se,capabilityReasoning:Ce,modalityImage:Z,modalityVideo:we,modalityAudio:Te,costPerMillion:Q,costInput:Ee,costOutput:De},t[54]=K,t[55]=me,t[56]=q,t[57]=J,t[58]=Y,t[59]=_e,t[60]=ve,t[61]=ye,t[62]=be,t[63]=Se,t[64]=Ce,t[65]=Z,t[66]=we,t[67]=Te,t[68]=Q,t[69]=Ee,t[70]=De,t[71]=Oe):Oe=t[71];let ke=Oe,Ae;t[72]===m?Ae=t[73]:(Ae=O(`relative`,m),t[72]=m,t[73]=Ae);let je;t[74]===u?je=t[75]:(je=O(Ne,`!border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70`,u),t[74]=u,t[75]=je);let Me=!P,Ie;t[76]===A?Ie=t[77]:(Ie=()=>{re(!A)},t[76]=A,t[77]=Ie);let We;t[78]===h?We=t[79]:(We=h??(0,$.jsx)(k,{name:`add`,className:`h-3.5 w-3.5 mr-1`}),t[78]=h,t[79]=We);let Ge;t[80]!==s||t[81]!==v?(Ge=s??v(`multirun.modelMultiSelect.actions.addModel`),t[80]=s,t[81]=v,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)(b,{ref:M,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]!==ae||t[90]!==P||t[91]!==f||t[92]!==_||t[93]!==T||t[94]!==x||t[95]!==G||t[96]!==D||t[97]!==C||t[98]!==A||t[99]!==ke||t[100]!==I||t[101]!==ne||t[102]!==y||t[103]!==E||t[104]!==ie||t[105]!==S?(qe=A?(0,$.jsx)(`div`,{className:O(`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`,_===`top`?`bottom-full mb-1`:`top-full mt-1`,f),style:{background:`linear-gradient(var(--surface-elevated),var(--surface-elevated)),linear-gradient(var(--surface-background),var(--surface-background))`},children:(0,$.jsx)(he,{providers:y,providerOrder:ne,favoriteModels:T,recentModels:E,getMetadata:x,hiddenModels:D,searchQuery:ie,onSearchQueryChange:j,onSelect:G,labels:ke,selectionCount:e=>I.get(`${e.providerID}:${e.modelID}`)||0,disabled:!P,maxHeightClassName:`flex-1`,maxHeightStyle:{maxHeight:ae?`${ae}px`:`300px`},stickyHeaders:!0,tooltipsEnabled:A,isFavorite:e=>C(e.providerID,e.modelID),onToggleFavorite:e=>S(e.providerID,e.modelID),onEscape:()=>{re(!1),j(``)}})}):null,t[89]=ae,t[90]=P,t[91]=f,t[92]=_,t[93]=T,t[94]=x,t[95]=G,t[96]=D,t[97]=C,t[98]=A,t[99]=ke,t[100]=I,t[101]=ne,t[102]=y,t[103]=E,t[104]=ie,t[105]=S,t[106]=qe):qe=t[106];let Je;t[107]!==Ae||t[108]!==Ke||t[109]!==qe?(Je=(0,$.jsxs)(`div`,{className:Ae,ref:se,children:[Ke,qe]}),t[107]=Ae,t[108]=Ke,t[109]=qe,t[110]=Je):Je=t[110];let Ye;t[111]!==R||t[112]!==I||t[113]!==i||t[114]!==a||t[115]!==y||t[116]!==n||t[117]!==g||t[118]!==v?(Ye=g&&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=I.get(n)||1,o=R(e),s=y.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)(pe,{value:u,onValueChange:n=>{if(!a)return;let r=n===`__default__`?void 0:n;a(t,{...e,variant:r})},children:[(0,$.jsxs)(fe,{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)(k,{name:`brain-ai-3`,className:O(`h-3.5 w-3.5 flex-shrink-0`,u===`__default__`?`text-muted-foreground`:`text-[color:var(--status-info)]`)}),(0,$.jsx)(ue,{placeholder:v(`multirun.modelMultiSelect.variant.placeholder`),children:e=>e===`__default__`?v(`multirun.modelMultiSelect.variant.default`):e})]}),(0,$.jsxs)(de,{fitContent:!0,children:[(0,$.jsx)(U,{value:`__default__`,className:`pr-2 [&>span:first-child]:hidden`,children:v(`multirun.modelMultiSelect.variant.default`)}),c.map(Ue)]})]})]},e.instanceId)})}),t[111]=R,t[112]=I,t[113]=i,t[114]=a,t[115]=y,t[116]=n,t[117]=g,t[118]=v,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]!==v?(Ze=o!==void 0&&n.length<o&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground`,children:l===void 0?v(`multirun.modelMultiSelect.validation.minOnly`,{min:o}):v(`multirun.modelMultiSelect.validation.minToMax`,{min:o,max:l})}),t[123]=l,t[124]=o,t[125]=n.length,t[126]=v,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)(U,{value:e,className:`pr-2 [&>span:first-child]:hidden`,children:e},e)}function We(e){let t=(0,xe.c)(30),{git:n}=d(),r=F(e),i=B(e),a=L(e),o=z(e),s=M(Ye),c=M(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]),X.useEffect(l,u);let f;t[7]!==r?.all||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==i?(f=()=>{!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]=f):f=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],X.useEffect(f,m);let ee=a||i===!0&&o,h;bb0:{if(!r?.all){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[19]=e):e=t[19],h=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),h=e}let g=h,_;bb1:{if(!r?.all){let e;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[22]=e):e=t[22],_=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),_=e}let v=_,y;bb2:{if(!e){y=null;break bb2}if(i!==null){y=i;break bb2}if(ee){y=null;break bb2}y=r?.all?!0:null}let b=y,x;return t[25]!==b||t[26]!==ee||t[27]!==g||t[28]!==v?(x={localBranches:g,remoteBranches:v,isLoading:ee,isGitRepository:b},t[25]=b,t[26]=ee,t[27]=g,t[28]=v,t[29]=x):x=t[29],x}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}=ee(),{localBranches:s,remoteBranches:c,isLoading:l,isGitRepository:u}=We(e),d=X.useMemo(()=>[...s,...c.map(e=>`remotes/${e}`)],[s,c]);return X.useEffect(()=>{if(i||l||d.length===0||t&&d.includes(t))return;let r=t,a=!1;return(async()=>{try{let t=e?await J(e).catch(()=>null):null;if(a)return;let i=localStorage.getItem(N),{sourceBranch:o,shouldClearSavedSourceBranch:s}=R({branches:d,savedSourceBranch:i,rootBranch:t});if(s&&localStorage.removeItem(N),a||r&&d.includes(r))return;o&&n(o)}catch{}})(),()=>{a=!0}},[d,e,i,l,n,t]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(pe,{value:t,onValueChange:n,disabled:i||!u||l,children:[(0,$.jsx)(fe,{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)(de,{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)(G,{children:[(0,$.jsx)(V,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.localBranches`)}),s.map(e=>(0,$.jsx)(U,{value:e,className:`whitespace-normal break-all`,children:e},e))]}),s.length>0&&c.length>0&&(0,$.jsx)(W,{}),c.length>0&&(0,$.jsxs)(G,{children:[(0,$.jsx)(V,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.remoteBranches`)}),c.map(e=>(0,$.jsx)(U,{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,xe.c)(36),{value:n,onChange:r,className:i,disabled:a,id:o,portalToBody:s}=e,{t:c}=ee(),l=te(Qe),u=te($e),d=te(et),f;t[0]===l?f=t[1]:(f=l(),t[0]=l,t[1]=f);let p=f,m;t[2]===p?m=t[3]:(m=p.filter(tt),t[2]=p,t[3]=m);let h=m,g,_;t[4]!==p.length||t[5]!==u?(g=()=>{p.length===0&&u()},_=[p.length,u],t[4]=p.length,t[5]=u,t[6]=g,t[7]=_):(g=t[6],_=t[7]),X.useEffect(g,_);let v,y;t[8]!==d||t[9]!==a||t[10]!==r||t[11]!==h||t[12]!==n?(v=()=>{if(a)return;let e=n.trim();if(e.length>0&&h.some(t=>t.name===e))return;let t=typeof d==`string`&&d.trim().length>0?d.trim():null;if(t&&h.some(e=>e.name===t)){r(t);return}let i=h[0]?.name;i&&r(i)},y=[d,a,r,h,n],t[8]=d,t[9]=a,t[10]=r,t[11]=h,t[12]=n,t[13]=v,t[14]=y):(v=t[13],y=t[14]),X.useEffect(v,y);let b=n.trim().length>0?n:void 0,x;t[15]===i?x=t[16]:(x=O(`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]=x);let S;t[17]===c?S=t[18]:(S=c(`multirun.agentSelector.placeholder`),t[17]=c,t[18]=S);let C;t[19]===S?C=t[20]:(C=(0,$.jsx)(ue,{placeholder:S}),t[19]=S,t[20]=C);let w;t[21]!==o||t[22]!==x||t[23]!==C?(w=(0,$.jsx)(fe,{id:o,size:`lg`,className:x,children:C}),t[21]=o,t[22]=x,t[23]=C,t[24]=w):w=t[24];let T;t[25]===h?T=t[26]:(T=h.length>0&&(0,$.jsx)(G,{children:h.map(nt)}),t[25]=h,t[26]=T);let E;t[27]!==s||t[28]!==T?(E=(0,$.jsx)(de,{fitContent:!0,portalToBody:s,children:T}),t[27]=s,t[28]=T,t[29]=E):E=t[29];let D;return t[30]!==a||t[31]!==r||t[32]!==b||t[33]!==w||t[34]!==E?(D=(0,$.jsxs)(pe,{value:b,onValueChange:r,disabled:a,children:[w,E]}),t[30]=a,t[31]=r,t[32]=b,t[33]=w,t[34]=E,t[35]=D):D=t[35],D};function Qe(e){return e.getVisibleAgents}function $e(e){return e.loadAgents}function et(e){return e.currentAgentName}function tt(e){return E(e.mode)}function nt(e){return(0,$.jsx)(U,{value:e.name,className:`w-auto whitespace-nowrap`,children:e.name},e.name)}var rt=10485760,it=5,at=e=>{let t=(0,xe.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(ie,{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)(k,{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)(ae,{children:[r,(0,$.jsx)(j,{side:`top`,className:`max-w-[240px]`,children:n})]}),t[1]=n,t[2]=i),i},ot=e=>{let t=(0,xe.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=g(e.path),n=e.icon?Y[e.icon]:null,r=e.color?_e[e.color]:void 0,i=(0,$.jsx)(k,{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:`relative top-px flex h-4 w-4 shrink-0 items-center justify-center overflow-hidden text-muted-foreground`,children:e.iconImage?(0,$.jsx)(q,{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}=ee(),[s,c]=X.useState(``),[l,u]=X.useState(()=>[{id:Pe(),prompt:``,models:[]}]),[d,p]=X.useState(``),[h,g]=X.useState([]),[y,x]=X.useState(!1),[S,C]=X.useState([]),[w,te]=X.useState(!1),[E,ne]=X.useState(!1),[se,M]=X.useState(!0),N=X.useRef(null),P=o(e=>e.currentDirectory??null),F=X.useMemo(()=>{if(typeof window>`u`)return null;let e=window.__VSCODE_CONFIG__?.workspaceFolder;return typeof e==`string`&&e.trim().length>0?e.trim():null},[]),I=D(e=>e.activeProjectId),L=D(e=>e.setActiveProjectIdOnly),R=D(e=>e.projects),[z,ce]=X.useState(()=>I??null);X.useEffect(()=>{if(I){ce(I);return}!z&&R.length>0&&ce(R[0].id)},[I,R,z]);let B=X.useMemo(()=>z?R.find(e=>e.id===z)??null:null,[R,z]),le=B?.path??P,V=f(e=>{ce(e),e!==I&&L(e)}),H=X.useMemo(()=>{if(B?.path)return{id:B.id,path:B.path};let e=P??F;return e?{id:`path:${e}`,path:e}:null},[B,P,F]),[W]=X.useState(()=>typeof window<`u`&&t()),G=X.useMemo(()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),[]),me=oe(),q=X.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},[]),J=X.useMemo(()=>W&&G||me?`pl-[5.5rem]`:`pl-3`,[W,G,me]),he=X.useMemo(()=>!W||!G||q===null?``:q>=26?`h-12`:q<=15?`h-14`:``,[W,G,q]),Y=f(async e=>{e.target.closest(`button, a, input, select, textarea`)||e.button===0&&W&&await m()}),ge=f(e=>{r&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r())}),_e=!!r;X.useEffect(()=>{if(_e)return window.addEventListener(`keydown`,ge,!0),()=>window.removeEventListener(`keydown`,ge,!0)},[_e]);let[xe,Se]=X.useState(``),{isLoading:Ce,isGitRepository:Z}=We(le),we=X.useRef(!1),Te=Z===!0,Q=Te&&se;X.useEffect(()=>{if(Z===!1){we.current=!0,M(!1);return}Z===!0&&we.current&&(we.current=!1,M(!0))},[Z]);let Ee=Me(e=>e.createMultiRun),De=Me(e=>e.error),Oe=Me(e=>e.clearError);X.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]),X.useEffect(()=>{if(!H)return;let e=!1;return ne(!0),(async()=>{try{let t=await _(H);e||C(t)}catch{}finally{e||ne(!1)}})(),()=>{e=!0}},[H]);let ke=f((e,t)=>{u(n=>n.map(n=>n.id===e?{...n,...t}:n))}),Ae=f(e=>{u(t=>t.filter(t=>t.id!==e))}),je=f(()=>{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){v.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)});g(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),v.error(a(`multirun.launcher.toast.attachFailed`,{fileName:r.name}))}}n>0&&v.success(a(n===1?`multirun.launcher.toast.attachedSingle`:`multirun.launcher.toast.attachedPlural`,{count:n})),N.current&&(N.current.value=``)},Fe=e=>{g(t=>t.filter(t=>t.id!==e))},Ie=X.useMemo(()=>l.reduce((e,t)=>e+t.models.length,0),[l]),Le=async e=>{e.preventDefault();let t=l.filter(e=>e.prompt.trim()&&e.models.length>=1);if(t.length!==0&&!(Ie<1)){x(!0),Oe();try{z&&z!==I&&L(z);let e=h.map(e=>({mime:e.mimeType,filename:e.filename,url:e.dataUrl})),r=S.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:s.trim(),groups:i,agent:d||void 0,worktreeBaseBranch:Q?xe:void 0,isolateRuns:Q,files:e.length>0?e:void 0,setupCommands:r.length>0?r:void 0},o=await Ee(a);o&&(o.firstSessionId&&T.getState().setCurrentSession(o.firstSessionId),n?.())}finally{x(!1)}}},Re=!!(s.trim()&&l.some(e=>e.prompt.trim()&&e.models.length>=1)&&Ie>=1&&le&&!Ce&&(Z===!1||!Q||xe)),ze=S.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:Y,className:O(`relative flex h-12 shrink-0 items-center justify-center border-b app-region-drag select-none`,J,he),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)(ae,{children:[(0,$.jsx)(ie,{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)(k,{name:`close`,className:`h-5 w-5`})})}),(0,$.jsx)(j,{children:(0,$.jsx)(`p`,{children:a(`multirun.launcher.actions.closeEsc`)})})]})})]}),(0,$.jsx)(K,{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`)}),R.length>0?(0,$.jsxs)(pe,{value:z??void 0,onValueChange:V,children:[(0,$.jsx)(fe,{id:`multirun-project`,size:`lg`,className:`w-fit max-w-full`,children:B?(0,$.jsx)(ue,{children:st(B)}):(0,$.jsx)(ue,{placeholder:a(`multirun.launcher.project.placeholder`)})}),(0,$.jsx)(de,{fitContent:!0,children:R.map(e=>(0,$.jsx)(U,{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)(re,{id:`group-name`,value:s,onChange:e=>c(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:le,value:xe,onChange:Se,disabled:!Q,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)(A,{checked:se,onChange:M,disabled:!Te,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:p,id:`multirun-agent`})]})]}),(0,$.jsxs)(be,{open:w,onOpenChange:te,children:[(0,$.jsxs)(ye,{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)(k,{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)(k,{name:`arrow-down-s`,className:O(`h-3.5 w-3.5 text-muted-foreground/50 transition-transform duration-200 ml-auto`,w&&`rotate-180`)})]}),(0,$.jsx)(ve,{children:(0,$.jsx)(`div`,{className:`pt-2 space-y-1.5`,children:E?(0,$.jsx)(`p`,{className:`typography-meta text-muted-foreground/70 px-2`,children:a(`multirun.launcher.setupCommands.loading`)}):(0,$.jsxs)($.Fragment,{children:[S.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(re,{value:e,onChange:e=>{let n=[...S];n[t]=e.target.value,C(n)},placeholder:a(`multirun.launcher.setupCommands.commandPlaceholder`),className:`h-8 flex-1 font-mono text-xs`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>C(S.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)(k,{name:`close`,className:`h-3.5 w-3.5`})})]},`${e}-${t}`)),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>C([...S,``]),className:`flex items-center gap-1 typography-meta text-muted-foreground hover:text-foreground transition-colors px-1`,children:[(0,$.jsx)(k,{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:N,type:`file`,multiple:!0,className:`hidden`,onChange:Ne,accept:`*/*`}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(ie,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>N.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)(k,{name:`attachment-2`,className:`h-3 w-3`}),a(`multirun.launcher.attachments.attach`)]})}),(0,$.jsx)(j,{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)(k,{name:`file-image`,className:`h-3 w-3 text-muted-foreground`}):(0,$.jsx)(k,{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)(k,{name:`close`,className:`h-3 w-3`})})]},e.id))]})]}),l.map((e,t)=>(0,$.jsx)(lt,{group:e,groupIndex:t,canRemove:l.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)(k,{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:[!Q&&Z!==null?(0,$.jsxs)(`div`,{className:`mr-auto flex min-w-0 items-center gap-1.5 typography-micro text-muted-foreground`,children:[(0,$.jsx)(k,{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)(b,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:a(`multirun.launcher.actions.cancel`)}),(0,$.jsx)(b,{type:`submit`,size:`sm`,disabled:!Re||y,children:y?a(`multirun.launcher.actions.creating`):(0,$.jsx)($.Fragment,{children:a(`multirun.launcher.actions.startWithRunCount`,{count:Ie})})})]})})]})},lt=e=>{let t=(0,xe.c)(94),{group:n,groupIndex:r,canRemove:i,onUpdate:a,onRemove:o}=e,{t:s}=ee(),[c,l]=X.useState(!1),[u,d]=X.useState(``),[p,m]=X.useState(!1),[h,g]=X.useState(``),_=X.useRef(null),v=X.useRef(null),y=X.useRef(null),b;t[0]!==n.id||t[1]!==n.models||t[2]!==a?(b=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]=b):b=t[3];let x=f(b),S;t[4]!==n.id||t[5]!==n.models||t[6]!==a?(S=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]=S):S=t[7];let C=f(S),w;t[8]!==n.id||t[9]!==n.models||t[10]!==a?(w=(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]=w):w=t[11];let te=f(w),T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(e,t)=>{if(e.startsWith(`/`)){let n=e.indexOf(` `),r=e.indexOf(`
2
+ `),i=Math.min(n===-1?e.length:n,r===-1?e.length:r);if(t<=i&&n===-1){g(e.substring(1,i)),m(!0),l(!1);return}}m(!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
+ `)?(d(t),l(!0)):l(!1);return}l(!1)},t[12]=T):T=t[12];let E=f(T),D;t[13]!==n.id||t[14]!==a?(D=e=>{a(n.id,{prompt:e})},t[13]=n.id,t[14]=a,t[15]=D):D=t[15];let O=f(D),ne;t[16]!==n.prompt||t[17]!==O||t[18]!==E?(ne=e=>{let t=n.prompt,r=_.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=ce(t,i===-1?r:i,r,`@${a}`);O(o.text),l(!1),d(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.selectionStart=o.caret,e.selectionEnd=o.caret,e.focus()),E(o.text,o.caret)})},t[16]=n.prompt,t[17]=O,t[18]=E,t[19]=ne):ne=t[19];let A=f(ne),re;t[20]!==n.prompt||t[21]!==O||t[22]!==E?(re=e=>{let t=n.prompt,r=_.current?.selectionStart??t.length,i=t.substring(0,r).lastIndexOf(`@`),a=ce(t,i===-1?r:i,r,`@${e}`);O(a.text),l(!1),d(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.selectionStart=a.caret,e.selectionEnd=a.caret,e.focus()),E(a.text,a.caret)})},t[20]=n.prompt,t[21]=O,t[22]=E,t[23]=re):re=t[23];let ie=f(re),j;t[24]!==O||t[25]!==E?(j=e=>{let t=`/${e.name} `;O(t),m(!1),g(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.focus(),e.selectionStart=e.value.length,e.selectionEnd=e.value.length),E(t,t.length)})},t[24]=O,t[25]=E,t[26]=j):j=t[26];let ae=f(j),oe;t[27]!==p||t[28]!==c?(oe=e=>{if(p&&y.current&&(e.key===`Enter`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`Escape`||e.key===`Tab`)){e.preventDefault(),y.current.handleKeyDown(e.key);return}c&&v.current&&(e.key===`Enter`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`Escape`||e.key===`Tab`)&&(e.preventDefault(),v.current.handleKeyDown(e.key))},t[27]=p,t[28]=c,t[29]=oe):oe=t[29];let M=f(oe),N=r+1,P;t[30]!==s||t[31]!==N?(P=s(`multirun.launcher.groups.groupLabel`,{index:N}),t[30]=s,t[31]=N,t[32]=P):P=t[32];let F;t[33]===P?F=t[34]:(F=(0,$.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:P}),t[33]=P,t[34]=F);let I;t[35]!==i||t[36]!==n.id||t[37]!==o||t[38]!==s?(I=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)(k,{name:`close`,className:`h-3.5 w-3.5`})}),t[35]=i,t[36]=n.id,t[37]=o,t[38]=s,t[39]=I):I=t[39];let L;t[40]!==F||t[41]!==I?(L=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[F,I]}),t[40]=F,t[41]=I,t[42]=L):L=t[42];let R;t[43]===s?R=t[44]:(R=s(`multirun.launcher.groups.prompt.label`),t[43]=s,t[44]=R);let z;t[45]===R?z=t[46]:(z=(0,$.jsx)(ot,{required:!0,children:R}),t[45]=R,t[46]=z);let B=n.prompt,V;t[47]!==O||t[48]!==E?(V=e=>{let t=e.target.value;O(t);let n=e.target.selectionStart??t.length;E(t,n)},t[47]=O,t[48]=E,t[49]=V):V=t[49];let ue;t[50]===s?ue=t[51]:(ue=s(`multirun.launcher.groups.prompt.placeholder`),t[50]=s,t[51]=ue);let H;t[52]!==n.prompt||t[53]!==M||t[54]!==V||t[55]!==ue?(H=(0,$.jsx)(me,{ref:_,value:B,onChange:V,onKeyDown:M,placeholder:ue,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]=M,t[54]=V,t[55]=ue,t[56]=H):H=t[56];let U;t[57]!==h||t[58]!==ae||t[59]!==p?(U=p?(0,$.jsx)(le,{ref:y,searchQuery:h,onCommandSelect:ae,onClose:()=>m(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[57]=h,t[58]=ae,t[59]=p,t[60]=U):U=t[60];let de;t[61]!==ie||t[62]!==A||t[63]!==u||t[64]!==c?(de=c?(0,$.jsx)(se,{ref:v,searchQuery:u,onFileSelect:A,onAgentSelect:ie,onSkillSelect:e=>ie(e.name),onClose:()=>l(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[61]=ie,t[62]=A,t[63]=u,t[64]=c,t[65]=de):de=t[65];let W;t[66]!==H||t[67]!==U||t[68]!==de?(W=(0,$.jsxs)(`div`,{className:`relative`,children:[H,U,de]}),t[66]=H,t[67]=U,t[68]=de,t[69]=W):W=t[69];let G;t[70]!==z||t[71]!==W?(G=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[z,W]}),t[70]=z,t[71]=W,t[72]=G):G=t[72];let fe;t[73]===s?fe=t[74]:(fe=s(`multirun.launcher.models.info`,{max:it}),t[73]=s,t[74]=fe);let pe;t[75]===fe?pe=t[76]:(pe=(0,$.jsx)(at,{children:fe}),t[75]=fe,t[76]=pe);let K;t[77]===s?K=t[78]:(K=s(`multirun.launcher.models.label`),t[77]=s,t[78]=K);let q;t[79]!==pe||t[80]!==K?(q=(0,$.jsx)(ot,{required:!0,info:pe,children:K}),t[79]=pe,t[80]=K,t[81]=q):q=t[81];let J;t[82]!==n.models||t[83]!==x||t[84]!==C||t[85]!==te?(J=(0,$.jsx)(Ie,{selectedModels:n.models,onAdd:x,onRemove:C,onUpdate:te,minModels:1,maxModels:it}),t[82]=n.models,t[83]=x,t[84]=C,t[85]=te,t[86]=J):J=t[86];let he;t[87]!==q||t[88]!==J?(he=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[q,J]}),t[87]=q,t[88]=J,t[89]=he):he=t[89];let Y;return t[90]!==L||t[91]!==G||t[92]!==he?(Y=(0,$.jsxs)(`div`,{className:`rounded-lg border border-border p-3 space-y-3`,children:[L,G,he]}),t[90]=L,t[91]=G,t[92]=he,t[93]=Y):Y=t[93],Y};export{Q as a,Pe as i,Ze as n,we as o,Ie as r,ct as t};
@@ -1 +1 @@
1
- import{n as e}from"./platform-CiUKDeXd.js";import{a as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-CnPxR5yQ.js";var r=t(`YuriUpdateConfig`);async function i(){if(!e())throw new n;let t=await r.getConfiguration();if(t.channel!==`stable`&&t.channel!==`beta`||typeof t.shellApiVersion!=`number`||!Number.isInteger(t.shellApiVersion)||t.shellApiVersion<1)throw Error(`Invalid native update configuration`);return{channel:t.channel,shellApiVersion:t.shellApiVersion}}export{i as t};
1
+ import{n as e}from"./platform-CiUKDeXd.js";import{a as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-e0zJKRUL.js";var r=t(`YuriUpdateConfig`);async function i(){if(!e())throw new n;let t=await r.getConfiguration();if(t.channel!==`stable`&&t.channel!==`beta`||typeof t.shellApiVersion!=`number`||!Number.isInteger(t.shellApiVersion)||t.shellApiVersion<1)throw Error(`Invalid native update configuration`);return{channel:t.channel,shellApiVersion:t.shellApiVersion}}export{i as t};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/remote-input-store-BvlOGMu_.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-switch-DEPKHgdL.js","assets/runtime-auth-DA-qfGHk.js","assets/platform-CiUKDeXd.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-zustand-CNn3HHhT.js","assets/vendor-base-ui-fom6orB6.js","assets/prompt-attachment-upload-Bem87nmm.js","assets/runtime-fetch-V-iMWR8t.js","assets/reasoning-projection-client-BEhVknv9.js","assets/runtime-file-resource-CKQQEwNv.js","assets/vendor-react-D5BntRmA.js","assets/vendor-tanstack-query-core-BSjXNgF_.js","assets/vendor-tanstack-react-query-ChSd65dm.js","assets/path-utils-jGozTg9d.js","assets/vendor-reactuses-core-B8s-Rcd-.js","assets/vendor-lodash-es-BS45jPoZ.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/runtime-file-store-BVRgEtI-.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/input-store-wWToFdzi.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/uuid-D-SDZijH.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,r}from"./runtime-switch-DEPKHgdL.js";import{P as i}from"./runtime-file-resource-CKQQEwNv.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{Ga as o,Ha as s}from"./useMobileNavigationStore-oveTY29a.js";import{i as c,n as l,r as u}from"./remoteProjectQueries-yX3kOkR6.js";var d=e({applyRemoteProjectRoute:()=>f,seedRemoteProjectDraft:()=>p});async function f(e,a=()=>!0){if(!e.hostId||!e.hubId||!e.directory)throw Error(`Incomplete remote session route`);let d=t(),f=n(),p=r(),m=await l();if(!a())return!1;if(!m.supported||m.hubId!==e.hubId||d!==t()||f!==n()||p!==r())throw Error(`Remote route belongs to a different or unsupported Hub`);let h=e.projectId?m.projects.find(t=>t.hostId===e.hostId&&t.id===e.projectId):i(m.projects,m.hubId,e.hostId,e.directory,(await u(c(m),e.hostId)).worktrees);if(!a())return!1;if(d!==t()||f!==n()||p!==r())throw Error(`Remote route belongs to an inactive Hub`);if(!h)throw Error(`Remote Project is not referenced by this Hub`);let g={hubId:m.hubId,hostId:h.hostId,directory:e.directory,...e.instanceId||h.instanceId?{instanceId:e.instanceId||h.instanceId}:{}};g.instanceId&&c(m).resolve(g).sdk();let _=s.getState();return _.upsertRemoteProject(h,m.hubId),_.setActiveProjectIdOnly(h.id),o.getState().openRemoteSession(h,g,e.isNewSession?null:e.sessionId),!0}async function p(e,n){let r=t(),{seedRemoteDraft:i}=await a(async()=>{let{seedRemoteDraft:e}=await import(`./remote-input-store-BvlOGMu_.js`).then(e=>e.a);return{seedRemoteDraft: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]));r===t()&&await i(e,n)}export{d as n,p as r,f as t};
2
+ import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,r}from"./runtime-switch-DEPKHgdL.js";import{P as i}from"./runtime-file-resource-CKQQEwNv.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{Xa as o,qa as s}from"./useMobileNavigationStore-DRQ4Efws.js";import{i as c,n as l,r as u}from"./remoteProjectQueries-yX3kOkR6.js";var d=e({applyRemoteProjectRoute:()=>f,seedRemoteProjectDraft:()=>p});async function f(e,a=()=>!0){if(!e.hostId||!e.hubId||!e.directory)throw Error(`Incomplete remote session route`);let d=t(),f=n(),p=r(),m=await l();if(!a())return!1;if(!m.supported||m.hubId!==e.hubId||d!==t()||f!==n()||p!==r())throw Error(`Remote route belongs to a different or unsupported Hub`);let h=e.projectId?m.projects.find(t=>t.hostId===e.hostId&&t.id===e.projectId):i(m.projects,m.hubId,e.hostId,e.directory,(await u(c(m),e.hostId)).worktrees);if(!a())return!1;if(d!==t()||f!==n()||p!==r())throw Error(`Remote route belongs to an inactive Hub`);if(!h)throw Error(`Remote Project is not referenced by this Hub`);let g={hubId:m.hubId,hostId:h.hostId,directory:e.directory,...e.instanceId||h.instanceId?{instanceId:e.instanceId||h.instanceId}:{}};g.instanceId&&c(m).resolve(g).sdk();let _=s.getState();return _.upsertRemoteProject(h,m.hubId),_.setActiveProjectIdOnly(h.id),o.getState().openRemoteSession(h,g,e.isNewSession?null:e.sessionId),!0}async function p(e,n){let r=t(),{seedRemoteDraft:i}=await a(async()=>{let{seedRemoteDraft:e}=await import(`./remote-input-store-BvlOGMu_.js`).then(e=>e.a);return{seedRemoteDraft: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]));r===t()&&await i(e,n)}export{d as n,p as r,f as t};
@@ -1 +1 @@
1
- import{r as e}from"./useUIStore-DjizmHAt.js";import{Ga as t,Ha as n,s as r}from"./useMobileNavigationStore-oveTY29a.js";import{i,n as a}from"./remoteProjectQueries-yX3kOkR6.js";function o(i,a,o,s=i.path,c=!1,l){a.assertCurrent(),n.getState().setActiveProjectIdOnly(i.id),t.getState().openRemoteSession(i,{hubId:a.hubId,hostId:i.hostId,directory:s,...i.instanceId?{instanceId:i.instanceId}:{}},o,l),e.getState().setActiveMainTab(`chat`),c&&r.getState().openRemoteProject()}async function s(e,t=!1){let r=await a(),s=r.projects.find(t=>t.id===e.id&&t.hostId===e.hostId&&t.path===e.path);if(!s)throw Error(`Remote project is not registered in the current Hub`);let c=i(r);c.assertCurrent(),n.getState().upsertRemoteProject(s,r.hubId),o(s,c,null,s.path,t)}export{o as n,s as t};
1
+ import{r as e}from"./useUIStore-mVT8ipsT.js";import{Xa as t,qa as n,s as r}from"./useMobileNavigationStore-DRQ4Efws.js";import{i,n as a}from"./remoteProjectQueries-yX3kOkR6.js";function o(i,a,o,s=i.path,c=!1,l){a.assertCurrent(),n.getState().setActiveProjectIdOnly(i.id),t.getState().openRemoteSession(i,{hubId:a.hubId,hostId:i.hostId,directory:s,...i.instanceId?{instanceId:i.instanceId}:{}},o,l),e.getState().setActiveMainTab(`chat`),c&&r.getState().openRemoteProject()}async function s(e,t=!1){let r=await a(),s=r.projects.find(t=>t.id===e.id&&t.hostId===e.hostId&&t.path===e.path);if(!s)throw Error(`Remote project is not registered in the current Hub`);let c=i(r);c.assertCurrent(),n.getState().upsertRemoteProject(s,r.hubId),o(s,c,null,s.path,t)}export{o as n,s as t};