@yuriai/web 0.3.7 → 0.3.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/assets/{AgentAvatar-4HfTeQK1.js → AgentAvatar-CzUo20cq.js} +1 -1
- package/dist/assets/{AgentSelector-Db0C7nfY.js → AgentSelector-BYe6JxpS.js} +1 -1
- package/dist/assets/{ArchivedSessionsDialog-Cja7TIg6.js → ArchivedSessionsDialog-CfidThGZ.js} +1 -1
- package/dist/assets/{AssistantConversationSurface-Cg0Z0laN.js → AssistantConversationSurface-D9pxE0LL.js} +3 -3
- package/dist/assets/{AssistantSessionCard-CRaYbAwR.js → AssistantSessionCard-UpViUHNh.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-B0XaBtKU.js → AssistantUnreadBadge-Cu11SA54.js} +1 -1
- package/dist/assets/{AssistantView-D7Ec_wbs.js → AssistantView-Cn8EHVTJ.js} +1 -1
- package/dist/assets/{AssistantWorkingAvatar-QmEGmd3p.js → AssistantWorkingAvatar-DXpA53IL.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-SynpDBbu.js → AssistantsSettingsPage-DgB1NmO5.js} +1 -1
- package/dist/assets/{BinaryFileFallback-CLr78pii.js → BinaryFileFallback-DXA8nGbU.js} +1 -1
- package/dist/assets/{BtwPanel-eNUn2HxV.js → BtwPanel-DkoRSk96.js} +1 -1
- package/dist/assets/{BusyDots-CGTf_jqS.js → BusyDots-BJ7g-GAZ.js} +1 -1
- package/dist/assets/{ChatContainer-DUJRc6kx.js → ChatContainer-Br3bKIVW.js} +4 -4
- package/dist/assets/{ChatView-DJnxvyiB.js → ChatView-Dg7Q_Wwt.js} +1 -1
- package/dist/assets/{DiagramView-BQ_5mLmc.js → DiagramView-eNKpLrSw.js} +1 -1
- package/dist/assets/{DiffView-KE3aMklA.js → DiffView-B-Y0Knyh.js} +1 -1
- package/dist/assets/{DiffViewToggle-B-fDu13M.js → DiffViewToggle-BmJbap6o.js} +1 -1
- package/dist/assets/{ErrorBoundary-BMkurwx0.js → ErrorBoundary-DGeC8hrR.js} +1 -1
- package/dist/assets/{FadeInOnReveal-BNxn8bBO.js → FadeInOnReveal-D6FCXnEi.js} +1 -1
- package/dist/assets/{GuiPluginMount-CcxWjZGn.js → GuiPluginMount-CYYTSXpA.js} +1 -1
- package/dist/assets/{GuiPluginPage-B6DZGRf5.js → GuiPluginPage-B7UFo1YT.js} +1 -1
- package/dist/assets/{GuiPluginSurface-CZ-rTgd0.js → GuiPluginSurface-DFOsSAf1.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-ByapzQyJ.js → GuiPluginTitlebarItems-Cr4QSCKu.js} +1 -1
- package/dist/assets/{GuiPluginWindow-DtZqX_qS.js → GuiPluginWindow-DzXnwUM0.js} +1 -1
- package/dist/assets/{Icon-CUOVBCQn.js → Icon-Bj9hTMjF.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-ON75MLXx.js → ImageLoadingPlaceholder-Ugc-GANq.js} +1 -1
- package/dist/assets/{LoadingImage-CE1QZoPZ.js → LoadingImage-uYHHT_VX.js} +1 -1
- package/dist/assets/MarkdownRenderer-1X8XlOwN.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-SH7kLqNr.js → MarkdownRendererImpl-CIX7kNlF.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-kWCEeJ84.js → MarkstreamRendererImpl-hHcz8MiN.js} +1 -1
- package/dist/assets/{MobileAssistantSettingsPage-DkSgJLH5.js → MobileAssistantSettingsPage-CHcRJtXv.js} +1 -1
- package/dist/assets/{MobileAssistantTab-DlreBfpD.js → MobileAssistantTab-BO5SDNo5.js} +1 -1
- package/dist/assets/{MobileBtwPage-DUOHjbOb.js → MobileBtwPage-CBAt4xS7.js} +1 -1
- package/dist/assets/{MobileChangesSurface-s-IkQzDj.js → MobileChangesSurface-DSryfzt8.js} +1 -1
- package/dist/assets/{MobileChatScreen-RJicegCg.js → MobileChatScreen-CGk04i3r.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-B0Xb37E5.js → MobileDetailNavigation-CIqxaASf.js} +1 -1
- package/dist/assets/{MobileFilesSurface-CR7C7ern.js → MobileFilesSurface-k1QgAZSz.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-CG4kdWvo.js → MobileHtmlNetworkBoundary-wYqNGLbr.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-DLDL_a6S.js → MobileOverlayPanel-DH89DhXZ.js} +1 -1
- package/dist/assets/{MobileResizableSheet-BTsMGacb.js → MobileResizableSheet-BFNJaq9p.js} +1 -1
- package/dist/assets/{MobileSettingsTab-DIqufnwp.js → MobileSettingsTab-Bs9qRYqM.js} +1 -1
- package/dist/assets/{MobileShareBridge-BgAD2FqK.js → MobileShareBridge-DY3Lzf8x.js} +1 -1
- package/dist/assets/{MobileSurface-D_9tJDu_.js → MobileSurface-CCGzDCA8.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-CPEY1sVL.js → MobileTabPageHeader-CFaFn4mL.js} +1 -1
- package/dist/assets/{ModelLogo-CoEkCK6k.js → ModelLogo-Clc0TbVa.js} +1 -1
- package/dist/assets/{ModelSelector-CdSx-1l3.js → ModelSelector-Bzdl6__F.js} +1 -1
- package/dist/assets/{MultiRunWindow-08NX-bpU.js → MultiRunWindow-BI8M6MMJ.js} +1 -1
- package/dist/assets/{OnboardingScreen-DW4PQZ48.js → OnboardingScreen-CnQxeBTb.js} +1 -1
- package/dist/assets/{OverlayScrollbar-D4U670-p.js → OverlayScrollbar-DxWbQtPi.js} +1 -1
- package/dist/assets/{PierreDiffViewer-CU2O_Gqy.js → PierreDiffViewer-eVvrzbhm.js} +1 -1
- package/dist/assets/{ProviderLogo-C9ON1xS-.js → ProviderLogo-2q99kcs0.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-44WC5u9f.js → RemoteAssistantSessionCard-DQzIrlZD.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-BfdjP2Ug.js → RemoteDesktopPanel-5Hy1Vul9.js} +1 -1
- package/dist/assets/{ScheduledTasksDialog-p2z6x4k7.js → ScheduledTasksDialog-CU-96_KI.js} +1 -1
- package/dist/assets/{ScrollableOverlay-B5Mx_IrY.js → ScrollableOverlay-B6nm-QHe.js} +1 -1
- package/dist/assets/{SettingsGroup-Bd0hGXKp.js → SettingsGroup-VX5EIcdB.js} +1 -1
- package/dist/assets/{SettingsView-BbEPSEy3.js → SettingsView-8FgFGfhK.js} +1 -1
- package/dist/assets/{SettingsWindow-DO2ySMZ8.js → SettingsWindow-CjVC__o_.js} +1 -1
- package/dist/assets/{SetupTourDialog-Bm0scCiD.js → SetupTourDialog-Cd4anq2F.js} +1 -1
- package/dist/assets/{SyncActions-ktq_QbjA.js → SyncActions-CA80mSXn.js} +1 -1
- package/dist/assets/{TerminalView-tXyVGRwg.js → TerminalView-Cy3tfVjh.js} +1 -1
- package/dist/assets/{TextSelectionMenu-CCsFVQha.js → TextSelectionMenu-C3G3QdRe.js} +1 -1
- package/dist/assets/{ToolOutputDialog-BX3Vi-k5.js → ToolOutputDialog-BUGnb_Yu.js} +1 -1
- package/dist/assets/{assistantMessagePreview-Bh2bPUPh.js → assistantMessagePreview-DMQN3Gwb.js} +1 -1
- package/dist/assets/{assistantQueries-9sjQcHoO.js → assistantQueries-3TdsxIwK.js} +1 -1
- package/dist/assets/{auto-read-context-JBvQYPyM.js → auto-read-context-BFDDD6Nm.js} +1 -1
- package/dist/assets/{capgoAdapter-llXcw7v2.js → capgoAdapter-Bw37IoVM.js} +1 -1
- package/dist/assets/{card-YOYJB2Bf.js → card-ZDEmL6t1.js} +1 -1
- package/dist/assets/{chatUpwardIntent-Z6bMNkax.js → chatUpwardIntent-BB-rCDpI.js} +1 -1
- package/dist/assets/{checkbox-ByuwPnuS.js → checkbox-B0zYfEMl.js} +1 -1
- package/dist/assets/{collapsible-ByaFR6Oc.js → collapsible-BOWyQRZn.js} +1 -1
- package/dist/assets/{connection-hint-DugoAaao.js → connection-hint-By7s_PpE.js} +1 -1
- package/dist/assets/{context-menu-DKL8DaT6.js → context-menu-BK6NbucI.js} +1 -1
- package/dist/assets/{diagram-DkVURCJZ.js → diagram-DYl1ElOP.js} +1 -1
- package/dist/assets/{dialog-CQbyU8pU.js → dialog-kKHr6l0I.js} +1 -1
- package/dist/assets/{dropdown-menu-W3Ii298F.js → dropdown-menu-NxiXa_EI.js} +1 -1
- package/dist/assets/{fileMentionTouchSelection-CwTAmgan.js → fileMentionTouchSelection-DWX5kpzC.js} +1 -1
- package/dist/assets/{gitApi-droqYZ9A.js → gitApi-OVA3TAy3.js} +1 -1
- package/dist/assets/{icons-CLvvQeAy.js → icons-BpK9iAgA.js} +1 -1
- package/dist/assets/{input-DSdEvspA.js → input-CoI-IWJg.js} +1 -1
- package/dist/assets/{insertionBoundaries-Bf3EMWj8.js → insertionBoundaries-Bw6mz-QZ.js} +1 -1
- package/dist/assets/{kbd-hp3-RDSe.js → kbd-Cvn5LQY3.js} +1 -1
- package/dist/assets/{main-D71N_bhn.js → main-CAX_GxTi.js} +4 -4
- package/dist/assets/{main-ClNDsxXD.js → main-CFSCPKQq.js} +2 -2
- package/dist/assets/{markdownHeightCache-qX2f-vgi.js → markdownHeightCache-CknUtMlX.js} +1 -1
- package/dist/assets/{mcpQueries-DKxn0-Iq.js → mcpQueries-B3bAYBwV.js} +1 -1
- package/dist/assets/{miniChat-DuWGMHPI.js → miniChat-DCPNrx-v.js} +2 -2
- package/dist/assets/{mobile-CjbFG_ps.js → mobile-Ck9hV98N.js} +2 -2
- package/dist/assets/{mobileBackNavigation-Ce-CFzRu.js → mobileBackNavigation-oDcLGmHp.js} +1 -1
- package/dist/assets/{mobileConnections-BWToBinV.js → mobileConnections-CBqRp-3T.js} +2 -2
- package/dist/assets/{multirun-ByBZh9To.js → multirun-CS8jFKDn.js} +1 -1
- package/dist/assets/{native-config-BDAV-Sn-.js → native-config-zrhK__rU.js} +1 -1
- package/dist/assets/{nativeComposerCover-DcWXqfZa.js → nativeComposerCover-MPlMSBBX.js} +1 -1
- package/dist/assets/{navigation-DiqbYNCD.js → navigation-CkCH8e3H.js} +1 -1
- package/dist/assets/{openRemoteProjectSession-DPb8H79n.js → openRemoteProjectSession-BbAkznDS.js} +1 -1
- package/dist/assets/{openSessionFromDeepLink-gJWOkm8w.js → openSessionFromDeepLink-qg52CXP9.js} +2 -2
- package/dist/assets/{pluginPresentation-C8XRIFn5.js → pluginPresentation-DkI5wY0D.js} +1 -1
- package/dist/assets/{pwa-CLwERclR.js → pwa-oKMat1GX.js} +1 -1
- package/dist/assets/{queue-abort-optimistic-BET9wo1a.js → queue-abort-optimistic-CDuhpG2v.js} +1 -1
- package/dist/assets/{reference-history-BAPLZtrN.js → reference-history-BJ9mAdW1.js} +1 -1
- package/dist/assets/{remoteSessionReference-B-5Nd45t.js → remoteSessionReference-DICMQab5.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-DudyNNIU.js → renderElectronMiniChatApp-D_crcFe0.js} +2 -2
- package/dist/assets/{renderMobileApp-GIRJpszx.js → renderMobileApp-DYGufF-U.js} +4 -4
- package/dist/assets/{runtimeConfig-CUiokUFx.js → runtimeConfig-AnrhVRkF.js} +1 -1
- package/dist/assets/{runtimeEndpointReset-DXfdUC1r.js → runtimeEndpointReset-BDoCO-tc.js} +2 -2
- package/dist/assets/{select--wmAuAOB.js → select-COAwWxv-.js} +1 -1
- package/dist/assets/{sessionLookup-on217pcK.js → sessionLookup-BtXyFcKe.js} +1 -1
- package/dist/assets/{sessionOwnership-BoiTRI2O.js → sessionOwnership-Ck4bRAGZ.js} +1 -1
- package/dist/assets/{shortcuts-D3O9f1E5.js → shortcuts-BFw2eop1.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DvvltU2l.js → sortable-tabs-strip-Duxo9Ip3.js} +1 -1
- package/dist/assets/{speechSettingsQueries-Cqj3BM7O.js → speechSettingsQueries-CqamPgA0.js} +1 -1
- package/dist/assets/{switch-ClpM-4qX.js → switch-CjaNqGBY.js} +1 -1
- package/dist/assets/{textarea-Cpcy0ejH.js → textarea-B0VZhgml.js} +1 -1
- package/dist/assets/{tooltip-B9I9lmf0.js → tooltip-vDrp4bzq.js} +1 -1
- package/dist/assets/{truncated-path-BPcF8ywI.js → truncated-path-CrzP3UBz.js} +1 -1
- package/dist/assets/types-D4sSimuj.js +2 -0
- package/dist/assets/{ui-BqoDhEiW.js → ui-Pjq_Ygzo.js} +4 -4
- package/dist/assets/{useAppFontEffects-CaZbgo4R.js → useAppFontEffects-CzJ2wyOQ.js} +2 -2
- package/dist/assets/{useDesktopWindowControlsLayout-BA4DI_W1.js → useDesktopWindowControlsLayout-C9oYWUK2.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DQMEyl5O.js → useEffectiveDirectory-DoR6gkPG.js} +1 -1
- package/dist/assets/{useGitStore-Dvd_1jyD.js → useGitStore-Tb4ovphQ.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DWSuMEHF.js → useInlineCommentDraftStore-4A4nJ3nE.js} +1 -1
- package/dist/assets/{useMcpConfigStore-7NoTGiyv.js → useMcpConfigStore-DzP-AJLe.js} +1 -1
- package/dist/assets/{useMobileSwipeActions-7iuGbwWj.js → useMobileSwipeActions-BoaPQqab.js} +1 -1
- package/dist/assets/{useMobileTranscriptSyncHint-B3NigAUx.js → useMobileTranscriptSyncHint-B3mZDzht.js} +1 -1
- package/dist/assets/{useModelLists-C5fB7vLV.js → useModelLists-QXDxo5Ac.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-B4IGjODK.js → useOpenCodeReadiness-CPwbuznT.js} +1 -1
- package/dist/assets/{usePluginsStore-D2P-bQeH.js → usePluginsStore-Cw2anjTl.js} +1 -1
- package/dist/assets/{useProjectGitActions-CiL6W09h.js → useProjectGitActions-7id8Rqeg.js} +1 -1
- package/dist/assets/{useProjectGitStore-Bv65Bj_P.js → useProjectGitStore-8GteDOkw.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-CYT-3dZd.js → useProjectRuntimeAPIs-BjRL5EMv.js} +1 -1
- package/dist/assets/{useSessionBtwStore-H4R5jYT2.js → useSessionBtwStore-DDZStXhl.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-D9STYrQw.js → useStreamingTextThrottle-B4yaNsPw.js} +1 -1
- package/dist/assets/{worktreeManager-33ddwAq1.js → worktreeManager-DmdHIgOn.js} +1 -1
- package/dist/assets/{worktreeSourceBranchPreference-Cp5jF1M9.js → worktreeSourceBranchPreference-Buq7Vnm1.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/mini-chat.html +5 -5
- package/dist/mobile.html +1 -1
- package/package.json +1 -1
- package/server/lib/host-update/DOCUMENTATION.md +28 -16
- package/server/lib/host-update/cli-worker.js +71 -24
- package/server/lib/host-update/cli.js +9 -6
- package/server/lib/host-update/cli.test.js +28 -5
- package/server/lib/host-update/releases.js +33 -2
- package/server/lib/host-update/runtime.test.js +16 -1
- package/dist/assets/MarkdownRenderer-DL1l4dgn.js +0 -2
- package/dist/assets/types-DjBXLnbS.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{I as t}from"./platform-B2ylz14u.js";import{a as n,r}from"./vendor-zustand-CTekDqaS.js";import{ot as i,st as a}from"./vendor-base-ui-wXsskyKm.js";import{St as o}from"./gitApiHttp-ZjM4HkSo.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{_t as s,ft as c,n as l}from"./client-CmtAKi5B.js";import{n as u}from"./vendor-react-BkccXcWz.js";import{R as d}from"./runtime-file-resource-BGZ4tGr5.js";import{r as f}from"./vendor-reactuses-core-DjKFMfz7.js";import{r as p}from"./useUIStore-68ZPpgYA.js";import{Ha as m,Ii as h,Xn as g,Zi as _,ao as v,ca as y,d as b,f as x,hi as S,ii as C,io as w,ni as T,oi as E,t as D,ua as O}from"./ui-BqoDhEiW.js";import{n as k}from"./Icon-CUOVBCQn.js";import{c as A,t as ee}from"./i18n-Sh2Qk9nD.js";import{n as te}from"./ScrollableOverlay-B5Mx_IrY.js";import{i as j,n as M,t as ne}from"./tooltip-B9I9lmf0.js";import{a as re}from"./device-TCHW5U2y.js";import{n as ie,r as ae,t as oe}from"./collapsible-ByaFR6Oc.js";import{t as se}from"./textarea-Cpcy0ejH.js";import{t as ce}from"./gitApi-droqYZ9A.js";import{c as N,i as P,n as F,r as I,s as L}from"./useGitStore-Dvd_1jyD.js";import{t as R}from"./input-DSdEvspA.js";import{t as le}from"./checkbox-ByuwPnuS.js";import{a as ue,c as z,r as B}from"./insertionBoundaries-Bf3EMWj8.js";import{t as V}from"./ModelLogo-CoEkCK6k.js";import{n as H,t as de}from"./useModelLists-C5fB7vLV.js";import{a as U,c as fe,i as W,n as pe,o as G,r as K,s as me,t as he}from"./select--wmAuAOB.js";import{s as q}from"./worktreeManager-33ddwAq1.js";import{a as J,i as Y,n as ge,t as _e}from"./worktreeSourceBranchPreference-Cp5jF1M9.js";import{a as ve,i as ye,n as be}from"./projectMeta-vIaGFaQr.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),x.getState().markSessionAsYuriCreated(e.id),h.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=m.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 ce(c)&&t.isolateRuns!==!1,d=Ee(n),f=u?await q(c):void 0,p=u?await J(c):null,m=[],h=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 y=De(g.providerID,g.modelID),b=r.length>1?`g${e+1}`:void 0,w=_>1?Oe(d,`${y}/${v}`):Oe(d,y),T=b?`${b}/${w}`:w,E=Te({groupSlug:d,runGroup:b,providerID:g.providerID,modelID:g.modelID,index:_>1?v:void 0});try{if(!u){let e=await l.withDirectory(c,()=>l.createSession({title:E}));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 Y(s,{preferredName:T,mode:`new`,branchName:T,worktreeName:T,startRef:t.worktreeBaseBranch||`HEAD`,setupCommands:h,returnAfterDirectoryCreated:!0},{resolvedRootTrackingRemote:p}),n={...e,createdFromBranch:f,kind:`standard`};await C(s)&&await S(e.worktreeRoot??e.path);let r=await l.withDirectory(e.path,()=>l.createSession({title:E}));Ae(r,e.path),x.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&&E(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 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 b({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`})),$=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=w(`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)(V,{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,v=c===void 0||c,y=d===void 0?`top`:d,{t:b}=ee(),x=_(Le),S=_(Re),C=p(ze),T=p(Be),{favoriteModelsList:E,recentModelsList:D}=de(),A=p(Ve),te=p(He),[j,M]=X.useState(!1),[ne,re]=X.useState(``),[ie,ae]=X.useState(null),oe=X.useRef(null),se=X.useRef(null),ce=l===1,N=l===void 0||n.length<l||ce,P;if(t[0]!==n){P=new Map;for(let e of n){let t=`${e.providerID}:${e.modelID}`;P.set(t,(P.get(t)||0)+1)}t[0]=n,t[1]=P}else P=t[1];let F=P,I;t[2]===n?I=t[3]:(I=e=>n.filter(t=>t.providerID===e.providerID&&t.modelID===e.modelID).findIndex(t=>t.instanceId===e.instanceId)+1,t[2]=n,t[3]=I);let L=I,R,le;t[4]!==y||t[5]!==j?(R=()=>{if(!j||!se.current)return;let e=se.current.getBoundingClientRect();if(y===`bottom`){let t=(window.visualViewport?.height??document.documentElement.clientHeight??window.innerHeight)-e.bottom-16-112;ae(Math.max(160,Math.min(320,t)));return}let t=se.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;ae(Math.max(150,Math.min(300,r)))},le=[y,j],t[4]=y,t[5]=j,t[6]=R,t[7]=le):(R=t[6],le=t[7]),X.useEffect(R,le);let ue,z;t[8]!==N||t[9]!==j?(ue=()=>{!N&&j&&(M(!1),re(``))},z=[N,j],t[8]=N,t[9]=j,t[10]=ue,t[11]=z):(ue=t[10],z=t[11]),X.useEffect(ue,z);let B,V;t[12]===j?(B=t[13],V=t[14]):(B=()=>{if(!j)return;let e=e=>{oe.current&&!oe.current.contains(e.target)&&(M(!1),re(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},V=[j],t[12]=j,t[13]=B,t[14]=V),X.useEffect(B,V);let U;t[15]!==ce||t[16]!==r||t[17]!==a||t[18]!==n.length?(U=e=>{let t={providerID:e.providerID,modelID:e.modelID,displayName:O(e.model,e.modelID)||e.modelID,instanceId:Pe()};ce&&n.length>0&&a?a(0,t):r(t),ce&&(M(!1),re(``))},t[15]=ce,t[16]=r,t[17]=a,t[18]=n.length,t[19]=U):U=t[19];let G=U,K;t[20]===b?K=t[21]:(K=b(`multirun.modelMultiSelect.search.placeholder`),t[20]=b,t[21]=K);let q;t[22]===b?q=t[23]:(q=b(`multirun.modelMultiSelect.search.noResults`),t[22]=b,t[23]=q);let J;t[24]===b?J=t[25]:(J=b(`multirun.modelMultiSelect.sections.favorites`),t[24]=b,t[25]=J);let Y;t[26]===b?Y=t[27]:(Y=b(`multirun.modelMultiSelect.sections.recent`),t[26]=b,t[27]=Y);let ge;t[28]===b?ge=t[29]:(ge=b(`multirun.modelMultiSelect.keyboard.hint`),t[28]=b,t[29]=ge);let _e;t[30]===b?_e=t[31]:(_e=b(`settings.agents.modelSelector.actions.favorite`),t[30]=b,t[31]=_e);let ve;t[32]===b?ve=t[33]:(ve=b(`settings.agents.modelSelector.actions.unfavorite`),t[32]=b,t[33]=ve);let ye;t[34]===b?ye=t[35]:(ye=b(`chat.modelControls.provider`),t[34]=b,t[35]=ye);let be;t[36]===b?be=t[37]:(be=b(`chat.modelControls.capabilities`),t[36]=b,t[37]=be);let Se;t[38]===b?Se=t[39]:(Se=b(`chat.modelControls.capability.toolCalling`),t[38]=b,t[39]=Se);let Ce;t[40]===b?Ce=t[41]:(Ce=b(`chat.modelControls.capability.reasoning`),t[40]=b,t[41]=Ce);let Z;t[42]===b?Z=t[43]:(Z=b(`chat.modelControls.modality.image`),t[42]=b,t[43]=Z);let we;t[44]===b?we=t[45]:(we=b(`chat.modelControls.modality.video`),t[44]=b,t[45]=we);let Te;t[46]===b?Te=t[47]:(Te=b(`chat.modelControls.modality.audio`),t[46]=b,t[47]=Te);let Q;t[48]===b?Q=t[49]:(Q=b(`chat.modelControls.costPerMillion`),t[48]=b,t[49]=Q);let Ee;t[50]===b?Ee=t[51]:(Ee=b(`chat.modelControls.costInput`),t[50]=b,t[51]=Ee);let De;t[52]===b?De=t[53]:(De=b(`chat.modelControls.costOutput`),t[52]=b,t[53]=De);let Oe;t[54]!==K||t[55]!==q||t[56]!==J||t[57]!==Y||t[58]!==ge||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:q,favorites:J,recent:Y,keyboardHint:ge,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]=q,t[56]=J,t[57]=Y,t[58]=ge,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=w(`relative`,m),t[72]=m,t[73]=Ae);let je;t[74]===u?je=t[75]:(je=w(Ne,`!border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70`,u),t[74]=u,t[75]=je);let Me=!N,Ie;t[76]===j?Ie=t[77]:(Ie=()=>{M(!j)},t[76]=j,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]!==b?(Ge=s??b(`multirun.modelMultiSelect.actions.addModel`),t[80]=s,t[81]=b,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)(g,{ref:se,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]!==ie||t[90]!==N||t[91]!==f||t[92]!==y||t[93]!==E||t[94]!==S||t[95]!==G||t[96]!==A||t[97]!==T||t[98]!==j||t[99]!==ke||t[100]!==F||t[101]!==te||t[102]!==x||t[103]!==D||t[104]!==ne||t[105]!==C?(qe=j?(0,$.jsx)(`div`,{className:w(`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`,y===`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)(H,{providers:x,providerOrder:te,favoriteModels:E,recentModels:D,getMetadata:S,hiddenModels:A,searchQuery:ne,onSearchQueryChange:re,onSelect:G,labels:ke,selectionCount:e=>F.get(`${e.providerID}:${e.modelID}`)||0,disabled:!N,maxHeightClassName:`flex-1`,maxHeightStyle:{maxHeight:ie?`${ie}px`:`300px`},stickyHeaders:!0,tooltipsEnabled:j,isFavorite:e=>T(e.providerID,e.modelID),onToggleFavorite:e=>C(e.providerID,e.modelID),onEscape:()=>{M(!1),re(``)}})}):null,t[89]=ie,t[90]=N,t[91]=f,t[92]=y,t[93]=E,t[94]=S,t[95]=G,t[96]=A,t[97]=T,t[98]=j,t[99]=ke,t[100]=F,t[101]=te,t[102]=x,t[103]=D,t[104]=ne,t[105]=C,t[106]=qe):qe=t[106];let Je;t[107]!==Ae||t[108]!==Ke||t[109]!==qe?(Je=(0,$.jsxs)(`div`,{className:Ae,ref:oe,children:[Ke,qe]}),t[107]=Ae,t[108]=Ke,t[109]=qe,t[110]=Je):Je=t[110];let Ye;t[111]!==L||t[112]!==F||t[113]!==i||t[114]!==a||t[115]!==x||t[116]!==n||t[117]!==v||t[118]!==b?(Ye=v&&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=F.get(n)||1,o=L(e),s=x.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)(he,{value:u,onValueChange:n=>{if(!a)return;let r=n===`__default__`?void 0:n;a(t,{...e,variant:r})},children:[(0,$.jsxs)(me,{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:w(`h-3.5 w-3.5 flex-shrink-0`,u===`__default__`?`text-muted-foreground`:`text-[color:var(--status-info)]`)}),(0,$.jsx)(fe,{placeholder:b(`multirun.modelMultiSelect.variant.placeholder`),children:e=>e===`__default__`?b(`multirun.modelMultiSelect.variant.default`):e})]}),(0,$.jsxs)(pe,{fitContent:!0,children:[(0,$.jsx)(W,{value:`__default__`,className:`pr-2 [&>span:first-child]:hidden`,children:b(`multirun.modelMultiSelect.variant.default`)}),c.map(Ue)]})]})]},e.instanceId)})}),t[111]=L,t[112]=F,t[113]=i,t[114]=a,t[115]=x,t[116]=n,t[117]=v,t[118]=b,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]!==b?(Ze=o!==void 0&&n.length<o&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground`,children:l===void 0?b(`multirun.modelMultiSelect.validation.minOnly`,{min:o}):b(`multirun.modelMultiSelect.validation.minToMax`,{min:o,max:l})}),t[123]=l,t[124]=o,t[125]=n.length,t[126]=b,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)(W,{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=N(e),a=P(e),o=I(e),s=L(Ye),c=L(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 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}=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 q(e).catch(()=>null):null;if(a)return;let i=localStorage.getItem(_e),{sourceBranch:o,shouldClearSavedSourceBranch:s}=ge({branches:d,savedSourceBranch:i,rootBranch:t});if(s&&localStorage.removeItem(_e),a||r&&d.includes(r))return;o&&n(o)}catch{}})(),()=>{a=!0}},[d,e,i,l,n,t]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(he,{value:t,onValueChange:n,disabled:i||!u||l,children:[(0,$.jsx)(me,{id:a,size:`lg`,className:r??`w-fit typography-meta text-foreground`,children:(0,$.jsx)(fe,{placeholder:o(l?`multiRun.branchSelector.status.loadingBranches`:`multiRun.branchSelector.placeholder.selectSourceBranch`)})}),(0,$.jsx)(pe,{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)(K,{children:[(0,$.jsx)(U,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.localBranches`)}),s.map(e=>(0,$.jsx)(W,{value:e,className:`whitespace-normal break-all`,children:e},e))]}),s.length>0&&c.length>0&&(0,$.jsx)(G,{}),c.length>0&&(0,$.jsxs)(K,{children:[(0,$.jsx)(U,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.remoteBranches`)}),c.map(e=>(0,$.jsx)(W,{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=_(Qe),u=_($e),d=_(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,v;t[4]!==p.length||t[5]!==u?(g=()=>{p.length===0&&u()},v=[p.length,u],t[4]=p.length,t[5]=u,t[6]=g,t[7]=v):(g=t[6],v=t[7]),X.useEffect(g,v);let y,b;t[8]!==d||t[9]!==a||t[10]!==r||t[11]!==h||t[12]!==n?(y=()=>{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)},b=[d,a,r,h,n],t[8]=d,t[9]=a,t[10]=r,t[11]=h,t[12]=n,t[13]=y,t[14]=b):(y=t[13],b=t[14]),X.useEffect(y,b);let x=n.trim().length>0?n:void 0,S;t[15]===i?S=t[16]:(S=w(`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]=S);let C;t[17]===c?C=t[18]:(C=c(`multirun.agentSelector.placeholder`),t[17]=c,t[18]=C);let T;t[19]===C?T=t[20]:(T=(0,$.jsx)(fe,{placeholder:C}),t[19]=C,t[20]=T);let E;t[21]!==o||t[22]!==S||t[23]!==T?(E=(0,$.jsx)(me,{id:o,size:`lg`,className:S,children:T}),t[21]=o,t[22]=S,t[23]=T,t[24]=E):E=t[24];let D;t[25]===h?D=t[26]:(D=h.length>0&&(0,$.jsx)(K,{children:h.map(nt)}),t[25]=h,t[26]=D);let O;t[27]!==s||t[28]!==D?(O=(0,$.jsx)(pe,{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]!==x||t[33]!==E||t[34]!==O?(k=(0,$.jsxs)(he,{value:x,onValueChange:r,disabled:a,children:[E,O]}),t[30]=a,t[31]=r,t[32]=x,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)(W,{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)(j,{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)(ne,{children:[r,(0,$.jsx)(M,{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=v(e.path),n=e.icon?ye[e.icon]:null,r=e.color?be[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)(ve,{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,_]=X.useState([]),[v,y]=X.useState(!1),[b,S]=X.useState([]),[C,E]=X.useState(!1),[O,se]=X.useState(!1),[ce,N]=X.useState(!0),P=X.useRef(null),F=o(e=>e.currentDirectory??null),I=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},[]),L=m(e=>e.activeProjectId),ue=m(e=>e.setActiveProjectIdOnly),z=m(e=>e.projects),[B,V]=X.useState(()=>L??null);X.useEffect(()=>{if(L){V(L);return}!B&&z.length>0&&V(z[0].id)},[L,z,B]);let H=X.useMemo(()=>B?z.find(e=>e.id===B)??null:null,[z,B]),de=H?.path??F,U=f(e=>{V(e),e!==L&&ue(e)}),G=X.useMemo(()=>{if(H?.path)return{id:H.id,path:H.path};let e=F??I;return e?{id:`path:${e}`,path:e}:null},[H,F,I]),[K]=X.useState(()=>typeof window<`u`&&t()),q=X.useMemo(()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),[]),J=re(),Y=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},[]),ge=X.useMemo(()=>K&&q||J?`pl-[5.5rem]`:`pl-3`,[K,q,J]),_e=X.useMemo(()=>!K||!q||Y===null?``:Y>=26?`h-12`:Y<=15?`h-14`:``,[K,q,Y]),ve=f(async e=>{e.target.closest(`button, a, input, select, textarea`)||e.button===0&&K&&await A()}),ye=f(e=>{r&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r())}),be=!!r;X.useEffect(()=>{if(be)return window.addEventListener(`keydown`,ye,!0),()=>window.removeEventListener(`keydown`,ye,!0)},[be]);let[xe,Se]=X.useState(``),{isLoading:Ce,isGitRepository:Z}=We(de),we=X.useRef(!1),Te=Z===!0,Q=Te&&ce;X.useEffect(()=>{if(Z===!1){we.current=!0,N(!1);return}Z===!0&&we.current&&(we.current=!1,N(!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(!G)return;let e=!1;return se(!0),(async()=>{try{let t=await T(G);e||S(t)}catch{}finally{e||se(!1)}})(),()=>{e=!0}},[G]);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){D.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)});_(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),D.error(a(`multirun.launcher.toast.attachFailed`,{fileName:r.name}))}}n>0&&D.success(a(n===1?`multirun.launcher.toast.attachedSingle`:`multirun.launcher.toast.attachedPlural`,{count:n})),P.current&&(P.current.value=``)},Fe=e=>{_(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)){y(!0),Oe();try{B&&B!==L&&ue(B);let e=h.map(e=>({mime:e.mimeType,filename:e.filename,url:e.dataUrl})),r=b.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&&x.getState().setCurrentSession(o.firstSessionId),n?.())}finally{y(!1)}}},Re=!!(s.trim()&&l.some(e=>e.prompt.trim()&&e.models.length>=1)&&Ie>=1&&de&&!Ce&&(Z===!1||!Q||xe)),ze=b.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:ve,className:w(`relative flex h-12 shrink-0 items-center justify-center border-b app-region-drag select-none`,ge,_e),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)(ne,{children:[(0,$.jsx)(j,{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)(M,{children:(0,$.jsx)(`p`,{children:a(`multirun.launcher.actions.closeEsc`)})})]})})]}),(0,$.jsx)(te,{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`)}),z.length>0?(0,$.jsxs)(he,{value:B??void 0,onValueChange:U,children:[(0,$.jsx)(me,{id:`multirun-project`,size:`lg`,className:`w-fit max-w-full`,children:H?(0,$.jsx)(fe,{children:st(H)}):(0,$.jsx)(fe,{placeholder:a(`multirun.launcher.project.placeholder`)})}),(0,$.jsx)(pe,{fitContent:!0,children:z.map(e=>(0,$.jsx)(W,{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: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:de,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)(le,{checked:ce,onChange:N,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)(oe,{open:C,onOpenChange:E,children:[(0,$.jsxs)(ae,{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:w(`h-3.5 w-3.5 text-muted-foreground/50 transition-transform duration-200 ml-auto`,C&&`rotate-180`)})]}),(0,$.jsx)(ie,{children:(0,$.jsx)(`div`,{className:`pt-2 space-y-1.5`,children:O?(0,$.jsx)(`p`,{className:`typography-meta text-muted-foreground/70 px-2`,children:a(`multirun.launcher.setupCommands.loading`)}):(0,$.jsxs)($.Fragment,{children:[b.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(R,{value:e,onChange:e=>{let n=[...b];n[t]=e.target.value,S(n)},placeholder:a(`multirun.launcher.setupCommands.commandPlaceholder`),className:`h-8 flex-1 font-mono text-xs`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>S(b.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:()=>S([...b,``]),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:P,type:`file`,multiple:!0,className:`hidden`,onChange:Ne,accept:`*/*`}),(0,$.jsxs)(ne,{children:[(0,$.jsx)(j,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>P.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)(M,{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)(g,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:a(`multirun.launcher.actions.cancel`)}),(0,$.jsx)(g,{type:`submit`,size:`sm`,disabled:!Re||v,children:v?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 T=f(w),E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(e,t)=>{if(e.startsWith(`/`)){let n=e.indexOf(` `),r=e.indexOf(`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{I as t}from"./platform-B2ylz14u.js";import{a as n,r}from"./vendor-zustand-CTekDqaS.js";import{ot as i,st as a}from"./vendor-base-ui-wXsskyKm.js";import{St as o}from"./gitApiHttp-ZjM4HkSo.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{_t as s,ft as c,n as l}from"./client-CmtAKi5B.js";import{n as u}from"./vendor-react-BkccXcWz.js";import{R as d}from"./runtime-file-resource-BGZ4tGr5.js";import{r as f}from"./vendor-reactuses-core-DjKFMfz7.js";import{r as p}from"./useUIStore-68ZPpgYA.js";import{Ha as m,Ii as h,Xn as g,Zi as _,ao as v,ca as y,d as b,f as x,hi as S,ii as C,io as w,ni as T,oi as E,t as D,ua as O}from"./ui-Pjq_Ygzo.js";import{n as k}from"./Icon-Bj9hTMjF.js";import{c as A,t as ee}from"./i18n-Sh2Qk9nD.js";import{n as te}from"./ScrollableOverlay-B6nm-QHe.js";import{i as j,n as M,t as ne}from"./tooltip-vDrp4bzq.js";import{a as re}from"./device-TCHW5U2y.js";import{n as ie,r as ae,t as oe}from"./collapsible-BOWyQRZn.js";import{t as se}from"./textarea-B0VZhgml.js";import{t as ce}from"./gitApi-OVA3TAy3.js";import{c as N,i as P,n as F,r as I,s as L}from"./useGitStore-Tb4ovphQ.js";import{t as R}from"./input-CoI-IWJg.js";import{t as le}from"./checkbox-B0zYfEMl.js";import{a as ue,c as z,r as B}from"./insertionBoundaries-Bw6mz-QZ.js";import{t as V}from"./ModelLogo-Clc0TbVa.js";import{n as H,t as de}from"./useModelLists-QXDxo5Ac.js";import{a as U,c as fe,i as W,n as pe,o as G,r as K,s as me,t as he}from"./select-COAwWxv-.js";import{s as q}from"./worktreeManager-DmdHIgOn.js";import{a as J,i as Y,n as ge,t as _e}from"./worktreeSourceBranchPreference-Buq7Vnm1.js";import{a as ve,i as ye,n as be}from"./projectMeta-vIaGFaQr.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),x.getState().markSessionAsYuriCreated(e.id),h.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=m.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 ce(c)&&t.isolateRuns!==!1,d=Ee(n),f=u?await q(c):void 0,p=u?await J(c):null,m=[],h=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 y=De(g.providerID,g.modelID),b=r.length>1?`g${e+1}`:void 0,w=_>1?Oe(d,`${y}/${v}`):Oe(d,y),T=b?`${b}/${w}`:w,E=Te({groupSlug:d,runGroup:b,providerID:g.providerID,modelID:g.modelID,index:_>1?v:void 0});try{if(!u){let e=await l.withDirectory(c,()=>l.createSession({title:E}));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 Y(s,{preferredName:T,mode:`new`,branchName:T,worktreeName:T,startRef:t.worktreeBaseBranch||`HEAD`,setupCommands:h,returnAfterDirectoryCreated:!0},{resolvedRootTrackingRemote:p}),n={...e,createdFromBranch:f,kind:`standard`};await C(s)&&await S(e.worktreeRoot??e.path);let r=await l.withDirectory(e.path,()=>l.createSession({title:E}));Ae(r,e.path),x.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&&E(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 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 b({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`})),$=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=w(`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)(V,{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,v=c===void 0||c,y=d===void 0?`top`:d,{t:b}=ee(),x=_(Le),S=_(Re),C=p(ze),T=p(Be),{favoriteModelsList:E,recentModelsList:D}=de(),A=p(Ve),te=p(He),[j,M]=X.useState(!1),[ne,re]=X.useState(``),[ie,ae]=X.useState(null),oe=X.useRef(null),se=X.useRef(null),ce=l===1,N=l===void 0||n.length<l||ce,P;if(t[0]!==n){P=new Map;for(let e of n){let t=`${e.providerID}:${e.modelID}`;P.set(t,(P.get(t)||0)+1)}t[0]=n,t[1]=P}else P=t[1];let F=P,I;t[2]===n?I=t[3]:(I=e=>n.filter(t=>t.providerID===e.providerID&&t.modelID===e.modelID).findIndex(t=>t.instanceId===e.instanceId)+1,t[2]=n,t[3]=I);let L=I,R,le;t[4]!==y||t[5]!==j?(R=()=>{if(!j||!se.current)return;let e=se.current.getBoundingClientRect();if(y===`bottom`){let t=(window.visualViewport?.height??document.documentElement.clientHeight??window.innerHeight)-e.bottom-16-112;ae(Math.max(160,Math.min(320,t)));return}let t=se.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;ae(Math.max(150,Math.min(300,r)))},le=[y,j],t[4]=y,t[5]=j,t[6]=R,t[7]=le):(R=t[6],le=t[7]),X.useEffect(R,le);let ue,z;t[8]!==N||t[9]!==j?(ue=()=>{!N&&j&&(M(!1),re(``))},z=[N,j],t[8]=N,t[9]=j,t[10]=ue,t[11]=z):(ue=t[10],z=t[11]),X.useEffect(ue,z);let B,V;t[12]===j?(B=t[13],V=t[14]):(B=()=>{if(!j)return;let e=e=>{oe.current&&!oe.current.contains(e.target)&&(M(!1),re(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},V=[j],t[12]=j,t[13]=B,t[14]=V),X.useEffect(B,V);let U;t[15]!==ce||t[16]!==r||t[17]!==a||t[18]!==n.length?(U=e=>{let t={providerID:e.providerID,modelID:e.modelID,displayName:O(e.model,e.modelID)||e.modelID,instanceId:Pe()};ce&&n.length>0&&a?a(0,t):r(t),ce&&(M(!1),re(``))},t[15]=ce,t[16]=r,t[17]=a,t[18]=n.length,t[19]=U):U=t[19];let G=U,K;t[20]===b?K=t[21]:(K=b(`multirun.modelMultiSelect.search.placeholder`),t[20]=b,t[21]=K);let q;t[22]===b?q=t[23]:(q=b(`multirun.modelMultiSelect.search.noResults`),t[22]=b,t[23]=q);let J;t[24]===b?J=t[25]:(J=b(`multirun.modelMultiSelect.sections.favorites`),t[24]=b,t[25]=J);let Y;t[26]===b?Y=t[27]:(Y=b(`multirun.modelMultiSelect.sections.recent`),t[26]=b,t[27]=Y);let ge;t[28]===b?ge=t[29]:(ge=b(`multirun.modelMultiSelect.keyboard.hint`),t[28]=b,t[29]=ge);let _e;t[30]===b?_e=t[31]:(_e=b(`settings.agents.modelSelector.actions.favorite`),t[30]=b,t[31]=_e);let ve;t[32]===b?ve=t[33]:(ve=b(`settings.agents.modelSelector.actions.unfavorite`),t[32]=b,t[33]=ve);let ye;t[34]===b?ye=t[35]:(ye=b(`chat.modelControls.provider`),t[34]=b,t[35]=ye);let be;t[36]===b?be=t[37]:(be=b(`chat.modelControls.capabilities`),t[36]=b,t[37]=be);let Se;t[38]===b?Se=t[39]:(Se=b(`chat.modelControls.capability.toolCalling`),t[38]=b,t[39]=Se);let Ce;t[40]===b?Ce=t[41]:(Ce=b(`chat.modelControls.capability.reasoning`),t[40]=b,t[41]=Ce);let Z;t[42]===b?Z=t[43]:(Z=b(`chat.modelControls.modality.image`),t[42]=b,t[43]=Z);let we;t[44]===b?we=t[45]:(we=b(`chat.modelControls.modality.video`),t[44]=b,t[45]=we);let Te;t[46]===b?Te=t[47]:(Te=b(`chat.modelControls.modality.audio`),t[46]=b,t[47]=Te);let Q;t[48]===b?Q=t[49]:(Q=b(`chat.modelControls.costPerMillion`),t[48]=b,t[49]=Q);let Ee;t[50]===b?Ee=t[51]:(Ee=b(`chat.modelControls.costInput`),t[50]=b,t[51]=Ee);let De;t[52]===b?De=t[53]:(De=b(`chat.modelControls.costOutput`),t[52]=b,t[53]=De);let Oe;t[54]!==K||t[55]!==q||t[56]!==J||t[57]!==Y||t[58]!==ge||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:q,favorites:J,recent:Y,keyboardHint:ge,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]=q,t[56]=J,t[57]=Y,t[58]=ge,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=w(`relative`,m),t[72]=m,t[73]=Ae);let je;t[74]===u?je=t[75]:(je=w(Ne,`!border-border/80 !bg-[var(--surface-subtle)] hover:!bg-[var(--interactive-hover)]/70`,u),t[74]=u,t[75]=je);let Me=!N,Ie;t[76]===j?Ie=t[77]:(Ie=()=>{M(!j)},t[76]=j,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]!==b?(Ge=s??b(`multirun.modelMultiSelect.actions.addModel`),t[80]=s,t[81]=b,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)(g,{ref:se,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]!==ie||t[90]!==N||t[91]!==f||t[92]!==y||t[93]!==E||t[94]!==S||t[95]!==G||t[96]!==A||t[97]!==T||t[98]!==j||t[99]!==ke||t[100]!==F||t[101]!==te||t[102]!==x||t[103]!==D||t[104]!==ne||t[105]!==C?(qe=j?(0,$.jsx)(`div`,{className:w(`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`,y===`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)(H,{providers:x,providerOrder:te,favoriteModels:E,recentModels:D,getMetadata:S,hiddenModels:A,searchQuery:ne,onSearchQueryChange:re,onSelect:G,labels:ke,selectionCount:e=>F.get(`${e.providerID}:${e.modelID}`)||0,disabled:!N,maxHeightClassName:`flex-1`,maxHeightStyle:{maxHeight:ie?`${ie}px`:`300px`},stickyHeaders:!0,tooltipsEnabled:j,isFavorite:e=>T(e.providerID,e.modelID),onToggleFavorite:e=>C(e.providerID,e.modelID),onEscape:()=>{M(!1),re(``)}})}):null,t[89]=ie,t[90]=N,t[91]=f,t[92]=y,t[93]=E,t[94]=S,t[95]=G,t[96]=A,t[97]=T,t[98]=j,t[99]=ke,t[100]=F,t[101]=te,t[102]=x,t[103]=D,t[104]=ne,t[105]=C,t[106]=qe):qe=t[106];let Je;t[107]!==Ae||t[108]!==Ke||t[109]!==qe?(Je=(0,$.jsxs)(`div`,{className:Ae,ref:oe,children:[Ke,qe]}),t[107]=Ae,t[108]=Ke,t[109]=qe,t[110]=Je):Je=t[110];let Ye;t[111]!==L||t[112]!==F||t[113]!==i||t[114]!==a||t[115]!==x||t[116]!==n||t[117]!==v||t[118]!==b?(Ye=v&&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=F.get(n)||1,o=L(e),s=x.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)(he,{value:u,onValueChange:n=>{if(!a)return;let r=n===`__default__`?void 0:n;a(t,{...e,variant:r})},children:[(0,$.jsxs)(me,{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:w(`h-3.5 w-3.5 flex-shrink-0`,u===`__default__`?`text-muted-foreground`:`text-[color:var(--status-info)]`)}),(0,$.jsx)(fe,{placeholder:b(`multirun.modelMultiSelect.variant.placeholder`),children:e=>e===`__default__`?b(`multirun.modelMultiSelect.variant.default`):e})]}),(0,$.jsxs)(pe,{fitContent:!0,children:[(0,$.jsx)(W,{value:`__default__`,className:`pr-2 [&>span:first-child]:hidden`,children:b(`multirun.modelMultiSelect.variant.default`)}),c.map(Ue)]})]})]},e.instanceId)})}),t[111]=L,t[112]=F,t[113]=i,t[114]=a,t[115]=x,t[116]=n,t[117]=v,t[118]=b,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]!==b?(Ze=o!==void 0&&n.length<o&&(0,$.jsx)(`p`,{className:`typography-micro text-muted-foreground`,children:l===void 0?b(`multirun.modelMultiSelect.validation.minOnly`,{min:o}):b(`multirun.modelMultiSelect.validation.minToMax`,{min:o,max:l})}),t[123]=l,t[124]=o,t[125]=n.length,t[126]=b,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)(W,{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=N(e),a=P(e),o=I(e),s=L(Ye),c=L(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 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}=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 q(e).catch(()=>null):null;if(a)return;let i=localStorage.getItem(_e),{sourceBranch:o,shouldClearSavedSourceBranch:s}=ge({branches:d,savedSourceBranch:i,rootBranch:t});if(s&&localStorage.removeItem(_e),a||r&&d.includes(r))return;o&&n(o)}catch{}})(),()=>{a=!0}},[d,e,i,l,n,t]),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(he,{value:t,onValueChange:n,disabled:i||!u||l,children:[(0,$.jsx)(me,{id:a,size:`lg`,className:r??`w-fit typography-meta text-foreground`,children:(0,$.jsx)(fe,{placeholder:o(l?`multiRun.branchSelector.status.loadingBranches`:`multiRun.branchSelector.placeholder.selectSourceBranch`)})}),(0,$.jsx)(pe,{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)(K,{children:[(0,$.jsx)(U,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.localBranches`)}),s.map(e=>(0,$.jsx)(W,{value:e,className:`whitespace-normal break-all`,children:e},e))]}),s.length>0&&c.length>0&&(0,$.jsx)(G,{}),c.length>0&&(0,$.jsxs)(K,{children:[(0,$.jsx)(U,{className:`font-semibold text-foreground`,children:o(`multiRun.branchSelector.groups.remoteBranches`)}),c.map(e=>(0,$.jsx)(W,{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=_(Qe),u=_($e),d=_(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,v;t[4]!==p.length||t[5]!==u?(g=()=>{p.length===0&&u()},v=[p.length,u],t[4]=p.length,t[5]=u,t[6]=g,t[7]=v):(g=t[6],v=t[7]),X.useEffect(g,v);let y,b;t[8]!==d||t[9]!==a||t[10]!==r||t[11]!==h||t[12]!==n?(y=()=>{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)},b=[d,a,r,h,n],t[8]=d,t[9]=a,t[10]=r,t[11]=h,t[12]=n,t[13]=y,t[14]=b):(y=t[13],b=t[14]),X.useEffect(y,b);let x=n.trim().length>0?n:void 0,S;t[15]===i?S=t[16]:(S=w(`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]=S);let C;t[17]===c?C=t[18]:(C=c(`multirun.agentSelector.placeholder`),t[17]=c,t[18]=C);let T;t[19]===C?T=t[20]:(T=(0,$.jsx)(fe,{placeholder:C}),t[19]=C,t[20]=T);let E;t[21]!==o||t[22]!==S||t[23]!==T?(E=(0,$.jsx)(me,{id:o,size:`lg`,className:S,children:T}),t[21]=o,t[22]=S,t[23]=T,t[24]=E):E=t[24];let D;t[25]===h?D=t[26]:(D=h.length>0&&(0,$.jsx)(K,{children:h.map(nt)}),t[25]=h,t[26]=D);let O;t[27]!==s||t[28]!==D?(O=(0,$.jsx)(pe,{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]!==x||t[33]!==E||t[34]!==O?(k=(0,$.jsxs)(he,{value:x,onValueChange:r,disabled:a,children:[E,O]}),t[30]=a,t[31]=r,t[32]=x,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)(W,{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)(j,{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)(ne,{children:[r,(0,$.jsx)(M,{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=v(e.path),n=e.icon?ye[e.icon]:null,r=e.color?be[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)(ve,{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,_]=X.useState([]),[v,y]=X.useState(!1),[b,S]=X.useState([]),[C,E]=X.useState(!1),[O,se]=X.useState(!1),[ce,N]=X.useState(!0),P=X.useRef(null),F=o(e=>e.currentDirectory??null),I=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},[]),L=m(e=>e.activeProjectId),ue=m(e=>e.setActiveProjectIdOnly),z=m(e=>e.projects),[B,V]=X.useState(()=>L??null);X.useEffect(()=>{if(L){V(L);return}!B&&z.length>0&&V(z[0].id)},[L,z,B]);let H=X.useMemo(()=>B?z.find(e=>e.id===B)??null:null,[z,B]),de=H?.path??F,U=f(e=>{V(e),e!==L&&ue(e)}),G=X.useMemo(()=>{if(H?.path)return{id:H.id,path:H.path};let e=F??I;return e?{id:`path:${e}`,path:e}:null},[H,F,I]),[K]=X.useState(()=>typeof window<`u`&&t()),q=X.useMemo(()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),[]),J=re(),Y=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},[]),ge=X.useMemo(()=>K&&q||J?`pl-[5.5rem]`:`pl-3`,[K,q,J]),_e=X.useMemo(()=>!K||!q||Y===null?``:Y>=26?`h-12`:Y<=15?`h-14`:``,[K,q,Y]),ve=f(async e=>{e.target.closest(`button, a, input, select, textarea`)||e.button===0&&K&&await A()}),ye=f(e=>{r&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r())}),be=!!r;X.useEffect(()=>{if(be)return window.addEventListener(`keydown`,ye,!0),()=>window.removeEventListener(`keydown`,ye,!0)},[be]);let[xe,Se]=X.useState(``),{isLoading:Ce,isGitRepository:Z}=We(de),we=X.useRef(!1),Te=Z===!0,Q=Te&&ce;X.useEffect(()=>{if(Z===!1){we.current=!0,N(!1);return}Z===!0&&we.current&&(we.current=!1,N(!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(!G)return;let e=!1;return se(!0),(async()=>{try{let t=await T(G);e||S(t)}catch{}finally{e||se(!1)}})(),()=>{e=!0}},[G]);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){D.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)});_(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),D.error(a(`multirun.launcher.toast.attachFailed`,{fileName:r.name}))}}n>0&&D.success(a(n===1?`multirun.launcher.toast.attachedSingle`:`multirun.launcher.toast.attachedPlural`,{count:n})),P.current&&(P.current.value=``)},Fe=e=>{_(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)){y(!0),Oe();try{B&&B!==L&&ue(B);let e=h.map(e=>({mime:e.mimeType,filename:e.filename,url:e.dataUrl})),r=b.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&&x.getState().setCurrentSession(o.firstSessionId),n?.())}finally{y(!1)}}},Re=!!(s.trim()&&l.some(e=>e.prompt.trim()&&e.models.length>=1)&&Ie>=1&&de&&!Ce&&(Z===!1||!Q||xe)),ze=b.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:ve,className:w(`relative flex h-12 shrink-0 items-center justify-center border-b app-region-drag select-none`,ge,_e),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)(ne,{children:[(0,$.jsx)(j,{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)(M,{children:(0,$.jsx)(`p`,{children:a(`multirun.launcher.actions.closeEsc`)})})]})})]}),(0,$.jsx)(te,{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`)}),z.length>0?(0,$.jsxs)(he,{value:B??void 0,onValueChange:U,children:[(0,$.jsx)(me,{id:`multirun-project`,size:`lg`,className:`w-fit max-w-full`,children:H?(0,$.jsx)(fe,{children:st(H)}):(0,$.jsx)(fe,{placeholder:a(`multirun.launcher.project.placeholder`)})}),(0,$.jsx)(pe,{fitContent:!0,children:z.map(e=>(0,$.jsx)(W,{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: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:de,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)(le,{checked:ce,onChange:N,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)(oe,{open:C,onOpenChange:E,children:[(0,$.jsxs)(ae,{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:w(`h-3.5 w-3.5 text-muted-foreground/50 transition-transform duration-200 ml-auto`,C&&`rotate-180`)})]}),(0,$.jsx)(ie,{children:(0,$.jsx)(`div`,{className:`pt-2 space-y-1.5`,children:O?(0,$.jsx)(`p`,{className:`typography-meta text-muted-foreground/70 px-2`,children:a(`multirun.launcher.setupCommands.loading`)}):(0,$.jsxs)($.Fragment,{children:[b.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(R,{value:e,onChange:e=>{let n=[...b];n[t]=e.target.value,S(n)},placeholder:a(`multirun.launcher.setupCommands.commandPlaceholder`),className:`h-8 flex-1 font-mono text-xs`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>S(b.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:()=>S([...b,``]),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:P,type:`file`,multiple:!0,className:`hidden`,onChange:Ne,accept:`*/*`}),(0,$.jsxs)(ne,{children:[(0,$.jsx)(j,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>P.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)(M,{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)(g,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:a(`multirun.launcher.actions.cancel`)}),(0,$.jsx)(g,{type:`submit`,size:`sm`,disabled:!Re||v,children:v?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 T=f(w),E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(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){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
3
|
`)?(d(t),l(!0)):l(!1);return}l(!1)},t[12]=E):E=t[12];let D=f(E),O;t[13]!==n.id||t[14]!==a?(O=e=>{a(n.id,{prompt:e})},t[13]=n.id,t[14]=a,t[15]=O):O=t[15];let A=f(O),te;t[16]!==n.prompt||t[17]!==A||t[18]!==D?(te=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=B(t,i===-1?r:i,r,`@${a}`);A(o.text),l(!1),d(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.selectionStart=o.caret,e.selectionEnd=o.caret,e.focus()),D(o.text,o.caret)})},t[16]=n.prompt,t[17]=A,t[18]=D,t[19]=te):te=t[19];let j=f(te),M;t[20]!==n.prompt||t[21]!==A||t[22]!==D?(M=e=>{let t=n.prompt,r=_.current?.selectionStart??t.length,i=t.substring(0,r).lastIndexOf(`@`),a=B(t,i===-1?r:i,r,`@${e}`);A(a.text),l(!1),d(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.selectionStart=a.caret,e.selectionEnd=a.caret,e.focus()),D(a.text,a.caret)})},t[20]=n.prompt,t[21]=A,t[22]=D,t[23]=M):M=t[23];let ne=f(M),re;t[24]!==A||t[25]!==D?(re=e=>{let t=`/${e.name} `;A(t),m(!1),g(``),requestAnimationFrame(()=>{let e=_.current;e&&(e.focus(),e.selectionStart=e.value.length,e.selectionEnd=e.value.length),D(t,t.length)})},t[24]=A,t[25]=D,t[26]=re):re=t[26];let ie=f(re),ae;t[27]!==p||t[28]!==c?(ae=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]=ae):ae=t[29];let oe=f(ae),ce=r+1,N;t[30]!==s||t[31]!==ce?(N=s(`multirun.launcher.groups.groupLabel`,{index:ce}),t[30]=s,t[31]=ce,t[32]=N):N=t[32];let P;t[33]===N?P=t[34]:(P=(0,$.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:N}),t[33]=N,t[34]=P);let F;t[35]!==i||t[36]!==n.id||t[37]!==o||t[38]!==s?(F=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]=F):F=t[39];let I;t[40]!==P||t[41]!==F?(I=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[P,F]}),t[40]=P,t[41]=F,t[42]=I):I=t[42];let L;t[43]===s?L=t[44]:(L=s(`multirun.launcher.groups.prompt.label`),t[43]=s,t[44]=L);let R;t[45]===L?R=t[46]:(R=(0,$.jsx)(ot,{required:!0,children:L}),t[45]=L,t[46]=R);let le=n.prompt,V;t[47]!==A||t[48]!==D?(V=e=>{let t=e.target.value;A(t);let n=e.target.selectionStart??t.length;D(t,n)},t[47]=A,t[48]=D,t[49]=V):V=t[49];let H;t[50]===s?H=t[51]:(H=s(`multirun.launcher.groups.prompt.placeholder`),t[50]=s,t[51]=H);let de;t[52]!==n.prompt||t[53]!==oe||t[54]!==V||t[55]!==H?(de=(0,$.jsx)(se,{ref:_,value:le,onChange:V,onKeyDown:oe,placeholder:H,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]=oe,t[54]=V,t[55]=H,t[56]=de):de=t[56];let U;t[57]!==h||t[58]!==ie||t[59]!==p?(U=p?(0,$.jsx)(ue,{ref:y,searchQuery:h,onCommandSelect:ie,onClose:()=>m(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[57]=h,t[58]=ie,t[59]=p,t[60]=U):U=t[60];let fe;t[61]!==ne||t[62]!==j||t[63]!==u||t[64]!==c?(fe=c?(0,$.jsx)(z,{ref:v,searchQuery:u,onFileSelect:j,onAgentSelect:ne,onSkillSelect:e=>ne(e.name),onClose:()=>l(!1),style:{left:0,top:`auto`,bottom:`calc(100% + 6px)`,marginBottom:0,maxWidth:`100%`}}):null,t[61]=ne,t[62]=j,t[63]=u,t[64]=c,t[65]=fe):fe=t[65];let W;t[66]!==de||t[67]!==U||t[68]!==fe?(W=(0,$.jsxs)(`div`,{className:`relative`,children:[de,U,fe]}),t[66]=de,t[67]=U,t[68]=fe,t[69]=W):W=t[69];let pe;t[70]!==R||t[71]!==W?(pe=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[R,W]}),t[70]=R,t[71]=W,t[72]=pe):pe=t[72];let G;t[73]===s?G=t[74]:(G=s(`multirun.launcher.models.info`,{max:it}),t[73]=s,t[74]=G);let K;t[75]===G?K=t[76]:(K=(0,$.jsx)(at,{children:G}),t[75]=G,t[76]=K);let me;t[77]===s?me=t[78]:(me=s(`multirun.launcher.models.label`),t[77]=s,t[78]=me);let he;t[79]!==K||t[80]!==me?(he=(0,$.jsx)(ot,{required:!0,info:K,children:me}),t[79]=K,t[80]=me,t[81]=he):he=t[81];let q;t[82]!==n.models||t[83]!==x||t[84]!==C||t[85]!==T?(q=(0,$.jsx)(Ie,{selectedModels:n.models,onAdd:x,onRemove:C,onUpdate:T,minModels:1,maxModels:it}),t[82]=n.models,t[83]=x,t[84]=C,t[85]=T,t[86]=q):q=t[86];let J;t[87]!==he||t[88]!==q?(J=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[he,q]}),t[87]=he,t[88]=q,t[89]=J):J=t[89];let Y;return t[90]!==I||t[91]!==pe||t[92]!==J?(Y=(0,$.jsxs)(`div`,{className:`rounded-lg border border-border p-3 space-y-3`,children:[I,pe,J]}),t[90]=I,t[91]=pe,t[92]=J,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-B2ylz14u.js";import{a as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-
|
|
1
|
+
import{n as e}from"./platform-B2ylz14u.js";import{a as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-D4sSimuj.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 +1 @@
|
|
|
1
|
-
import{a as e}from"./mobileBackNavigation-
|
|
1
|
+
import{a as e}from"./mobileBackNavigation-oDcLGmHp.js";var t=(e=>{let t=new Map,n=()=>{let e=0;for(let n of t.values())e+=n;return e};return{hold(r){let i=(t.get(r)??0)+1;t.set(r,i),n()===1&&e.conceal();let a=!1;return()=>{if(a)return;a=!0;let i=(t.get(r)??1)-1;i<=0?t.delete(r):t.set(r,i),n()===0&&e.reveal()}}}})(e),n=new Map,r=e=>t.hold(e),i=e=>{n.has(e)||n.set(e,t.hold(e))},a=e=>{let t=n.get(e);t&&(n.delete(e),t())},o=`btw-page`,s=`btw-sheet`,c=`text-selection`;export{r as a,i,s as n,a as o,c as r,o as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/remote-input-store-DPw_n0MZ.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-switch-DEPKHgdL.js","assets/runtime-auth-DA-qfGHk.js","assets/platform-B2ylz14u.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-zustand-CTekDqaS.js","assets/vendor-base-ui-wXsskyKm.js","assets/prompt-attachment-upload-BzYqZdzd.js","assets/runtime-fetch-V-iMWR8t.js","assets/reasoning-projection-client-BEhVknv9.js","assets/runtime-file-resource-BGZ4tGr5.js","assets/vendor-react-BkccXcWz.js","assets/vendor-tanstack-query-core-BSjXNgF_.js","assets/vendor-tanstack-react-query-DIb_ItL-.js","assets/path-utils-jGozTg9d.js","assets/vendor-reactuses-core-DjKFMfz7.js","assets/vendor-lodash-es-BS45jPoZ.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/summaries-BQMyJaaw.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-CzG_3qFv.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{r as i}from"./summaries-BQMyJaaw.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{Ga as o,Ha as s}from"./ui-
|
|
2
|
+
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,r}from"./runtime-switch-DEPKHgdL.js";import{r as i}from"./summaries-BQMyJaaw.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{Ga as o,Ha as s}from"./ui-Pjq_Ygzo.js";import{i as c,n as l,r as u}from"./remoteProjectQueries-BQzoY_Y9.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-DPw_n0MZ.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,26,27]));r===t()&&await i(e,n)}export{d as n,p as r,f as t};
|
package/dist/assets/{openRemoteProjectSession-DPb8H79n.js → openRemoteProjectSession-BbAkznDS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./useUIStore-68ZPpgYA.js";import{Ft as t,Ga as n,Ha as r}from"./ui-
|
|
1
|
+
import{r as e}from"./useUIStore-68ZPpgYA.js";import{Ft as t,Ga as n,Ha as r}from"./ui-Pjq_Ygzo.js";import{i,n as a}from"./remoteProjectQueries-BQzoY_Y9.js";function o(i,a,o,s=i.path,c=!1,l){a.assertCurrent(),r.getState().setActiveProjectIdOnly(i.id),n.getState().openRemoteSession(i,{hubId:a.hubId,hostId:i.hostId,directory:s,...i.instanceId?{instanceId:i.instanceId}:{}},o,l),e.getState().setActiveMainTab(`chat`),c&&t.getState().openRemoteProject()}async function s(e,t=!1){let n=await a(),s=n.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(n);c.assertCurrent(),r.getState().upsertRemoteProject(s,n.hubId),o(s,c,null,s.path,t)}export{o as n,s as t};
|
package/dist/assets/{openSessionFromDeepLink-gJWOkm8w.js → openSessionFromDeepLink-qg52CXP9.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/remoteProjectQueries-BQzoY_Y9.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-switch-DEPKHgdL.js","assets/runtime-auth-DA-qfGHk.js","assets/runtime-fetch-V-iMWR8t.js","assets/reasoning-projection-client-BEhVknv9.js","assets/platform-B2ylz14u.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-base-ui-wXsskyKm.js","assets/client-CmtAKi5B.js","assets/vendor-zustand-CTekDqaS.js","assets/vendor-opencode-client-BM2r1f0o.js","assets/vendor-effect-X1Hqc7ba.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/safeStorage-DTOhKN0V.js","assets/prompt-attachment-upload-BzYqZdzd.js","assets/runtime-file-resource-BGZ4tGr5.js","assets/vendor-react-BkccXcWz.js","assets/vendor-tanstack-query-core-BSjXNgF_.js","assets/vendor-tanstack-react-query-DIb_ItL-.js","assets/path-utils-jGozTg9d.js","assets/vendor-reactuses-core-DjKFMfz7.js","assets/vendor-lodash-es-BS45jPoZ.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/summaries-BQMyJaaw.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/runtime-file-store-BVRgEtI-.js","assets/navigation-
|
|
2
|
-
import{o as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{r as t}from"./useUIStore-68ZPpgYA.js";import{Dt as n,Hi as r,f as i}from"./ui-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/remoteProjectQueries-BQzoY_Y9.js","assets/rolldown-runtime-hePW80VL.js","assets/runtime-switch-DEPKHgdL.js","assets/runtime-auth-DA-qfGHk.js","assets/runtime-fetch-V-iMWR8t.js","assets/reasoning-projection-client-BEhVknv9.js","assets/platform-B2ylz14u.js","assets/runtimeAPIRegistry-C2VogTny.js","assets/pathNormalization-ewtPqJWn.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-base-ui-wXsskyKm.js","assets/client-CmtAKi5B.js","assets/vendor-zustand-CTekDqaS.js","assets/vendor-opencode-client-BM2r1f0o.js","assets/vendor-effect-X1Hqc7ba.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/safeStorage-DTOhKN0V.js","assets/prompt-attachment-upload-BzYqZdzd.js","assets/runtime-file-resource-BGZ4tGr5.js","assets/vendor-react-BkccXcWz.js","assets/vendor-tanstack-query-core-BSjXNgF_.js","assets/vendor-tanstack-react-query-DIb_ItL-.js","assets/path-utils-jGozTg9d.js","assets/vendor-reactuses-core-DjKFMfz7.js","assets/vendor-lodash-es-BS45jPoZ.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/summaries-BQMyJaaw.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/runtime-file-store-BVRgEtI-.js","assets/navigation-CkCH8e3H.js","assets/ui-Pjq_Ygzo.js","assets/gitApiHttp-ZjM4HkSo.js","assets/useUIStore-68ZPpgYA.js","assets/useMobileHtmlPreviewStore-BYunNOBo.js","assets/uuid-D-SDZijH.js","assets/vendor-sonner-DX3nfJx4.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/i18n-Sh2Qk9nD.js","assets/runtime-ead7P81A.js","assets/bootstrap-eLlfzqAI.js","assets/store-BGuutgkJ.js","assets/tour-CMXP3Kif.js","assets/vendor-zod-DZzbCm1s.js","assets/vendor-opencode-schema-DWT45VBX.js","assets/input-store-CzG_3qFv.js","assets/toolHelpers-iEHVHQ9p.js","assets/useAssistantUIStore-BUWPTwNV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{r as t}from"./useUIStore-68ZPpgYA.js";import{Dt as n,Hi as r,f as i}from"./ui-Pjq_Ygzo.js";import{r as a,t as o}from"./sessionLookup-BtXyFcKe.js";var s=0;async function c(e){let t=o(e.trim());if(t)return{status:`found`,directory:t.directory};let n=await r(e);return n?{status:`found`,directory:n.directory}:{status:`not-found`}}async function l(r){let o=typeof r?.sessionId==`string`?r.sessionId.trim():``;if(!o)return;let c=typeof r.directory==`string`?r.directory.trim():``,l=++s,u=()=>l===s,d=r.probe===`unconfirmed`?`unresolved`:`not-found`;if(t.getState().setActiveMainTab(`chat`),r.probe===`ambiguous`){n(o,`unresolved`);return}let f=await a(o,{trySessionGet:!1});if(u()){if(f){i.getState().setCurrentSession(o,f.directory);return}if(!c){n(o,d);return}try{let[{supportsRemoteProjects:t,ensureRemoteHostCatalog:r},{resolveRemoteProjectOwner:i},{applyRemoteProjectRoute:a}]=await Promise.all([e(()=>import(`./remoteProjectQueries-BQzoY_Y9.js`).then(e=>e.l),__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])),e(()=>import(`./summaries-BQMyJaaw.js`).then(e=>e.i),__vite__mapDeps([27,1,8,9])),e(()=>import(`./navigation-CkCH8e3H.js`).then(e=>e.n),__vite__mapDeps([30,1,2,3,27,8,9,28,31,5,4,6,7,12,10,32,15,16,17,11,13,14,18,19,20,21,22,23,24,25,26,29,33,34,35,36,37,38,0,39,40,41,42,43,44,45,46,47,48]))]);if(!t()){n(o,d);return}let s=await r();if(!u())return;if(!s.supported){n(o,d);return}let l=[...new Set(s.projects.map(e=>e.hostId))].flatMap(e=>{let t=i(s.projects,s.hubId,e,c);return t?[t]:[]});if(l.length!==1){n(o,d);return}let[f]=l;await a({sessionId:o,directory:c,hostId:f.hostId,hubId:s.hubId,projectId:f.id,isNewSession:!1},u)}catch{u()&&n(o,d)}}}export{l as openSessionFromDeepLink,c as probeSessionLink};
|