zidane-gui 9.1.13 → 9.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/migrations/0002_browser_state.sql +18 -0
  2. package/out/main/chunks/{history-pager-B5iwhWqn.js → history-pager-DCty1YTu.js} +12 -23
  3. package/out/main/chunks/{remote-hosts-DmiOiwKi.js → remote-hosts-ZyXkwftF.js} +3 -3
  4. package/out/main/history-worker.js +1 -1
  5. package/out/main/index.js +1666 -729
  6. package/out/preload/index.mjs +20 -3
  7. package/out/renderer/assets/{43YPWK3Q-BVJpf1u1.js → 43YPWK3Q-DqQmzBPu.js} +6 -6
  8. package/out/renderer/assets/{45MVAN6X-BWuIeWOc.js → 45MVAN6X-CYP7xDN8.js} +5 -5
  9. package/out/renderer/assets/{46GJKBLZ-41BAHmt4.js → 46GJKBLZ-Co9yrG8W.js} +10 -10
  10. package/out/renderer/assets/{63WH7YNF-DuatnhlB.js → 63WH7YNF-JjkWKCFV.js} +8 -8
  11. package/out/renderer/assets/{6DDU7VKX-BAI-vKC1.js → 6DDU7VKX-BbtUMWO4.js} +6 -6
  12. package/out/renderer/assets/{CLQLV5VT-CmHu2HE3.js → CLQLV5VT-Ba6obVJu.js} +6 -6
  13. package/out/renderer/assets/{CUSPXG5M-DE3uzfbs.js → CUSPXG5M-BeHLB3vL.js} +6 -6
  14. package/out/renderer/assets/{CodeEditor-CIwCP1F_.js → CodeEditor-BaTPNKEc.js} +3 -3
  15. package/out/renderer/assets/{ComposerEditor-leA8S_Yk.js → ComposerEditor-C-40aCPQ.js} +2 -2
  16. package/out/renderer/assets/{D3L7O4X2-BZ4caDcX.js → D3L7O4X2-Bz5JjvM3.js} +4 -4
  17. package/out/renderer/assets/{D5TW5CPZ-BXdKc68h.js → D5TW5CPZ-COD7XA6N.js} +1 -1
  18. package/out/renderer/assets/{DiffsTab-CyRIVfQk.js → DiffsTab-BMAwuAR-.js} +5 -5
  19. package/out/renderer/assets/{EGADTWYV-Bf6Kicdv.js → EGADTWYV-DnX4xYm9.js} +5 -5
  20. package/out/renderer/assets/{EOJSJZXM-NAa-K4U0.js → EOJSJZXM-C1MKUH-z.js} +8 -8
  21. package/out/renderer/assets/{EditorWorkers-CY0St-9O.js → EditorWorkers-BgCbhgVz.js} +4 -4
  22. package/out/renderer/assets/{FilesTab-CnRw0KCN.js → FilesTab-BKwUG683.js} +36 -12
  23. package/out/renderer/assets/{G2OEIG6X-BarwxCkp.js → G2OEIG6X-Dtesfr7X.js} +5 -5
  24. package/out/renderer/assets/{GXJ2T77W-CyQVHlsG.js → GXJ2T77W-BkncFrMb.js} +6 -6
  25. package/out/renderer/assets/{HX3UMAK7-BcoG4mYG.js → HX3UMAK7-DyzWjT_c.js} +5 -5
  26. package/out/renderer/assets/{IU7WZTP6-kOLrUSwF.js → IU7WZTP6-C4qRhHoM.js} +1 -1
  27. package/out/renderer/assets/{J5J2NR2G-DE-SGCIz.js → J5J2NR2G-2GjekDt4.js} +4 -4
  28. package/out/renderer/assets/{JRCWTJEL-DZY5HKk0.js → JRCWTJEL-Dto8Fjzi.js} +3 -3
  29. package/out/renderer/assets/{KHUP5TOH-DevvG2jY.js → KHUP5TOH-DWatm9RV.js} +1 -1
  30. package/out/renderer/assets/{L74FQTH5-CnOj-zIY.js → L74FQTH5-YWQWDmAR.js} +4 -4
  31. package/out/renderer/assets/{LAV4ZXOS-BATWssHi.js → LAV4ZXOS-BDeemsOt.js} +6 -6
  32. package/out/renderer/assets/{LBIZYCRR-BXTsyX1O.js → LBIZYCRR-CuJZ9kCp.js} +7 -7
  33. package/out/renderer/assets/{LFFXNLRS-BpnXEoXM.js → LFFXNLRS-CYLYOq-d.js} +3 -3
  34. package/out/renderer/assets/{LLLWOAQD-BjLHR3Pk.js → LLLWOAQD-B6r0O-b8.js} +1 -1
  35. package/out/renderer/assets/{LTYQZ5U5-CDOIyknV.js → LTYQZ5U5-C6Vwu29l.js} +8 -8
  36. package/out/renderer/assets/{NDSCUZ25-Bl1idg0d.js → NDSCUZ25-D49aLwGZ.js} +2 -2
  37. package/out/renderer/assets/{NMN3IKWL-BYE2yrn3.js → NMN3IKWL-CmFbUlVt.js} +9 -9
  38. package/out/renderer/assets/{NMUA3R2D-Xl410xeQ.js → NMUA3R2D-BmYN27sp.js} +7 -7
  39. package/out/renderer/assets/{NY5A6PPW-CkzCXBsB.js → NY5A6PPW-CFmWX6Y1.js} +3 -3
  40. package/out/renderer/assets/{OHJ2EJXK-DCVoLmOH.js → OHJ2EJXK-BkSNlV9q.js} +1 -1
  41. package/out/renderer/assets/{OU2GIT2H-DG4LbVmY.js → OU2GIT2H-Df8P_VMV.js} +4 -4
  42. package/out/renderer/assets/{PDMLSE6I-Cr8MjczD.js → PDMLSE6I-B1fxTWPk.js} +2 -2
  43. package/out/renderer/assets/{PJ7X32S5-DFZu5Xsj.js → PJ7X32S5-jmIr_WuS.js} +5 -5
  44. package/out/renderer/assets/{RLLQ44NJ-D-LvBssh.js → RLLQ44NJ-Bk5ATCRc.js} +7 -7
  45. package/out/renderer/assets/{S6DWMCK5-BQEAXG2z.js → S6DWMCK5-ru17f61y.js} +8 -8
  46. package/out/renderer/assets/{STIOTUT7-jszPNHGr.js → STIOTUT7-D3W8oemx.js} +6 -6
  47. package/out/renderer/assets/{SXSLPWUD-CEMEDuKR.js → SXSLPWUD-BP8ObIM3.js} +2 -2
  48. package/out/renderer/assets/{TR4WJQGX-8wGWCKKm.js → TR4WJQGX-DwQDLHm2.js} +1 -1
  49. package/out/renderer/assets/{UWRPUF3N-ONJaPLUk.js → UWRPUF3N-BefBSoyh.js} +1 -1
  50. package/out/renderer/assets/{VSWIZJ7B-DbkRTlJD.js → VSWIZJ7B-QwUQICP_.js} +1 -1
  51. package/out/renderer/assets/{WM7NR6YK-CFy2rge0.js → WM7NR6YK-CRccSJmx.js} +4 -4
  52. package/out/renderer/assets/{WXKV2YEK-BFHYSpQF.js → WXKV2YEK-AiJtxeS-.js} +3 -3
  53. package/out/renderer/assets/{XLHPVVFU-BJFPh1Rn.js → XLHPVVFU-CISC9r_V.js} +1 -1
  54. package/out/renderer/assets/{YNX532HU-3QqofRh5.js → YNX532HU-CY_1HOiG.js} +5 -5
  55. package/out/renderer/assets/{YUPSMAUO-COLbQro8.js → YUPSMAUO-Cv2Ryk3Q.js} +1 -1
  56. package/out/renderer/assets/{ZFRCZTLK-BuPbgRNC.js → ZFRCZTLK-xOx-Cqik.js} +6 -6
  57. package/out/renderer/assets/{ZZDR4CN3-Do4onAxu.js → ZZDR4CN3-CDsCY6PX.js} +4 -4
  58. package/out/renderer/assets/{core-T80gwwf3.js → core-Cst33ux7.js} +2942 -2524
  59. package/out/renderer/assets/{file-tabs-DWQZlQfx.js → file-tabs-CUVbBbPB.js} +5 -5
  60. package/out/renderer/assets/{ghostty-web-DXNGAB4P.js → ghostty-web-DsF2lzXq.js} +1 -1
  61. package/out/renderer/assets/{highlights-Yvd7kpJw.js → highlights-BWQ-BGwF.js} +3 -3
  62. package/out/renderer/assets/{highlights-B0vcJ7-n.js → highlights-D9DV-gLr.js} +2 -2
  63. package/out/renderer/assets/{index-CsOxRbAw.css → index-C5y0Nb6N.css} +16 -1
  64. package/out/renderer/assets/{index-BbyDWT39.js → index-CPbTfv_f.js} +435 -351
  65. package/out/renderer/assets/{kit-DgkO1_s6.js → kit-BpS6VboD.js} +3240 -1662
  66. package/out/renderer/assets/{langs-7bXaMxtL.js → langs-CC8eNbvY.js} +1 -1
  67. package/out/renderer/assets/{lazy-DE7xn_YD.js → lazy-DtE8TmIe.js} +3 -3
  68. package/out/renderer/assets/{loader-CdKsI-e2.js → loader-BWgWjzVT.js} +1 -1
  69. package/out/renderer/assets/{pierre-theme-BouAfjrk.js → pierre-theme-DkKyEYzW.js} +7 -7
  70. package/out/renderer/assets/{shiki-CIKuDsHH.js → shiki-CahOMWmD.js} +3 -3
  71. package/out/renderer/assets/{stream-tokenizer-JLLsdqkH.js → stream-tokenizer-CtslDDLQ.js} +1 -1
  72. package/out/renderer/assets/{themes-mM7Qtyxf.js → themes-BVPDzAaq.js} +2 -2
  73. package/out/renderer/assets/{useDetachCleanup-1PVBQ1U4.js → useDetachCleanup-CSuE-TQs.js} +2 -2
  74. package/out/renderer/assets/{useFolderChanges-_vflCTEj.js → useFolderChanges-Cqx0tE4p.js} +3 -3
  75. package/out/renderer/index.html +4 -4
  76. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./file-tabs-DWQZlQfx.js","./vendor-react-bPTwWURR.js","./EditorWorkers-CY0St-9O.js","./pierre-theme-BouAfjrk.js","./core-T80gwwf3.js","./vendor-BpwX-s_O.js","./vendor-D_E2rLzO.css","./kit-DgkO1_s6.js","./vendor-motion-BgQeucLF.js","./vendor-editor-Cx3SvGyZ.js"])))=>i.map(i=>d[i]);
2
- import { cI as LOCAL_HOST_KEY, e9 as sessionKey$1, cA as parseSessionKey$1, ea as LOCAL_HOST_NAME, n as DEFAULT_SETTINGS, eb as ARTIFACT_BADGES_MAX, ec as spacesEnabled, ed as ARTIFACTS_PANEL_ID, ee as buildPanelCatalog, ef as MEDIA_BY_EXTENSION, eg as USAGE_BLOCK_ID, br as CONNECTORS, bs as connectorInstalled, b5 as nativeExtensionByName, eh as nativeExtensionSource, dB as connectorById, ei as connectorServerConfig, ej as machineWaiting, ek as SIDE_PANEL_ID, el as normalizeBrowserUrl, aZ as INBOX_PANEL_ID, _ as __vitePreload, em as BROWSER_PANEL_ID, aY as REMINDERS_PANEL_ID, d9 as SECRETS_PANEL_ID, aW as QUEUE_PANEL_ID, d2 as TERMINAL_PANEL_ID, a2 as FILES_PANEL_ID, a1 as DIFFS_PANEL_ID, aG as resolveSessionSpace, ay as parseMachineKind, cz as accentColor, bJ as DEFAULT_MODEL_PICK, en as decisionsEnabled, eo as countNeighbors, ep as selectableTurnIds, G as GITHUB_PULL_PROVIDER_ID, H as GITHUB_ISSUE_PROVIDER_ID, I as githubRefKey, eq as runBlockOnHost, cH as parseRepoInput } from "./core-T80gwwf3.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./file-tabs-CUVbBbPB.js","./vendor-react-bPTwWURR.js","./EditorWorkers-BgCbhgVz.js","./pierre-theme-DkKyEYzW.js","./core-Cst33ux7.js","./vendor-BpwX-s_O.js","./vendor-D_E2rLzO.css","./kit-BpS6VboD.js","./vendor-motion-BgQeucLF.js","./vendor-editor-Cx3SvGyZ.js"])))=>i.map(i=>d[i]);
2
+ import { cr as LOCAL_HOST_KEY, ei as sessionKey$1, cH as parseSessionKey$1, ej as LOCAL_HOST_NAME, n as DEFAULT_SETTINGS, ek as ARTIFACT_BADGES_MAX, el as spacesEnabled, em as ARTIFACTS_PANEL_ID, en as buildPanelCatalog, eo as MEDIA_BY_EXTENSION, ep as USAGE_BLOCK_ID, bw as CONNECTORS, bx as connectorInstalled, ba as nativeExtensionByName, eq as nativeExtensionSource, dK as connectorById, er as connectorServerConfig, es as samePlace, et as machineKind, eu as machineWaiting, ev as SIDE_PANEL_ID, ew as normalizeBrowserUrl, ex as BROWSER_DEVICES, ey as responsiveDevice, ez as clampDeviceSize, b2 as INBOX_PANEL_ID, _ as __vitePreload, eA as BROWSER_PANEL_ID, b1 as REMINDERS_PANEL_ID, dj as SECRETS_PANEL_ID, a$ as QUEUE_PANEL_ID, db as TERMINAL_PANEL_ID, a2 as FILES_PANEL_ID, a1 as DIFFS_PANEL_ID, aK as resolveSessionSpace, aC as parseMachineKind, cG as accentColor, cs as readNewChatPlace, bO as DEFAULT_MODEL_PICK, eB as decisionsEnabled, eC as countNeighbors, eD as selectableTurnIds, G as GITHUB_PULL_PROVIDER_ID, H as GITHUB_ISSUE_PROVIDER_ID, I as githubRefKey, eE as runBlockOnHost, aX as createRecentChanges, cO as parseRepoInput } from "./core-Cst33ux7.js";
3
3
  import { r as reactExports, j as jsxRuntimeExports, e as ReactDomClient, f as ReactDom, h as ReactJsxRuntime, R as React, i as ReactDOM, c as React$1 } from "./vendor-react-bPTwWURR.js";
4
4
  import "./vendor-BpwX-s_O.js";
5
- import { ak as createResourceStore, al as useResource, am as readableResource, an as writable, ao as keyedSettingsResources, ap as createSettingsResource, aq as toSettingsError, ar as settingsMcpServerOf, as as createPresenceStore, at as createOnlineMachines, au as createMachineLists, av as lazyReadable, aw as createHostSyncReads, ax as useSettingsHost, ay as SettingsProvider$1, az as useSettings, aj as useReadable, aA as PathDisplayProvider, aB as MachinesProvider, aC as createLayoutMemory, aD as useScopeLayout$1, aE as createDraftScopeStore, aF as draftScopeOf, aG as createRunMeter, aH as createSessionBadges, aI as createSessionActivity, aJ as createRunEstimates, aK as createCompactionProgress, aL as createTerminalStore, aM as usePeekSessionEvents, aN as useSessionStreamActions, aO as useIsSessionHydrated, aP as useSessionEvents$1, aQ as useSessionEventsSelector$1, aR as createSessionStreams, aS as SessionStreamsProvider, aT as RunEstimatesProvider, aU as useSessionStreams$1, aV as usePeekRunSeq$1, aW as usePeekSessionRunning, aX as useSessionRunning, aY as createSessionHistory, aZ as createSidebarViews, a_ as createSessionDirectory, a$ as useSessionDirectoryView, b0 as useNewSessionDefaults, b1 as writePersisted, b2 as DEFAULT_SIDEBAR_LABELS, b3 as useCaptureRunState, b4 as pinnedSessions, b5 as useCycleAgent$1, b6 as createPanelFocusStore, b7 as pickTab, b8 as useWorkspaceView, b9 as useWorkspaceRequests, ba as useWorkspaceContent, bb as useExtensionPanels, bc as WorkspaceHostProvider, bd as WorkspaceProvider, be as useWorkspaceActions, bf as createSidebarCollapsed, ai as useAppearanceState, bg as LayoutBudgetProvider, bh as LIMITS, bi as useTurnCommands, bj as useTurnMenu$1, bk as createOpenTarget, bl as CommandScopeContext, bm as findCommand, bn as hasInteractionBody, bo as InteractionToolBody, bp as InlineChipText, bq as ProseMarkdown, br as useTranscriptActions, bs as PromptEcho, bt as createModelPickerPrefs, bu as ComposerHostProvider$1, bv as modelNamesOf, bw as useSelectTurn, bx as useTranscriptOptions, by as useSessionRetry, bz as pushComposerPrompt, bA as MarkdownContext, bB as TranscriptRenderersProvider, bC as TranscriptActionsProvider, bD as PathDisplayScope, bE as Transcript, bF as TranscriptSearch$1, bG as useSessionPresence$1, bH as usePresenceMap$1, bI as createSidebarLive, bJ as useSessionApprovalHead, bK as useInteractionHead, bL as useRunElapsedSec, bM as ZidaneUiExtensionsKit, bN as ZidaneUiExtensions, bO as EXTENSION_TOKENS, bP as ExtensionsHostError, bQ as createUiEffectChannel, bR as createDialogQueue, bS as sidebarContributionsOf, bT as ExtensionsProvider, bU as useProjectIcons, bV as useConfirmDeleteSession, bW as useMoveSession, bX as basename, bY as useSessionMenuItems, bZ as SessionListRow, b_ as moveSubject, b$ as useWorkspaceHost, c0 as useLinkRouter, c1 as useStartFromPanel, c2 as PanelSessionRowProvider, c3 as ProjectHome, c4 as ProjectIconGlyph, c5 as WelcomeScreen$1, c6 as modelKnobsOf, c7 as commitModelPick$1, c8 as createStorageBoot, c9 as createStorageAppearancePrefs, ca as codeThemeTypeOf, cb as constant, cc as EFFORT_LEVELS, cd as BUILTIN_THEMES, ce as useModal, cf as useAppearance, cg as OnboardingProvider, ch as OnboardingFlow, ci as createSiteIcons, cj as useEnvironmentChoices, ck as BranchMenu$1, cl as GitBar$1, cm as createKeybindingOverrides, cn as useSessionFallbackModel, co as getMergedKeybindings, K as KeyHint, cp as ComposerStatusPills, cq as ComposerControls, cr as RetryPill, cs as useLayoutBudgetOptional, ct as ConversationBadges$1, cu as hostReachable, cv as useLentServers, cw as ServerOfflineBanner, cx as ArchivedBanner, cy as HostRemovedBanner, cz as ComposerNotice, cA as ConnectProviderCard, cB as ComposerDock, cC as SelectTurnHint, cD as ApprovalDock, cE as ErrorBoundary, cF as RichComposer, cG as codeAttachmentLabel, cH as WherePicker, cI as RemoteFolderPicker, cJ as ServerScopeToggle, cK as ScopeToggle, cL as MachineWaitingBanner, U as Tooltip, V as IconButton, cM as useSidebarHost, cN as useSidebarLabels, cO as useEnvironmentCommands, cP as useEnvironmentActions, cQ as sessionMenuItems, cR as useReferenceMatches, cS as SessionHeader$1, cT as HostStatusDot, cU as ReferenceText, cV as useComposerSearch$1, cW as createSideRequests, cX as DEFAULT_SESSION_LABELS, cY as useSendPrompt$1, cZ as useSessionHost, c_ as useSessionPage, c$ as useTranscriptScroll$1, d0 as useSessionMeters, d1 as useDraftTarget, d2 as pushComposerDraft, d3 as useSettledReveal, d4 as LoadEarlierRow, d5 as SearchHighlightStyle, d6 as ArtifactsPanel$1, d7 as BTN_SECONDARY, d8 as BTN_PRIMARY, b as pushComposerAttachment, c as textAttachment, d9 as focusComposer, n as usePanelVisible, da as subscribeLayoutAnimating, db as isLayoutAnimating, dc as useSiteIcon, dd as useKeybindings, de as usePaletteSource, df as NavButton, dg as AddressBar, dh as Popover, di as SectionLabel, dj as MenuRow, dk as Menu, dl as MenuSection, dm as MenuSeparator, dn as relativeTime, R as RowActionsMenu, dp as useInboxPlans, dq as InboxPanel, dr as RecentPlans, ds as PlanTracker, dt as attachmentLightboxItems, du as AttachmentRow, dv as QueueTab$1, dw as SideChat, dx as HostModelPicker, dy as HostModelOptionsPicker, dz as TerminalPanelTab, dA as RemindersPanel, dB as SecretsPanel, dC as PanelContentView, dD as useLayoutBudget, dE as panelCornerWidth, dF as PanelCorner, dG as countArtifacts, dH as useSessionArtifacts, dI as splitPanelWidth, dJ as SidePanel$1, dK as TAB_REGION_PROPS, dL as panelDragResult, dM as TerminalDrawer, dN as SidebarFooter, dO as SidebarSignInPrompt, dP as DaemonMenu, dQ as useProviderUsage, dR as SidebarUsageIndicator, dS as useCompactionProgress, dT as Presence, dU as SidebarCompactingIndicator, dV as useProjectSessionActions, dW as focusComposerWhenReady, dX as SpaceSwitcher, dY as SessionSidebar, dZ as useSaveViewAsSpace, d_ as SidebarFilterMenu, d$ as ExtensionSlot, e0 as CreateExtensionDialog, e1 as useTerminalsEnabled, e2 as useTerminalStore, e3 as useScopeTerminals, e4 as RunningWorkDialog, e5 as renderSessionModalShell, e6 as useAgentProfiles$1, e7 as useConfirm, e8 as useSessionCacheReport, e9 as useColors, ea as useDisplayPath, eb as compactPath, ec as SessionDetailsDialog, ed as renderWideSessionModalShell, ee as SessionCacheFacts, ef as deleteSessionPrompt, eg as BTN_LG_SECONDARY, eh as SettingsTutorial, ei as McpSection, ej as ServerProvidersSection, ek as ProvidersSection, el as ExtensionsSection, em as SkillsSection, en as InstructionsSection, eo as KeybindingsSection, ep as EditorSection, eq as AppearanceSection, er as HostCatalogSection, es as ExtensionSettingsSection, et as PluginsSection, eu as PerformanceSection, ev as LogsSection, ew as EnvironmentsSection, ex as HostsSection, ey as ROW_BUTTON_CLASS, ez as RowText, eA as useSettingsSection, eB as useServerSyncStatus, eC as agentDefaultsOf, eD as SettingsRowsPage, eE as SpacesDefaultsSection, eF as ConversationPresetsRow, eG as CompactionModelRow, eH as DecisionModelRow, eI as TextModelRow, eJ as AgentDefaultsRows, eK as SyncMarker, eL as ApprovalModeRow, eM as agentDefaultsPatch, eN as settingsPageCounts, eO as listLength, eP as KEYBINDING_ROW_COUNT, eQ as SegmentSpinner, eR as SettingsHostSwitcher, eS as ScreenShell, eT as visiblePages, eU as useExtensionSettingsSections, eV as layoutSections, eW as SettingsHeadingText, eX as SettingsShell, eY as UsagePanel, eZ as TurnDetailsDialog, e_ as usePanelGroupHandlers$1, e$ as InboxAttention$1, f0 as QueueAttention$1, f1 as SecretsAttention$1, f2 as PerformanceHud, f3 as DEFAULT_EDITOR, f4 as EDITOR_STORAGE_KEY, f5 as parseEditor, f6 as createPaletteRows, f7 as usePaletteHost, f8 as usePaletteLabels, f9 as useSessionRank, fa as sessionsSource, fb as conversationsSource, fc as useActionsPaletteSource, fd as panelsSource, fe as spacesSource, ff as commandsSource, fg as useImportRepo, fh as repoSource, fi as filesSource, fj as settingsSource, fk as prefsSource, fl as extensionsSource, fm as setupSource, fn as usePaletteModalSlot, fo as panelTabMark, fp as PaletteDialog, fq as pushComposerInsert, fr as useExtensionEffects, fs as ExtensionDialogHost, ft as matchesBinding, fu as registerTabScope, fv as serializeTerminalExcerpt, fw as hasComposerFor, fx as TerminalProvider, fy as ModalProvider, fz as KeyCommandsProvider, fA as useSessionContextStatus, fB as useProviderReadyPoll, fC as useClaudeImportAvailable, fD as AgentPickerDialog, fE as effortPickerTarget, fF as EffortPickerDialog, fG as createSessionActions, fH as useHelpKey, fI as useTranscriptFind, fJ as ModelPickerDialog, fK as usePaletteActions, fL as useWorkspaceKeyCommands, fM as useMainSession, fN as useSelectTurnKeys, fO as zoomKeyCommands, fP as sessionKeyCommands, fQ as useKeyCommands, fR as ClaudeImportDialog, fS as SafelistPanel, fT as ModalShell, fU as SidebarToggleButton, fV as accountsKeyFocusId, fW as accountsFocusId, fX as hostSettingsFocus, fY as createPendingApprovals, fZ as createSafelist, f_ as ApprovalsProvider, f$ as createRunningWorkState, g0 as createSchedulesState, g1 as createSecretsState, g2 as createArtifactsState, g3 as createQueueState, g4 as createPlansState, g5 as SessionProvider, g6 as ProviderUsageProvider, g7 as FilesProvider, g8 as createChatBlockRuns, g9 as wireOriginal, ga as ChatProvider, gb as useHasFocusedComposer, gc as hasFocusedComposer, d as pushComposerMention, gd as OpenSessionContext, ge as BadgeMenuProvider, gf as createStorageRecents, gg as PaletteProvider, gh as WorkerWrapper, gi as LabelsProvider, gj as PromptHistoryProvider, gk as SelectTurnProvider, gl as KeybindingsProvider, gm as GitProvider, gn as SidebarHostProvider, go as useShikiTheme, T as useEditorPrefs, gp as CodeHighlightProvider, gq as CodeWrapProvider, gr as createCodeHighlighter, gs as WorkerWrapper$1, gt as AppearanceProvider, gu as EditorEnvironmentRoot, gv as configureErrorReports, gw as installRendererErrorHandlers, gx as watchRuntimeIcons, gy as reportRendererError, G as buttonClass, gz as readMotionMs, gA as crispPhosphor } from "./kit-DgkO1_s6.js";
5
+ import { al as createResourceStore, am as useResource, an as readableResource, ao as writable, ap as keyedSettingsResources, aq as createSettingsResource, ar as toSettingsError, as as settingsMcpServerOf, at as createPresenceStore, au as createOnlineMachines, av as createMachineLists, aw as lazyReadable, ax as createHostSyncReads, ay as useSettingsHost, az as SettingsProvider$1, aA as useSettings, ak as useReadable, aB as PathDisplayProvider, aC as MachinesProvider, aD as createLayoutMemory, aE as useScopeLayout$1, aF as createDraftScopeStore, aG as draftScopeOf, aH as createRunMeter, aI as createSessionBadges, aJ as createSessionActivity, aK as createRunEstimates, aL as createCompactionProgress, aM as createTerminalStore, aN as projectPathOf, aO as environmentMachineName, aP as usePeekSessionEvents, aQ as useSessionStreamActions, aR as useIsSessionHydrated, aS as useSessionEvents$1, aT as useSessionEventsSelector$1, aU as createSessionStreams, aV as SessionStreamsProvider, aW as RunEstimatesProvider, aX as useSessionStreams$1, aY as usePeekRunSeq$1, aZ as usePeekSessionRunning, a_ as useSessionRunning, a$ as createSessionHistory, b0 as useNotify, b1 as createSidebarViews, b2 as createSessionDirectory, b3 as useSessionDirectoryView, b4 as useNewSessionDefaults, b5 as writePersisted, b6 as DEFAULT_SIDEBAR_LABELS, b7 as useCaptureRunState, b8 as pinnedSessions, b9 as useCycleAgent$1, ba as createPanelFocusStore, bb as pickTab, bc as useWorkspaceView, bd as useWorkspaceRequests, be as useWorkspaceContent, bf as useExtensionPanels, bg as WorkspaceHostProvider, bh as WorkspaceProvider, bi as useWorkspaceActions, bj as createSidebarCollapsed, aj as useAppearanceState, bk as LayoutBudgetProvider, bl as LIMITS, bm as useTurnCommands, bn as useTurnMenu$1, bo as createOpenTarget, bp as CommandScopeContext, bq as findCommand, br as hasInteractionBody, bs as InteractionToolBody, bt as InlineChipText, bu as ProseMarkdown, bv as useTranscriptActions, bw as PromptEcho, bx as createModelPickerPrefs, by as ComposerHostProvider$1, bz as modelNamesOf, bA as useSelectTurn, bB as useTranscriptOptions, bC as useSessionRetry, bD as pushComposerPrompt, bE as MarkdownContext, bF as TranscriptRenderersProvider, bG as TranscriptActionsProvider, bH as PathDisplayScope, bI as Transcript, bJ as TranscriptSearch$1, bK as useSessionPresence$1, bL as usePresenceMap$1, bM as createSidebarLive, bN as useSessionApprovalHead, bO as useInteractionHead, bP as useRunElapsedSec, bQ as ZidaneUiExtensionsKit, bR as ZidaneUiExtensions, bS as EXTENSION_TOKENS, bT as ExtensionsHostError, bU as createUiEffectChannel, bV as createDialogQueue, bW as sidebarContributionsOf, bX as ExtensionsProvider, bY as useProjectIcons, bZ as useConfirmDeleteSession, b_ as useMoveSession, b$ as basename, c0 as useSessionMenuItems, c1 as SessionListRow, c2 as moveSubject, c3 as useWorkspaceHost, c4 as useLinkRouter, c5 as useStartFromPanel, c6 as PanelSessionRowProvider, c7 as ProjectHome, c8 as ProjectIconGlyph, c9 as WelcomeScreen$1, ca as modelKnobsOf, cb as commitModelPick$1, cc as createStorageBoot, cd as createStorageAppearancePrefs, ce as codeThemeTypeOf, cf as constant, cg as EFFORT_LEVELS, ch as BUILTIN_THEMES, ci as useModal, cj as useAppearance, ck as OnboardingProvider, cl as OnboardingFlow, cm as createSiteIcons, cn as useEnvironmentChoices, co as BranchMenu$1, cp as GitBar$1, cq as createKeybindingOverrides, cr as useSessionFallbackModel, cs as getMergedKeybindings, K as KeyHint, ct as ComposerStatusPills, cu as ComposerControls, cv as RetryPill, cw as useLayoutBudgetOptional, cx as ConversationBadges$1, cy as hostReachable, cz as useLentServers, cA as useServerMachines, cB as useAddMachine, cC as ServerOfflineBanner, cD as ArchivedBanner, cE as HostRemovedBanner, cF as DraftPlaceNotice, cG as ComposerNotice, cH as ConnectProviderCard, cI as ComposerDock, cJ as SelectTurnHint, cK as ApprovalDock, cL as ErrorBoundary, cM as RichComposer, cN as codeAttachmentLabel, cO as WherePicker, cP as RemoteFolderPicker, cQ as ServerScopeToggle, cR as ScopeToggle, cS as MachineWaitingBanner, U as Tooltip, V as IconButton, cT as useSidebarHost, cU as useSidebarLabels, cV as useSidebarNotice, cW as useEnvironmentCommands, cX as useEnvironmentActions, cY as sessionMenuItems, cZ as errorMessage, c_ as useReferenceMatches, c$ as SessionHeader$1, d0 as HostStatusDot, d1 as ReferenceText, d2 as useComposerSearch$1, d3 as createSideRequests, d4 as DEFAULT_SESSION_LABELS, d5 as useSendPrompt$1, d6 as useSessionHost, d7 as useSessionPage, d8 as useTranscriptScroll$1, d9 as useSessionMeters, da as useDraftTarget, db as pushComposerDraft, dc as useSettledReveal, dd as LoadEarlierRow, de as SearchHighlightStyle, df as ArtifactsPanel$1, dg as BTN_SECONDARY, dh as BTN_PRIMARY, b as pushComposerAttachment, c as textAttachment, di as focusComposer, n as usePanelVisible, dj as subscribeLayoutAnimating, dk as isLayoutAnimating, dl as useSiteIcon, dm as useKeybindings, dn as usePaletteSource, dp as NavButton, dq as AddressBar, dr as Popover, ds as SectionLabel, dt as MenuRow, du as Menu, dv as MenuSection, dw as MenuSeparator, dx as relativeTime, R as RowActionsMenu, dy as useInboxPlans, dz as InboxPanel, dA as RecentPlans, dB as PlanTracker, dC as attachmentLightboxItems, dD as AttachmentRow, dE as QueueTab$1, dF as SideChat, dG as HostModelPicker, dH as HostModelOptionsPicker, dI as TerminalPanelTab, dJ as RemindersPanel, dK as SecretsPanel, dL as PanelContentView, dM as useLayoutBudget, dN as panelCornerWidth, dO as PanelCorner, dP as countArtifacts, dQ as useSessionArtifacts, dR as splitPanelWidth, dS as SidePanel$1, dT as TAB_REGION_PROPS, dU as panelDragResult, dV as TerminalDrawer, dW as SidebarFooter, dX as SidebarSignInPrompt, a8 as useOptionalConfirm, dY as DaemonMenu, dZ as useProviderUsage, d_ as SidebarUsageIndicator, d$ as useCompactionProgress, e0 as Presence, e1 as SidebarCompactingIndicator, e2 as useProjectSessionActions, e3 as focusComposerWhenReady, e4 as SpaceSwitcher, e5 as SessionSidebar, e6 as useSaveViewAsSpace, e7 as SidebarFilterMenu, e8 as ExtensionSlot, e9 as CreateExtensionDialog, ea as useTerminalsEnabled, eb as useTerminalStore, ec as useScopeTerminals, ed as RunningWorkDialog, ee as renderSessionModalShell, ef as useAgentProfiles$1, eg as useConfirm, eh as useSessionCacheReport, ei as useColors, ej as useDisplayPath, ek as compactPath, el as SessionDetailsDialog, em as renderWideSessionModalShell, en as SessionCacheFacts, eo as deleteSessionPrompt, ep as BTN_LG_SECONDARY, eq as SettingsTutorial, er as McpSection, es as ServerProvidersSection, et as ProvidersSection, eu as ExtensionsSection, ev as SkillsSection, ew as InstructionsSection, ex as KeybindingsSection, ey as EditorSection, ez as AppearanceSection, eA as HostCatalogSection, eB as ExtensionSettingsSection, eC as PluginsSection, eD as PerformanceSection, eE as LogsSection, eF as EnvironmentsSection, eG as HostsSection, eH as ROW_BUTTON_CLASS, eI as RowText, eJ as useSettingsSection, eK as useServerSyncStatus, eL as agentDefaultsOf, eM as SettingsRowsPage, eN as SpacesDefaultsSection, eO as ConversationPresetsRow, eP as CompactionModelRow, eQ as DecisionModelRow, eR as TextModelRow, eS as AgentDefaultsRows, eT as NewChatPlaceRow, eU as SyncMarker, eV as ApprovalModeRow, eW as agentDefaultsPatch, eX as settingsPageCounts, eY as listLength, eZ as KEYBINDING_ROW_COUNT, e_ as SegmentSpinner, e$ as SettingsHostSwitcher, f0 as ScreenShell, a7 as Notice, f1 as visiblePages, f2 as useExtensionSettingsSections, f3 as layoutSections, f4 as SettingsHeadingText, f5 as SettingsShell, f6 as UsagePanel, f7 as TurnDetailsDialog, f8 as usePanelGroupHandlers$1, f9 as InboxAttention$1, fa as QueueAttention$1, fb as SecretsAttention$1, fc as PerformanceHud, fd as DEFAULT_EDITOR, fe as EDITOR_STORAGE_KEY, ff as parseEditor, fg as createPaletteRows, fh as usePaletteHost, fi as usePaletteLabels, fj as useSessionRank, fk as sessionsSource, fl as conversationsSource, fm as useActionsPaletteSource, fn as panelsSource, fo as spacesSource, fp as commandsSource, fq as useImportRepo, fr as repoSource, fs as filesSource, ft as settingsSource, fu as prefsSource, fv as extensionsSource, fw as setupSource, fx as usePaletteModalSlot, fy as panelTabMark, fz as PaletteDialog, fA as pushComposerInsert, fB as useExtensionEffects, fC as ExtensionDialogHost, fD as matchesBinding, fE as registerTabScope, fF as serializeTerminalExcerpt, fG as hasComposerFor, fH as TerminalProvider, fI as ModalProvider, fJ as KeyCommandsProvider, fK as useSessionContextStatus, fL as useProviderReadyPoll, fM as useClaudeImportAvailable, fN as AgentPickerDialog, fO as effortPickerTarget, fP as EffortPickerDialog, fQ as createSessionActions, fR as useHelpKey, fS as useTranscriptFind, fT as ModelPickerDialog, fU as usePaletteActions, fV as useWorkspaceKeyCommands, fW as useMainSession, fX as useSelectTurnKeys, fY as zoomKeyCommands, fZ as sessionKeyCommands, f_ as useKeyCommands, f$ as ClaudeImportDialog, g0 as SafelistPanel, g1 as ModalShell, g2 as SidebarToggleButton, g3 as accountsKeyFocusId, g4 as accountsFocusId, g5 as hostSettingsFocus, g6 as createPendingApprovals, g7 as createSafelist, g8 as ApprovalsProvider, g9 as createRunningWorkState, ga as createSchedulesState, gb as createSecretsState, gc as createArtifactsState, gd as createQueueState, ge as createPlansState, gf as SessionProvider, gg as ProviderUsageProvider, gh as FilesProvider, gi as createChatBlockRuns, gj as wireOriginal, gk as ChatProvider, gl as useHasFocusedComposer, gm as hasFocusedComposer, d as pushComposerMention, gn as OpenSessionContext, go as BadgeMenuProvider, gp as createStorageRecents, gq as PaletteProvider, gr as WorkerWrapper, gs as LabelsProvider, gt as NoticeStackProvider, gu as PromptHistoryProvider, gv as SelectTurnProvider, gw as KeybindingsProvider, gx as GitProvider, gy as SidebarHostProvider, gz as useShikiTheme, T as useEditorPrefs, gA as CodeHighlightProvider, gB as CodeWrapProvider, gC as createCodeHighlighter, gD as WorkerWrapper$1, gE as AppearanceProvider, gF as EditorEnvironmentRoot, gG as configureErrorReports, gH as installRendererErrorHandlers, gI as watchRuntimeIcons, gJ as reportRendererError, G as buttonClass, gK as readMotionMs, gL as crispPhosphor } from "./kit-BpS6VboD.js";
6
6
  import "./vendor-motion-BgQeucLF.js";
7
7
  import "./vendor-editor-Cx3SvGyZ.js";
8
8
  const LOCAL_SESSION_HOST = LOCAL_HOST_KEY;
@@ -784,8 +784,9 @@ function createElectronMachinesHost(api) {
784
784
  if (result.ok) linksSink?.set(result.links);
785
785
  return result;
786
786
  };
787
- const { oauth } = api;
787
+ const { oauth, tokens } = api;
788
788
  const makeInvite = api.machines?.invite;
789
+ const onJoin = api.machines?.onJoin;
789
790
  return {
790
791
  hosts,
791
792
  refreshHosts,
@@ -805,21 +806,41 @@ function createElectronMachinesHost(api) {
805
806
  machines: {
806
807
  list: createMachineLists(
807
808
  (hostId) => api.machines.list(hostId),
808
- (onChange) => api.machines.onStatus((change) => onChange(change.hostId))
809
+ (onChange) => {
810
+ const offStatus = api.machines.onStatus((change) => onChange(change.hostId));
811
+ const offChanged = api.machines.onChanged?.((change) => onChange(change.hostId)) ?? noop;
812
+ const connected = /* @__PURE__ */ new Set();
813
+ const offHosts = (api.hosts.onStatus ?? (() => noop))((state2) => {
814
+ for (const host2 of state2.hosts) {
815
+ if (host2.kind !== "server") continue;
816
+ if (host2.status !== "connected") connected.delete(host2.id);
817
+ else if (!connected.has(host2.id)) {
818
+ connected.add(host2.id);
819
+ onChange(host2.id);
820
+ }
821
+ }
822
+ });
823
+ return () => {
824
+ offStatus();
825
+ offChanged();
826
+ offHosts();
827
+ };
828
+ }
809
829
  ),
810
830
  online: createOnlineMachines((onChange) => api.machines.onStatus(onChange)),
811
831
  forget: async (hostId, machineId) => {
812
832
  await api.machines.forget(hostId, machineId).catch(rejected("forget"));
813
833
  },
834
+ ...onJoin ? {
835
+ onJoin: (hostId, listener) => onJoin(({ hostId: from, ...event }) => {
836
+ if (from === hostId) listener(event);
837
+ })
838
+ } : {},
814
839
  ...makeInvite ? {
815
840
  invite: async (hostId, options) => {
816
841
  const result = await makeInvite(hostId, options?.name).catch(rejected("invite"));
817
842
  if (result.ok) return result.invite;
818
- throw {
819
- kind: "invite",
820
- detail: result.message,
821
- ...result.forbidden ? { forbidden: true } : {}
822
- };
843
+ throw { kind: "invite", detail: result.message };
823
844
  }
824
845
  } : {}
825
846
  },
@@ -830,7 +851,19 @@ function createElectronMachinesHost(api) {
830
851
  shareStop: (hostId) => linked(api.machines.shareStop(hostId)),
831
852
  useServer: (hostId, enabled) => linked(api.machines.useServer(hostId, enabled))
832
853
  },
854
+ ...tokens ? {
855
+ tokens: {
856
+ list: (hostId) => tokens.tokensList(hostId).catch(rejected("tokens")),
857
+ create: (hostId, name) => tokens.tokenCreate(hostId, name).catch(rejected("tokens")),
858
+ revoke: (hostId, id) => tokens.tokenRevoke(hostId, id).catch(rejected("tokens")),
859
+ pair: (hostId) => tokens.pairBrowser(hostId).catch(rejected("tokens")),
860
+ onChanged: (hostId, listener) => tokens.onTokensChanged((event) => {
861
+ if (event.hostId === hostId) listener();
862
+ })
863
+ }
864
+ } : {},
833
865
  pickFolder: () => api.folder.pick(),
866
+ ...api.newChat ? { newChat: api.newChat } : {},
834
867
  capabilities: (hostId, opts) => api.hosts.capabilities(hostId, opts?.refresh === true).catch(rejected("read")),
835
868
  installTool: (hostId, name) => api.hosts.installTool(hostId, name).catch(rejected("install")),
836
869
  updates: {
@@ -874,6 +907,10 @@ function createElectronMachinesHost(api) {
874
907
  };
875
908
  }
876
909
  const noop = () => void 0;
910
+ let newChatHandler = null;
911
+ function setMachinesNewChat(handler) {
912
+ newChatHandler = handler;
913
+ }
877
914
  const windowApi$5 = {
878
915
  hosts: {
879
916
  // A failed backfill keeps the pushed statuses (This computer alone until the next push).
@@ -898,7 +935,9 @@ const windowApi$5 = {
898
935
  shareStop: (hostId) => window.api.machines.shareStop(hostId),
899
936
  useServer: (hostId, enabled) => window.api.machines.useServer(hostId, enabled),
900
937
  onLinks: (cb) => window.api.machines?.onLinks?.(cb) ?? noop,
901
- onStatus: (cb) => window.api.machines?.onStatus?.(cb) ?? noop
938
+ onStatus: (cb) => window.api.machines?.onStatus?.(cb) ?? noop,
939
+ onChanged: (cb) => window.api.machines?.onChanged?.(cb) ?? noop,
940
+ onJoin: (cb) => window.api.machines?.onJoin?.(cb) ?? noop
902
941
  },
903
942
  folder: { pick: () => window.api.folder.pick() },
904
943
  daemon: {
@@ -922,6 +961,14 @@ const windowApi$5 = {
922
961
  onSyncChanged: (cb) => window.api.hosts.onSyncChanged(cb),
923
962
  authStatus: (hostId) => window.api.hosts.authStatus(hostId)
924
963
  },
964
+ tokens: {
965
+ tokensList: (hostId) => window.api.hosts.tokensList(hostId),
966
+ tokenCreate: (hostId, name) => window.api.hosts.tokenCreate(hostId, name),
967
+ tokenRevoke: (hostId, id) => window.api.hosts.tokenRevoke(hostId, id),
968
+ pairBrowser: (hostId) => window.api.hosts.pairBrowser(hostId),
969
+ onTokensChanged: (cb) => window.api.hosts.onTokensChanged(cb)
970
+ },
971
+ newChat: (hostId, machine) => newChatHandler?.(hostId, machine),
925
972
  oauth: {
926
973
  oauth: (hostId, target, flowKey) => window.api.hosts.oauth(hostId, target, flowKey),
927
974
  oauthPaste: (flowKey, input) => window.api.hosts.oauthPaste(flowKey, input),
@@ -1603,8 +1650,9 @@ function electronSessionSource(api = window.api.sessions) {
1603
1650
  setArchived: (id, archived) => api.setArchived(id, archived),
1604
1651
  setSpace: (id, spaceId) => api.setSpace(id, spaceId),
1605
1652
  remove: (id) => removeSession(api, id),
1606
- onChanged: (listener) => api.onChanged((signal) => listener(signal.sessionId)),
1607
- // `sessions:facets` (main sends it to every window): facets are stored without a `sessions:changed`.
1653
+ // Each signal carries the row that main lists. It is applied in place.
1654
+ onChanged: (listener) => api.onChanged((signal) => listener(signal)),
1655
+ // Main sends `sessions:facets` to every window. It carries the facet values alone, as soon as they are computed.
1608
1656
  onFacets: (listener) => api.onFacets((signal) => listener(signal.sessionId, signal.facets))
1609
1657
  };
1610
1658
  }
@@ -1622,19 +1670,41 @@ function electronPageHistory(api = () => window.api.sidebar) {
1622
1670
  save: ({ entries, index }) => api().setHistory({ entries: [...entries], index })
1623
1671
  };
1624
1672
  }
1673
+ function runtimeOriginOf({ epoch, resuming, health: health2 }) {
1674
+ return {
1675
+ ...epoch !== void 0 ? { epoch } : {},
1676
+ ...resuming ? { resuming } : {},
1677
+ ...health2 === "connecting" ? { connecting: true } : {}
1678
+ };
1679
+ }
1625
1680
  const electronDirectorySignals = {
1626
1681
  onRunEnd: (listener) => onStreamSignal((signal) => {
1627
1682
  if (signal.kind === "run:end") listener(signal.sessionId, signal.ok);
1628
1683
  }),
1629
- onRuntime: (listener) => window.api.daemon.onState(({ connected }) => listener(connected)),
1684
+ // Reports the daemon process and whether main resumes it. A reconnect to the same process keeps the windows, and main replays what they missed.
1685
+ onRuntime: (listener) => window.api.daemon.onState((state2) => listener(state2.connected, runtimeOriginOf(state2))),
1686
+ // Tells a window mounted after the last `daemon:state` (a second window, a reload) which daemon process it reads from.
1687
+ currentRuntime: async () => {
1688
+ const state2 = await window.api.daemon.current();
1689
+ return { connected: state2.connected, origin: runtimeOriginOf(state2) };
1690
+ },
1630
1691
  onHostRemoved: (listener) => window.api.hosts.onRemoved(({ hostId, sessionIds, notice }) => listener({ hostId, sessionIds, notice }))
1631
1692
  };
1693
+ const BROWSER_SESSION_DEFAULTS = Object.freeze({
1694
+ url: "",
1695
+ colorScheme: "system",
1696
+ device: null
1697
+ });
1698
+ function browserProjectKey(sessionId, folder) {
1699
+ return sessionKey(parseSessionKey(sessionId).hostId, folder);
1700
+ }
1632
1701
  const MAX_LIVE_PAGES = 2;
1633
- const PAGES_KEY = "zg:browser:pages:v1";
1634
- const EMULATION_KEY = "zg:browser:emulation:v1";
1635
- const RECENT_KEY = "zg:browser:recent:v1";
1636
- const MAX_REMEMBERED = 50;
1637
- const MAX_RECENT = 6;
1702
+ const LEGACY_KEYS = {
1703
+ pages: "zg:browser:pages:v1",
1704
+ emulation: "zg:browser:emulation:v1",
1705
+ recent: "zg:browser:recent:v1"
1706
+ };
1707
+ const NO_RECENTS = Object.freeze([]);
1638
1708
  class BrowserStore {
1639
1709
  pages = /* @__PURE__ */ new Map();
1640
1710
  slots = /* @__PURE__ */ new Map();
@@ -1642,6 +1712,8 @@ class BrowserStore {
1642
1712
  elements = /* @__PURE__ */ new Map();
1643
1713
  listeners = /* @__PURE__ */ new Set();
1644
1714
  pageList = [];
1715
+ saved = { sessions: {}, recents: {} };
1716
+ hydrated = false;
1645
1717
  subscribe = (listener) => {
1646
1718
  this.listeners.add(listener);
1647
1719
  return () => this.listeners.delete(listener);
@@ -1654,6 +1726,63 @@ class BrowserStore {
1654
1726
  livePages = () => this.pageList;
1655
1727
  page = (sessionId) => sessionId ? this.pages.get(sessionId) ?? null : null;
1656
1728
  slot = (sessionId) => this.slots.get(sessionId) ?? null;
1729
+ /** The project's recent pages, newest first (`browserProjectKey`); the same array until they change. */
1730
+ recents = (project) => this.saved.recents[project] ?? NO_RECENTS;
1731
+ /**
1732
+ * What main keeps, read once. A page opened before it arrived (the tab
1733
+ * mounted first) takes its saved emulation, and its saved URL if it has
1734
+ * not started anywhere yet.
1735
+ */
1736
+ hydrate(state2) {
1737
+ this.saved = { sessions: { ...state2.sessions }, recents: { ...state2.recents } };
1738
+ this.hydrated = true;
1739
+ for (const page of [...this.pages.values()]) {
1740
+ const saved = this.savedSession(page.sessionId);
1741
+ const fresh = !page.initialUrl && !page.url && page.generation === 0;
1742
+ this.pages.set(page.sessionId, {
1743
+ ...page,
1744
+ colorScheme: saved.colorScheme,
1745
+ device: saved.device,
1746
+ ...fresh && saved.url ? { initialUrl: saved.url, url: saved.url } : {}
1747
+ });
1748
+ }
1749
+ this.emit();
1750
+ }
1751
+ /** A change main sent (this window's own writes come back here too). */
1752
+ applyChange(change) {
1753
+ if (change.kind === "recents") {
1754
+ this.saved = { ...this.saved, recents: { ...this.saved.recents, [change.project]: change.pages } };
1755
+ this.emit(false);
1756
+ return;
1757
+ }
1758
+ this.saved = { ...this.saved, sessions: { ...this.saved.sessions, [change.sessionId]: change.session } };
1759
+ const page = this.pages.get(change.sessionId);
1760
+ if (page && (page.colorScheme !== change.session.colorScheme || page.device !== change.session.device)) {
1761
+ this.pages.set(change.sessionId, {
1762
+ ...page,
1763
+ colorScheme: change.session.colorScheme,
1764
+ device: change.session.device
1765
+ });
1766
+ this.emit();
1767
+ }
1768
+ }
1769
+ /**
1770
+ * The toolbar sets the session's color scheme or device: shown at once,
1771
+ * and saved by main, which applies it to the page and tells every window.
1772
+ */
1773
+ setEmulation(sessionId, patch) {
1774
+ const page = this.pages.get(sessionId);
1775
+ const current = page ?? this.savedSession(sessionId);
1776
+ const next = {
1777
+ colorScheme: patch.colorScheme ?? current.colorScheme,
1778
+ device: patch.device !== void 0 ? patch.device : current.device
1779
+ };
1780
+ if (page) this.update(sessionId, next);
1781
+ void window.api.browser.setEmulation(sessionId, next).catch(() => void 0);
1782
+ }
1783
+ savedSession(sessionId) {
1784
+ return this.saved.sessions[sessionId] ?? BROWSER_SESSION_DEFAULTS;
1785
+ }
1657
1786
  /**
1658
1787
  * Mount the session's page (if not already), at `url` or where it was last.
1659
1788
  * `cwd` is the session's project: a page opened before the session list
@@ -1666,8 +1795,8 @@ class BrowserStore {
1666
1795
  if (url) this.navigate(sessionId, url);
1667
1796
  return;
1668
1797
  }
1669
- const start2 = url ?? rememberedUrl(sessionId) ?? "";
1670
- const emulation = rememberedEmulation(sessionId);
1798
+ const saved = this.savedSession(sessionId);
1799
+ const start2 = url ?? (this.hydrated ? saved.url : "");
1671
1800
  this.pages.set(sessionId, {
1672
1801
  sessionId,
1673
1802
  cwd,
@@ -1684,8 +1813,8 @@ class BrowserStore {
1684
1813
  generation: 0,
1685
1814
  lastShownAt: Date.now(),
1686
1815
  webContentsId: null,
1687
- colorScheme: emulation.colorScheme,
1688
- device: emulation.device,
1816
+ colorScheme: saved.colorScheme,
1817
+ device: saved.device,
1689
1818
  devtools: "closed"
1690
1819
  });
1691
1820
  this.evict(sessionId);
@@ -1711,12 +1840,9 @@ class BrowserStore {
1711
1840
  if (shallowEqual(page, next)) return;
1712
1841
  this.pages.set(sessionId, next);
1713
1842
  if (patch.url && patch.url !== page.url && patch.url !== "about:blank") {
1714
- remember(sessionId, patch.url);
1843
+ void window.api.browser.rememberUrl(sessionId, patch.url).catch(() => void 0);
1715
1844
  } else if (next.cwd && patch.title && patch.title !== page.title && next.url) {
1716
- retitleRecent(next.cwd, next.url, patch.title);
1717
- }
1718
- if (patch.colorScheme !== void 0 || patch.device !== void 0) {
1719
- rememberEmulation(sessionId, { colorScheme: next.colorScheme, device: next.device });
1845
+ void window.api.browser.retitle(browserProjectKey(sessionId, next.cwd), next.url, patch.title).catch(() => void 0);
1720
1846
  }
1721
1847
  this.emit();
1722
1848
  }
@@ -1728,7 +1854,7 @@ class BrowserStore {
1728
1854
  recordVisit(sessionId) {
1729
1855
  const page = this.pages.get(sessionId);
1730
1856
  if (!page?.cwd || page.error || !/^https?:\/\//i.test(page.url)) return;
1731
- rememberRecent(page.cwd, page.url, page.title);
1857
+ void window.api.browser.visit(browserProjectKey(sessionId, page.cwd), page.url, page.title).catch(() => void 0);
1732
1858
  }
1733
1859
  navigate(sessionId, url) {
1734
1860
  const page = this.pages.get(sessionId);
@@ -1746,7 +1872,7 @@ class BrowserStore {
1746
1872
  const page = this.pages.get(sessionId);
1747
1873
  if (!page) return;
1748
1874
  this.elements.delete(sessionId);
1749
- forget(sessionId);
1875
+ void window.api.browser.rememberUrl(sessionId, "").catch(() => void 0);
1750
1876
  this.update(sessionId, {
1751
1877
  initialUrl: "",
1752
1878
  url: "",
@@ -1800,101 +1926,36 @@ function useLiveBrowserPages() {
1800
1926
  function useBrowserSlot(sessionId) {
1801
1927
  return reactExports.useSyncExternalStore(browserStore.subscribe, () => browserStore.slot(sessionId));
1802
1928
  }
1803
- function pageKey(url) {
1804
- try {
1805
- const u = new URL(url);
1806
- return `${u.origin}${u.pathname.replace(/\/+$/, "") || "/"}`;
1807
- } catch {
1808
- return url;
1809
- }
1810
- }
1811
- function recentBrowserPages(cwd) {
1812
- return readRecent()[cwd] ?? [];
1813
- }
1814
- function removeRecentBrowserPage(cwd, url) {
1815
- const all = readRecent();
1816
- const list2 = all[cwd];
1817
- if (!list2?.some((e) => e.url === url)) return;
1818
- all[cwd] = list2.filter((e) => e.url !== url);
1819
- writeJson(RECENT_KEY, all);
1929
+ function useRecentBrowserPages(project) {
1930
+ return reactExports.useSyncExternalStore(browserStore.subscribe, () => browserStore.recents(project));
1820
1931
  }
1821
- function readRecent() {
1822
- const all = readJson(RECENT_KEY);
1823
- const out = {};
1824
- for (const [cwd, list2] of Object.entries(all)) {
1825
- if (!Array.isArray(list2)) continue;
1826
- out[cwd] = list2.map((e) => {
1827
- if (typeof e === "string") return { url: e, title: "", visitedAt: 0 };
1828
- const entry = e;
1829
- if (typeof entry?.url !== "string") return null;
1830
- return { url: entry.url, title: String(entry.title ?? ""), visitedAt: Number(entry.visitedAt) || 0 };
1831
- }).filter((e) => e !== null).slice(0, MAX_RECENT);
1832
- }
1833
- return out;
1932
+ function removeRecentBrowserPage(project, url) {
1933
+ void window.api.browser.removeRecent(project, url).catch(() => void 0);
1834
1934
  }
1835
- function rememberedUrl(sessionId) {
1836
- return readJson(PAGES_KEY)[sessionId] ?? null;
1935
+ function loadBrowserState() {
1936
+ const stop = window.api.browser.onStateChanged((change) => browserStore.applyChange(change));
1937
+ const legacy = readLegacy();
1938
+ const ready = window.api.browser.state(legacy).then((state2) => {
1939
+ if (legacy) for (const key2 of Object.values(LEGACY_KEYS)) localStorage.removeItem(key2);
1940
+ browserStore.hydrate(state2);
1941
+ }).catch((err) => console.error("[zidane-gui] browser state failed to load", err));
1942
+ return { stop, ready };
1837
1943
  }
1838
- function rememberedEmulation(sessionId) {
1839
- const saved = readJson(EMULATION_KEY)[sessionId];
1840
- return {
1841
- colorScheme: saved && ["light", "dark"].includes(saved.colorScheme) ? saved.colorScheme : "system",
1842
- device: saved?.device && typeof saved.device.width === "number" ? saved.device : null
1843
- };
1844
- }
1845
- function rememberEmulation(sessionId, emulation) {
1846
- const all = readJson(EMULATION_KEY);
1847
- delete all[sessionId];
1848
- if (emulation.colorScheme !== "system" || emulation.device) all[sessionId] = emulation;
1849
- const keys = Object.keys(all);
1850
- for (const k of keys.slice(0, Math.max(0, keys.length - MAX_REMEMBERED))) delete all[k];
1851
- writeJson(EMULATION_KEY, all);
1852
- }
1853
- function remember(sessionId, url) {
1854
- const all = readJson(PAGES_KEY);
1855
- delete all[sessionId];
1856
- all[sessionId] = url;
1857
- const keys = Object.keys(all);
1858
- for (const k of keys.slice(0, Math.max(0, keys.length - MAX_REMEMBERED))) delete all[k];
1859
- writeJson(PAGES_KEY, all);
1860
- }
1861
- function forget(sessionId) {
1862
- const all = readJson(PAGES_KEY);
1863
- if (!(sessionId in all)) return;
1864
- delete all[sessionId];
1865
- writeJson(PAGES_KEY, all);
1866
- }
1867
- function rememberRecent(cwd, url, title) {
1868
- const all = readRecent();
1869
- const key2 = pageKey(url);
1870
- const prev = (all[cwd] ?? []).find((e) => pageKey(e.url) === key2);
1871
- all[cwd] = [
1872
- { url, title: title || prev?.title || "", visitedAt: Date.now() },
1873
- ...(all[cwd] ?? []).filter((e) => pageKey(e.url) !== key2)
1874
- ].slice(0, MAX_RECENT);
1875
- writeJson(RECENT_KEY, all);
1876
- }
1877
- function retitleRecent(cwd, url, title) {
1878
- const all = readRecent();
1879
- const key2 = pageKey(url);
1880
- const entry = all[cwd]?.find((e) => pageKey(e.url) === key2);
1881
- if (!entry || entry.title === title) return;
1882
- entry.title = title;
1883
- writeJson(RECENT_KEY, all);
1884
- }
1885
- function readJson(key2) {
1886
- try {
1887
- const parsed = JSON.parse(localStorage.getItem(key2) ?? "{}");
1888
- return parsed && typeof parsed === "object" ? parsed : {};
1889
- } catch {
1890
- return {};
1891
- }
1892
- }
1893
- function writeJson(key2, value) {
1894
- try {
1895
- localStorage.setItem(key2, JSON.stringify(value));
1896
- } catch {
1897
- }
1944
+ function readLegacy() {
1945
+ const read2 = (key2) => {
1946
+ try {
1947
+ const raw = localStorage.getItem(key2);
1948
+ return raw === null ? void 0 : JSON.parse(raw);
1949
+ } catch {
1950
+ return void 0;
1951
+ }
1952
+ };
1953
+ const legacy = {
1954
+ pages: read2(LEGACY_KEYS.pages),
1955
+ emulation: read2(LEGACY_KEYS.emulation),
1956
+ recent: read2(LEGACY_KEYS.recent)
1957
+ };
1958
+ return Object.values(legacy).some((v) => v !== void 0) ? legacy : null;
1898
1959
  }
1899
1960
  function sameRect(a, b) {
1900
1961
  return a.left === b.left && a.top === b.top && a.width === b.width && a.height === b.height;
@@ -1986,8 +2047,23 @@ let seq = 0;
1986
2047
  function requestDraftOn(hostId, folder, machine) {
1987
2048
  request.set({ seq: ++seq, hostId, folder, ...machine });
1988
2049
  }
1989
- function requestFolderlessDraft() {
1990
- request.set({ seq: ++seq, hostId: LOCAL_HOST_KEY, folder: null, folderless: true });
2050
+ function requestFolderlessDraft(hostId = LOCAL_HOST_KEY) {
2051
+ request.set({ seq: ++seq, hostId, folder: null, folderless: true });
2052
+ }
2053
+ function requestDraftLike(session, setDefaultFolder) {
2054
+ const hostId = session.hostId ?? LOCAL_HOST_KEY;
2055
+ const folder = projectPathOf(session);
2056
+ const machine = session.environment ? environmentMachineName(session.environment.kind) : void 0;
2057
+ if (machine) {
2058
+ requestDraftOn(hostId, null, { environment: `local@${machine}`, ...folder ? { machineFolder: folder } : {} });
2059
+ } else if (!folder) {
2060
+ requestFolderlessDraft(hostId);
2061
+ } else if (hostId !== LOCAL_HOST_KEY) {
2062
+ requestDraftOn(hostId, folder);
2063
+ } else {
2064
+ setDefaultFolder(folder);
2065
+ requestDraftOn(LOCAL_HOST_KEY, null);
2066
+ }
1991
2067
  }
1992
2068
  function clearDraftRequest() {
1993
2069
  request.set(null);
@@ -2042,7 +2118,18 @@ function applyNewDraftRequest(request2, actions) {
2042
2118
  if (request2.prompt) setPrompt({ text: request2.prompt });
2043
2119
  actions.showDraft();
2044
2120
  }
2121
+ let applyHere = null;
2122
+ function requestNewDraft(request2) {
2123
+ applyHere?.(request2);
2124
+ }
2045
2125
  function useNewDraftRequests(apply, enabled) {
2126
+ reactExports.useEffect(() => {
2127
+ if (!enabled) return void 0;
2128
+ applyHere = apply;
2129
+ return () => {
2130
+ if (applyHere === apply) applyHere = null;
2131
+ };
2132
+ }, [apply, enabled]);
2046
2133
  reactExports.useEffect(() => {
2047
2134
  if (!enabled || !window.api.windows?.onNewDraft) return;
2048
2135
  const off = window.api.windows.onNewDraft(apply);
@@ -2062,14 +2149,17 @@ function StreamProvider({ children }) {
2062
2149
  streamsRef.current = createSessionStreams({
2063
2150
  smooth: () => smoothStreamingRef.current,
2064
2151
  loadTail: (sessionId) => window.api.sessions.loadEvents(sessionId),
2065
- loadBefore: (sessionId, beforeSeq) => window.api.sessions.loadEventsBefore(sessionId, beforeSeq)
2152
+ loadBefore: (sessionId, beforeSeq) => window.api.sessions.loadEventsBefore(sessionId, beforeSeq),
2153
+ loadSince: (sessionId, afterPos, historyId) => window.api.sessions.historySince(sessionId, afterPos, historyId)
2066
2154
  });
2067
2155
  }
2068
2156
  const streams = streamsRef.current;
2069
2157
  reactExports.useEffect(() => {
2070
2158
  const unsubscribe = onStreamSignal((signal) => streams.apply(signal));
2159
+ const offHistory = window.api.sessions.onHistoryChanged((change) => streams.applyHistory(change.sessionId, change));
2071
2160
  return () => {
2072
2161
  unsubscribe();
2162
+ offHistory();
2073
2163
  streams.dispose();
2074
2164
  };
2075
2165
  }, [streams]);
@@ -2086,6 +2176,7 @@ const useDropPromptPreviews = () => useActions().dropPromptPreviews;
2086
2176
  const useRenamePromptPreviews = () => useActions().renamePromptPreviews;
2087
2177
  const useStreamReset = () => useActions().drop;
2088
2178
  const useSetEventsPage = () => useActions().setEventsPage;
2179
+ const useStreamResync = () => useActions().resync;
2089
2180
  const useConfirmIdle = () => useActions().confirmIdle;
2090
2181
  const useMarkRunning = () => useActions().markRunning;
2091
2182
  const useSeedSystemMd = () => useActions().seedSystemMd;
@@ -2133,6 +2224,7 @@ function useDirectoryStreams() {
2133
2224
  peekRunSeq: usePeekRunSeq(),
2134
2225
  hasEvents: usePeekHasEvents(),
2135
2226
  setEventsPage: useSetEventsPage(),
2227
+ resync: useStreamResync(),
2136
2228
  evictExcept: useEvictHydratedExcept(),
2137
2229
  dropAll: useDropAllStreams(),
2138
2230
  reset: useStreamReset()
@@ -2147,6 +2239,7 @@ function useDirectoryStreams() {
2147
2239
  peekRunSeq: (id) => ref.current.peekRunSeq(id),
2148
2240
  hasEvents: (id) => ref.current.hasEvents(id),
2149
2241
  setEventsPage: (id, page) => ref.current.setEventsPage(id, page),
2242
+ resync: (id) => ref.current.resync(id),
2150
2243
  evictExcept: (keep) => ref.current.evictExcept(keep),
2151
2244
  dropAll: () => ref.current.dropAll(),
2152
2245
  reset: (id) => ref.current.reset(id)
@@ -2157,6 +2250,7 @@ function SessionsProvider({ children }) {
2157
2250
  const { servers } = useHosts();
2158
2251
  const streams = useDirectoryStreams();
2159
2252
  const noteActiveStreamSession = useNoteActiveStreamSession();
2253
+ const notify2 = useNotify();
2160
2254
  const spacesOn = spacesEnabled(settings);
2161
2255
  const directorySettings = reactExports.useMemo(
2162
2256
  () => ({ spaces: spacesOn, spaceList: settings.spaceList, orchestration: settings.orchestration === true }),
@@ -2320,19 +2414,23 @@ function SessionsProvider({ children }) {
2320
2414
  const result = await directory.drop(id);
2321
2415
  await directory.refresh();
2322
2416
  if (result.kept) {
2323
- alert(DEFAULT_SIDEBAR_LABELS.environmentKept(result.reason));
2417
+ notify2({
2418
+ tone: "warning",
2419
+ message: DEFAULT_SIDEBAR_LABELS.environmentKept(),
2420
+ ...result.reason ? { detail: result.reason } : {}
2421
+ });
2324
2422
  }
2325
2423
  },
2326
- [directory]
2424
+ [directory, notify2]
2327
2425
  );
2328
2426
  const deleteSessions = reactExports.useCallback(
2329
2427
  async (ids) => {
2330
2428
  const { kept } = await directory.removeMany(ids);
2331
2429
  if (kept > 0) {
2332
- alert(DEFAULT_SIDEBAR_LABELS.environmentsKept(kept));
2430
+ notify2({ tone: "warning", message: DEFAULT_SIDEBAR_LABELS.environmentsKept(kept) });
2333
2431
  }
2334
2432
  },
2335
- [directory]
2433
+ [directory, notify2]
2336
2434
  );
2337
2435
  const listSpaceId = view.listSpaceId;
2338
2436
  const patchView = reactExports.useCallback(
@@ -2356,6 +2454,7 @@ function SessionsProvider({ children }) {
2356
2454
  sessionRefs: view.sessionRefs,
2357
2455
  groupBy: view.groupBy,
2358
2456
  sortBy: view.sortBy,
2457
+ newChatPlace: defaults.place,
2359
2458
  projectRoot: defaults.projectRoot,
2360
2459
  defaultFolder: defaults.defaultFolder,
2361
2460
  defaultAgentId: defaults.defaultAgentId,
@@ -2376,6 +2475,7 @@ function SessionsProvider({ children }) {
2376
2475
  activeSpace,
2377
2476
  listSpaceId,
2378
2477
  activeSessionId,
2478
+ defaults.place,
2379
2479
  defaults.projectRoot,
2380
2480
  defaults.defaultFolder,
2381
2481
  defaults.defaultAgentId,
@@ -3577,7 +3677,6 @@ function createElectronExtensionsHost(api = window.api.extensionHost, options =
3577
3677
  const keyCommands = writable([]);
3578
3678
  const keymapMode = writable(void 0);
3579
3679
  const sessionMenu = writable([]);
3580
- const scope = writable(null);
3581
3680
  const panelListeners = /* @__PURE__ */ new Set();
3582
3681
  const queue = createDialogQueue();
3583
3682
  const channel = createUiEffectChannel();
@@ -3617,8 +3716,7 @@ function createElectronExtensionsHost(api = window.api.extensionHost, options =
3617
3716
  )
3618
3717
  ]);
3619
3718
  if (at !== generation || !result?.ok) return;
3620
- const { sources: _sources, clientScope, ...wire2 } = result.value;
3621
- scope.set(clientScope ?? null);
3719
+ const { sources: _sources, ...wire2 } = result.value;
3622
3720
  settingsWire.set({
3623
3721
  ...wire2,
3624
3722
  provenance: provenance.flat()
@@ -3874,7 +3972,6 @@ function createElectronExtensionsHost(api = window.api.extensionHost, options =
3874
3972
  keyCommands,
3875
3973
  keymapMode,
3876
3974
  sessionMenu,
3877
- scope,
3878
3975
  async openLink(request2) {
3879
3976
  const where = target();
3880
3977
  if (where === void 0) return false;
@@ -4227,6 +4324,42 @@ function WelcomeScreen() {
4227
4324
  const modelName = useModelName();
4228
4325
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WelcomeScreen$1, { modelName });
4229
4326
  }
4327
+ function createElectronSidebarHost(api) {
4328
+ return {
4329
+ revealPath: async (path) => {
4330
+ await api.system.revealPath(path);
4331
+ },
4332
+ openWindow: async (sessionId, mode) => {
4333
+ await api.windows.open(sessionId, mode);
4334
+ },
4335
+ environment: {
4336
+ actions: (sessionId) => api.sessions.environmentActions(sessionId),
4337
+ run: (sessionId, actionId) => api.sessions.runEnvironmentAction(sessionId, actionId),
4338
+ retry: (sessionId) => api.sessions.retryEnvironment(sessionId)
4339
+ },
4340
+ openHostSettings: async (hostId) => {
4341
+ api.openHostSettings(hostId);
4342
+ }
4343
+ };
4344
+ }
4345
+ let hostSettingsOpener = null;
4346
+ function setHostSettingsOpener(open) {
4347
+ hostSettingsOpener = open;
4348
+ }
4349
+ function openHostsSettings(hostId) {
4350
+ hostSettingsOpener?.(hostId);
4351
+ }
4352
+ const windowApi$3 = {
4353
+ system: { revealPath: (path) => window.api.system.revealPath(path) },
4354
+ windows: { open: (sessionKey2, parts) => window.api.windows.open(sessionKey2, parts) },
4355
+ sessions: {
4356
+ environmentActions: (id) => window.api.sessions.environmentActions(id),
4357
+ runEnvironmentAction: (id, actionId) => window.api.sessions.runEnvironmentAction(id, actionId),
4358
+ retryEnvironment: (id) => window.api.sessions.retryEnvironment(id)
4359
+ },
4360
+ openHostSettings: (hostId) => hostSettingsOpener?.(hostId)
4361
+ };
4362
+ const sidebarHost = createElectronSidebarHost(windowApi$3);
4230
4363
  const knobs = () => modelKnobsOf(composerHost().prefs);
4231
4364
  const rememberedKnobs = (modelId) => knobs().remembered(modelId);
4232
4365
  const rememberEffort = (modelId, effort) => knobs().rememberEffort(modelId, effort);
@@ -4264,7 +4397,7 @@ function createElectronAppearanceHost(options) {
4264
4397
  }
4265
4398
  };
4266
4399
  }
4267
- const windowApi$3 = {
4400
+ const windowApi$2 = {
4268
4401
  appearance: {
4269
4402
  setWindowBackground: (color) => window.api.appearance.setWindowBackground(color),
4270
4403
  setZoom: (factor) => window.api.appearance.setZoom(factor),
@@ -4276,7 +4409,7 @@ const windowStorage = {
4276
4409
  getItem: (key2) => localStorage.getItem(key2),
4277
4410
  setItem: (key2, value) => localStorage.setItem(key2, value)
4278
4411
  };
4279
- const appearanceHost = createElectronAppearanceHost({ api: windowApi$3, storage: windowStorage });
4412
+ const appearanceHost = createElectronAppearanceHost({ api: windowApi$2, storage: windowStorage });
4280
4413
  const EFFORTS = EFFORT_LEVELS;
4281
4414
  const APP_ICON_NOTE = "Shown in the Dock and in Finder.";
4282
4415
  async function fromMain(call) {
@@ -4771,7 +4904,7 @@ function createElectronKeybindingsHost(api) {
4771
4904
  location: () => api.keybindings.path()
4772
4905
  };
4773
4906
  }
4774
- const windowApi$2 = {
4907
+ const windowApi$1 = {
4775
4908
  keybindings: {
4776
4909
  load: () => window.api.keybindings.load(),
4777
4910
  save: (map) => window.api.keybindings.save(map),
@@ -4779,7 +4912,7 @@ const windowApi$2 = {
4779
4912
  openInEditor: () => window.api.keybindings.openInEditor()
4780
4913
  }
4781
4914
  };
4782
- const keybindingsHost = createElectronKeybindingsHost(windowApi$2);
4915
+ const keybindingsHost = createElectronKeybindingsHost(windowApi$1);
4783
4916
  function useModelPickerWiring(session, hostId) {
4784
4917
  const { setDefaultModel, refresh } = useSessionsActions();
4785
4918
  const { settings, setSetting } = useSettings();
@@ -4903,7 +5036,16 @@ function ConversationComposer({
4903
5036
  onOpenRunningWork,
4904
5037
  onOpenEnvironmentSettings
4905
5038
  }) {
4906
- const { setArchived, hostNotice, dismissHostNotice, defaultAgentId, setDefaultAgentId } = useSessions();
5039
+ const {
5040
+ setArchived,
5041
+ hostNotice,
5042
+ dismissHostNotice,
5043
+ defaultAgentId,
5044
+ setDefaultAgentId,
5045
+ newChatPlace,
5046
+ spacesOn,
5047
+ activeSpace
5048
+ } = useSessions();
4907
5049
  const { hosts, servers, hostById } = useHosts();
4908
5050
  const openOnboarding = useOnboardingOpener();
4909
5051
  const providerReady = useProviderReady();
@@ -4914,6 +5056,15 @@ function ConversationComposer({
4914
5056
  const { contextStatus } = meters;
4915
5057
  const { machine } = draft2;
4916
5058
  const lentServers = useLentServers(isNewSession && servers.length > 0);
5059
+ const reachableServerIds = reactExports.useMemo(
5060
+ () => isNewSession ? servers.filter((s) => hostReachable(s)).map((s) => s.id) : [],
5061
+ [isNewSession, servers]
5062
+ );
5063
+ const serverMachines = useServerMachines(reachableServerIds);
5064
+ const openAddMachine = useAddMachine();
5065
+ useSettingsHost();
5066
+ Boolean(newChatPlace) && samePlace(draft2.here, newChatPlace ?? void 0);
5067
+ const draftServerOffline = isNewSession && draft2.server ? !hostReachable(hostById(draft2.server.id)) : false;
4917
5068
  const { settings } = useSettings();
4918
5069
  const activeScope = useActiveScope();
4919
5070
  const composerScopeKey = activeScope ? scopeKey(activeScope) : null;
@@ -4947,7 +5098,17 @@ function ConversationComposer({
4947
5098
  )
4948
5099
  ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
4949
5100
  isNewSession && hostNotice && /* @__PURE__ */ jsxRuntimeExports.jsx(HostRemovedBanner, { notice: hostNotice, onDismiss: dismissHostNotice }),
4950
- isNewSession && draft2.error && /* @__PURE__ */ jsxRuntimeExports.jsx(ComposerNotice, { text: draft2.error, onDismiss: () => draft2.setError(null) }),
5101
+ isNewSession && (draft2.placeIssue || draftServerOffline) && /* @__PURE__ */ jsxRuntimeExports.jsx(
5102
+ DraftPlaceNotice,
5103
+ {
5104
+ issue: draft2.placeIssue,
5105
+ ...draftServerOffline && draft2.server ? { offlineServer: draft2.server.name } : {},
5106
+ onUseThisComputer: () => draft2.setHostId(LOCAL_HOST_KEY),
5107
+ onAddServer: () => openHostsSettings(""),
5108
+ onDismiss: draft2.dismissPlaceIssue
5109
+ }
5110
+ ),
5111
+ isNewSession && draft2.error && /* @__PURE__ */ jsxRuntimeExports.jsx(ComposerNotice, { tone: "error", text: draft2.error, onDismiss: () => draft2.setError(null) }),
4951
5112
  prompt2.needsProvider && providerReady === false && /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectProviderCard, { "data-testid": "connect-provider", onConnect: () => openOnboarding("connect") }),
4952
5113
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ComposerDock, { children: [
4953
5114
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTurnHint, { sessionId }),
@@ -5016,6 +5177,9 @@ function ConversationComposer({
5016
5177
  draft: draft2.environment,
5017
5178
  onChange: draft2.setEnvironment,
5018
5179
  hiddenMachines: draft2.server ? void 0 : lentServers,
5180
+ serverMachines,
5181
+ onPickServerMachine: (serverId, picked) => draft2.setPlace(serverId, machineKind("local", picked.name)),
5182
+ ...openAddMachine ? { onAddMachine: (serverId) => openAddMachine(serverId) } : {},
5019
5183
  onOpenSettings: onOpenEnvironmentSettings
5020
5184
  }
5021
5185
  ) }),
@@ -5094,6 +5258,7 @@ function SessionHeader({ session, onOpenDetails, lightsInCenter = false }) {
5094
5258
  const confirmDelete = useConfirmDeleteSession(deleteSession);
5095
5259
  const sidebarHost2 = useSidebarHost();
5096
5260
  const sidebarLabels = useSidebarLabels();
5261
+ const notify2 = useSidebarNotice();
5097
5262
  const environment = useEnvironmentCommands();
5098
5263
  const [menuOpen, setMenuOpen] = reactExports.useState(false);
5099
5264
  const [renaming, setRenaming] = reactExports.useState(false);
@@ -5111,7 +5276,7 @@ function SessionHeader({ session, onOpenDetails, lightsInCenter = false }) {
5111
5276
  retryEnvironment: () => environment.retry(session.id),
5112
5277
  runEnvironmentAction: (actionId, label) => environment.run(session.id, actionId, label),
5113
5278
  moveToSpace: (spaceId) => void setSessionSpace(session.id, spaceId).catch((err) => {
5114
- alert(sidebarLabels.moveSessionFailed(err?.message ?? String(err)));
5279
+ notify2(sidebarLabels.moveSessionFailed(errorMessage(err)));
5115
5280
  }),
5116
5281
  ...moveSession ? { moveSession: () => void moveSession(moveSubject(session)) } : {}
5117
5282
  },
@@ -5124,6 +5289,7 @@ function SessionHeader({ session, onOpenDetails, lightsInCenter = false }) {
5124
5289
  environmentActions,
5125
5290
  sidebarHost2,
5126
5291
  sidebarLabels,
5292
+ notify2,
5127
5293
  environment,
5128
5294
  setFavorite,
5129
5295
  setArchived,
@@ -5360,7 +5526,7 @@ const ConversationPane = reactExports.memo(function ConversationPane2({
5360
5526
  const running = useSessionRunning(sessionId);
5361
5527
  useSessionHydration(sessionId, hydrated);
5362
5528
  const meters = useSessionMeters(session, running);
5363
- const { defaultFolder, setDefaultFolder, sessions } = useSessions();
5529
+ const { defaultFolder, setDefaultFolder, sessions, newChatPlace } = useSessions();
5364
5530
  const { servers } = useHosts();
5365
5531
  const draftRequest = useDraftRequest();
5366
5532
  const draft2 = useDraftTarget({
@@ -5370,7 +5536,8 @@ const ConversationPane = reactExports.memo(function ConversationPane2({
5370
5536
  sessions,
5371
5537
  servers,
5372
5538
  onLocalFolder: publishDraftFolder,
5373
- request: draftRequest
5539
+ request: draftRequest,
5540
+ place: newChatPlace
5374
5541
  });
5375
5542
  reactExports.useEffect(() => {
5376
5543
  if (!isNewSession) clearDraftRequest();
@@ -5507,116 +5674,14 @@ function ArtifactsPanel({ sessionId }) {
5507
5674
  }
5508
5675
  const BROWSER_DEVTOOLS_PARTITION = "zidane-browser-devtools";
5509
5676
  const BROWSER_DEVTOOLS_BLANK = "devtools://devtools/bundled/Images/empty.svg";
5510
- const CHROME = "126.0.0.0";
5511
- const IOS = (model) => `Mozilla/5.0 (${model}; CPU ${model === "iPad" ? "OS" : "iPhone OS"} 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1`;
5512
- const ANDROID = (model, mobile = true) => `Mozilla/5.0 (Linux; Android 14; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${CHROME} ${mobile ? "Mobile " : ""}Safari/537.36`;
5513
- const WINDOWS = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${CHROME} Safari/537.36`;
5514
- const BROWSER_DEVICES = [
5515
- { id: "iphone-se", label: "iPhone SE", width: 375, height: 667, dpr: 2, mobile: true, userAgent: IOS("iPhone") },
5516
- { id: "iphone-xr", label: "iPhone XR", width: 414, height: 896, dpr: 2, mobile: true, userAgent: IOS("iPhone") },
5517
- {
5518
- id: "iphone-12-pro",
5519
- label: "iPhone 12 Pro",
5520
- width: 390,
5521
- height: 844,
5522
- dpr: 3,
5523
- mobile: true,
5524
- userAgent: IOS("iPhone")
5525
- },
5526
- {
5527
- id: "iphone-14-pro-max",
5528
- label: "iPhone 14 Pro Max",
5529
- width: 430,
5530
- height: 932,
5531
- dpr: 3,
5532
- mobile: true,
5533
- userAgent: IOS("iPhone")
5534
- },
5535
- { id: "pixel-7", label: "Pixel 7", width: 412, height: 915, dpr: 2.625, mobile: true, userAgent: ANDROID("Pixel 7") },
5536
- {
5537
- id: "galaxy-s8-plus",
5538
- label: "Samsung Galaxy S8+",
5539
- width: 360,
5540
- height: 740,
5541
- dpr: 4,
5542
- mobile: true,
5543
- userAgent: ANDROID("SM-G955U")
5544
- },
5545
- {
5546
- id: "galaxy-s20-ultra",
5547
- label: "Samsung Galaxy S20 Ultra",
5548
- width: 412,
5549
- height: 915,
5550
- dpr: 3.5,
5551
- mobile: true,
5552
- userAgent: ANDROID("SM-G981B")
5553
- },
5554
- { id: "ipad-mini", label: "iPad Mini", width: 768, height: 1024, dpr: 2, mobile: true, userAgent: IOS("iPad") },
5555
- { id: "ipad-air", label: "iPad Air", width: 820, height: 1180, dpr: 2, mobile: true, userAgent: IOS("iPad") },
5556
- { id: "ipad-pro", label: "iPad Pro", width: 1024, height: 1366, dpr: 2, mobile: true, userAgent: IOS("iPad") },
5557
- { id: "surface-pro-7", label: "Surface Pro 7", width: 912, height: 1368, dpr: 2, mobile: true, userAgent: WINDOWS },
5558
- {
5559
- id: "surface-duo",
5560
- label: "Surface Duo",
5561
- width: 540,
5562
- height: 720,
5563
- dpr: 2.5,
5564
- mobile: true,
5565
- userAgent: ANDROID("Surface Duo")
5566
- },
5567
- {
5568
- id: "galaxy-z-fold-5",
5569
- label: "Galaxy Z Fold 5",
5570
- width: 344,
5571
- height: 882,
5572
- dpr: 2.625,
5573
- mobile: true,
5574
- userAgent: ANDROID("SM-F946U")
5575
- },
5576
- {
5577
- id: "zenbook-fold",
5578
- label: "Asus Zenbook Fold",
5579
- width: 853,
5580
- height: 1280,
5581
- dpr: 1.5,
5582
- mobile: true,
5583
- userAgent: WINDOWS
5584
- },
5585
- {
5586
- id: "galaxy-a51",
5587
- label: "Samsung Galaxy A51/71",
5588
- width: 412,
5589
- height: 914,
5590
- dpr: 2.625,
5591
- mobile: true,
5592
- userAgent: ANDROID("SM-A515F")
5593
- },
5594
- {
5595
- id: "nest-hub",
5596
- label: "Nest Hub",
5597
- width: 1024,
5598
- height: 600,
5599
- dpr: 2,
5600
- mobile: true,
5601
- userAgent: ANDROID("Nest Hub", false)
5602
- },
5603
- {
5604
- id: "nest-hub-max",
5605
- label: "Nest Hub Max",
5606
- width: 1280,
5607
- height: 800,
5608
- dpr: 2,
5609
- mobile: true,
5610
- userAgent: ANDROID("Nest Hub Max", false)
5611
- }
5612
- ];
5613
- function responsiveDevice(width, height) {
5614
- return { id: "responsive", label: "Responsive", width, height, dpr: null, mobile: false, userAgent: null };
5615
- }
5616
- const DEVICE_MIN = 50;
5617
- const DEVICE_MAX = 9999;
5618
- function clampDeviceSize(n) {
5619
- return Math.min(DEVICE_MAX, Math.max(DEVICE_MIN, Math.round(n)));
5677
+ const DEVICE_MARGIN = 16;
5678
+ function deviceFit(slot, device) {
5679
+ const room = {
5680
+ width: Math.max(1, slot.width - DEVICE_MARGIN * 2),
5681
+ height: Math.max(1, slot.height - DEVICE_MARGIN * 2)
5682
+ };
5683
+ const scale = Math.min(1, room.width / device.width, room.height / device.height);
5684
+ return Math.max(0.05, Math.floor(scale * 100) / 100);
5620
5685
  }
5621
5686
  class AnnotationStore {
5622
5687
  states = /* @__PURE__ */ new Map();
@@ -6097,7 +6162,13 @@ function BrowserTab({ sessionId }) {
6097
6162
  className: `relative flex-1 min-h-0 ${page?.device && showsPage ? "bg-[var(--zg-tray)]" : "bg-[var(--zg-bg)]"}`,
6098
6163
  children: [
6099
6164
  page?.loading && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "zg-browser-progress", "aria-hidden": true }),
6100
- showsPage ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserSlot, { sessionId }) : page?.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserError, { error: page.error, onReload: () => browserStore.navigate(sessionId, page.error.url) }) : page?.crashed === "gave-up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserCrashed, { onReload: () => browserStore.remount(sessionId) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserEmpty, { cwd, onOpen: (url) => browserStore.navigate(sessionId, url) })
6165
+ showsPage ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserSlot, { sessionId }) : page?.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserError, { error: page.error, onReload: () => browserStore.navigate(sessionId, page.error.url) }) : page?.crashed === "gave-up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserCrashed, { onReload: () => browserStore.remount(sessionId) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
6166
+ BrowserEmpty,
6167
+ {
6168
+ project: browserProjectKey(sessionId, cwd),
6169
+ onOpen: (url) => browserStore.navigate(sessionId, url)
6170
+ }
6171
+ )
6101
6172
  ]
6102
6173
  }
6103
6174
  ),
@@ -6385,7 +6456,7 @@ function BrowserMenu({
6385
6456
  checked: page.colorScheme === scheme.value,
6386
6457
  title: scheme.label,
6387
6458
  disabled: !live,
6388
- onClick: () => browserStore.update(page.sessionId, { colorScheme: scheme.value })
6459
+ onClick: () => browserStore.setEmulation(page.sessionId, { colorScheme: scheme.value })
6389
6460
  },
6390
6461
  scheme.value
6391
6462
  )) }),
@@ -6431,7 +6502,7 @@ function BrowserMenu({
6431
6502
  function DevicePanel({ page, close }) {
6432
6503
  const slot = useBrowserSlot(page.sessionId);
6433
6504
  const device = page.device;
6434
- const set2 = (next) => browserStore.update(page.sessionId, { device: next });
6505
+ const set2 = (next) => browserStore.setEmulation(page.sessionId, { device: next });
6435
6506
  const fitSize = () => responsiveDevice(
6436
6507
  clampDeviceSize((slot?.rect.width ?? 1024) - 32),
6437
6508
  clampDeviceSize((slot?.rect.height ?? 768) - 32)
@@ -6601,9 +6672,8 @@ function DevToolsDock({ sessionId }) {
6601
6672
  }) })
6602
6673
  ] });
6603
6674
  }
6604
- function BrowserEmpty({ cwd, onOpen }) {
6605
- const [, setRevision] = reactExports.useState(0);
6606
- const recent = recentBrowserPages(cwd);
6675
+ function BrowserEmpty({ project, onOpen }) {
6676
+ const recent = useRecentBrowserPages(project);
6607
6677
  const [servers, setServers] = reactExports.useState([]);
6608
6678
  const tabVisible = usePanelVisible();
6609
6679
  reactExports.useEffect(() => {
@@ -6642,10 +6712,7 @@ function BrowserEmpty({ cwd, onOpen }) {
6642
6712
  {
6643
6713
  entry,
6644
6714
  onOpen,
6645
- onRemove: () => {
6646
- removeRecentBrowserPage(cwd, entry.url);
6647
- setRevision((n) => n + 1);
6648
- }
6715
+ onRemove: () => removeRecentBrowserPage(project, entry.url)
6649
6716
  },
6650
6717
  entry.url
6651
6718
  )) }),
@@ -6844,7 +6911,8 @@ function useQueueActions(sessionId) {
6844
6911
  async (id, text) => {
6845
6912
  if (!sessionId) return;
6846
6913
  if (!queue?.pushNow) return;
6847
- appendUserPrompt(sessionId, text);
6914
+ const clientMessageId = queue.items(sessionId).get().find((m) => m.id === id)?.clientMessageId;
6915
+ appendUserPrompt(sessionId, text, void 0, void 0, clientMessageId);
6848
6916
  try {
6849
6917
  const delivered = await queue.pushNow(sessionId, id);
6850
6918
  if (delivered === "queued") dropPendingEcho(sessionId, text);
@@ -6959,8 +7027,8 @@ function SideTab({ parentId, cwd }) {
6959
7027
  }
6960
7028
  );
6961
7029
  }
6962
- const DesktopDiffsTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-DWQZlQfx.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.DesktopDiffsTab })));
6963
- const DesktopFilesTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-DWQZlQfx.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.DesktopFilesTab })));
7030
+ const DesktopDiffsTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-CUVbBbPB.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.DesktopDiffsTab })));
7031
+ const DesktopFilesTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-CUVbBbPB.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.DesktopFilesTab })));
6964
7032
  const KEEP_ALIVE = /* @__PURE__ */ new Set([
6965
7033
  ARTIFACTS_PANEL_ID,
6966
7034
  BROWSER_PANEL_ID,
@@ -7217,6 +7285,16 @@ function Center(props) {
7217
7285
  );
7218
7286
  const budget = useLayoutBudget();
7219
7287
  const overlayInset = budget.panelMode === "overlay" && !budget.panelHidden ? budget.panelWidth : 0;
7288
+ const { hidePanel } = budget;
7289
+ const hidePanelOnRelease = reactExports.useCallback(() => {
7290
+ const hide = () => {
7291
+ window.removeEventListener("pointerup", hide, true);
7292
+ window.removeEventListener("pointercancel", hide, true);
7293
+ hidePanel();
7294
+ };
7295
+ window.addEventListener("pointerup", hide, true);
7296
+ window.addEventListener("pointercancel", hide, true);
7297
+ }, [hidePanel]);
7220
7298
  const panelsHere = usePanelsHere(activeSession?.id ?? null);
7221
7299
  const scope = useActiveScope();
7222
7300
  const lightsInCenter = useSidebarCollapsed() || budget.sidebarForcedCollapsed;
@@ -7264,7 +7342,7 @@ function Center(props) {
7264
7342
  {
7265
7343
  className: "zg-chat-column flex-1 min-w-0 flex flex-col h-full",
7266
7344
  style: { paddingRight: overlayInset },
7267
- onPointerDownCapture: overlayInset > 0 ? budget.hidePanel : void 0,
7345
+ onPointerDownCapture: overlayInset > 0 ? hidePanelOnRelease : void 0,
7268
7346
  inert: cornerShown && corner.expanded || void 0,
7269
7347
  children: [
7270
7348
  activeSessionId !== null && activeSession === null ? (
@@ -7368,7 +7446,6 @@ ${update.error ?? ""}`.trimEnd() : `Upgrade to Zidane ${label}.`;
7368
7446
  };
7369
7447
  return { kind, label, title, run };
7370
7448
  }
7371
- const nativeConfirm = async ({ title }) => window.confirm(title);
7372
7449
  function DesktopDaemonMenu() {
7373
7450
  const presence = usePresenceMap();
7374
7451
  let running = 0;
@@ -7379,6 +7456,7 @@ function DesktopDaemonMenu() {
7379
7456
  }
7380
7457
  const { settings, setSetting } = useSettings();
7381
7458
  const { sessionRefs, setActiveSessionId } = useSessions();
7459
+ const confirm = useOptionalConfirm();
7382
7460
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
7383
7461
  DaemonMenu,
7384
7462
  {
@@ -7388,7 +7466,7 @@ function DesktopDaemonMenu() {
7388
7466
  onOpenSession: (sessionId) => setActiveSessionId(sessionId),
7389
7467
  daemonMode: settings.useDaemon,
7390
7468
  onDaemonModeChange: (on2) => setSetting("useDaemon", on2),
7391
- confirm: nativeConfirm
7469
+ ...confirm ? { confirm } : {}
7392
7470
  }
7393
7471
  );
7394
7472
  }
@@ -7443,6 +7521,7 @@ function Sidebar({ onNewSession, hasAuth, onOpenAuth, onOpenSettings }) {
7443
7521
  const collapsed = useSidebarCollapsed();
7444
7522
  const {
7445
7523
  sessions,
7524
+ allSessions,
7446
7525
  activeSessionId,
7447
7526
  setActiveSessionId,
7448
7527
  renameSession,
@@ -7503,9 +7582,11 @@ function Sidebar({ onNewSession, hasAuth, onOpenAuth, onOpenSettings }) {
7503
7582
  const projectHome = settings.projectHome === true;
7504
7583
  const homeProject = useHomeProject();
7505
7584
  const onNewSessionOrFocus = reactExports.useCallback(() => {
7585
+ const active = activeSessionId == null ? void 0 : allSessions.find((s) => s.id === activeSessionId);
7586
+ if (active) requestDraftLike(active, setDefaultFolder);
7506
7587
  if (!(homeProject && activeSessionId == null)) onNewSessionRef.current();
7507
7588
  requestComposerFocus();
7508
- }, [homeProject, activeSessionId, requestComposerFocus]);
7589
+ }, [homeProject, activeSessionId, allSessions, setDefaultFolder, requestComposerFocus]);
7509
7590
  const chatsOpen = useChatDraft();
7510
7591
  const onOpenChats = reactExports.useCallback(() => {
7511
7592
  requestFolderlessDraft();
@@ -8009,7 +8090,16 @@ function DesktopKeybindingsSection() {
8009
8090
  }
8010
8091
  function DesktopHostsSection() {
8011
8092
  const confirm = useConfirm();
8012
- return /* @__PURE__ */ jsxRuntimeExports.jsx(HostsSection, { confirm });
8093
+ const { settings, setSetting } = useSettings();
8094
+ const place = readNewChatPlace(settings.defaultPlace);
8095
+ const newChats = {
8096
+ hostId: place && place.hostId !== LOCAL_HOST_KEY ? place.hostId : null,
8097
+ set: (host2, on2) => setSetting(
8098
+ "defaultPlace",
8099
+ on2 ? { hostId: host2.id, hostName: host2.name, ...host2.url ? { hostUrl: host2.url } : {} } : null
8100
+ )
8101
+ };
8102
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(HostsSection, { confirm, newChats });
8013
8103
  }
8014
8104
  const PanelPage = reactExports.memo(function PanelPage2({
8015
8105
  id,
@@ -8148,7 +8238,16 @@ const SectionsPage = reactExports.memo(function SectionsPage2({
8148
8238
  ) : void 0,
8149
8239
  rowExtra: server && syncStatus?.source ? (key2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SyncMarker, { hostId: server.id, status: syncStatus, settingKey: key2 }) : void 0,
8150
8240
  customRows: {
8151
- agentDefaults: () => /* @__PURE__ */ jsxRuntimeExports.jsx(AgentDefaultsRows, { value: agentDefaults, onChange: setAgentDefaults, cwd }),
8241
+ agentDefaults: () => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
8242
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AgentDefaultsRows, { value: agentDefaults, onChange: setAgentDefaults, cwd }),
8243
+ !server && /* @__PURE__ */ jsxRuntimeExports.jsx(
8244
+ NewChatPlaceRow,
8245
+ {
8246
+ value: readNewChatPlace(settings.defaultPlace),
8247
+ onClear: () => setSetting("defaultPlace", null)
8248
+ }
8249
+ )
8250
+ ] }),
8152
8251
  textModel: () => /* @__PURE__ */ jsxRuntimeExports.jsx(
8153
8252
  TextModelRow,
8154
8253
  {
@@ -8349,14 +8448,7 @@ function SettingsModal({ initialHostId, ...props }) {
8349
8448
  onClose: props.onClose,
8350
8449
  aside: { nav: null },
8351
8450
  headerActions: switcher,
8352
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
8353
- "p",
8354
- {
8355
- className: "zg-screen-column px-6 pt-4 text-[13px] text-[var(--zg-text-muted)]",
8356
- role: error ? "alert" : void 0,
8357
- children: error ? `Couldn't read ${server.name}'s settings: ${error}` : `Reading ${server.name}'s settings…`
8358
- }
8359
- )
8451
+ children: error ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "zg-screen-column px-6 pt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Notice, { tone: "error", detail: error, children: `Couldn't read ${server.name}'s settings.` }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "zg-screen-column px-6 pt-4 text-[13px] text-[var(--zg-text-muted)]", children: `Reading ${server.name}'s settings…` })
8360
8452
  }
8361
8453
  ),
8362
8454
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(PathDisplayScope, { hostId: server.id, children: body })
@@ -8425,6 +8517,8 @@ function SettingsBody({
8425
8517
  frame.headerActions,
8426
8518
  switcher
8427
8519
  ] }),
8520
+ narrowPane: frame.pane === "nav" ? "aside" : "main",
8521
+ onNarrowBack: frame.onShowNav,
8428
8522
  children: frame.children
8429
8523
  }
8430
8524
  ),
@@ -8649,7 +8743,7 @@ function createSettingsEditorPrefs(options) {
8649
8743
  const notify2 = () => {
8650
8744
  for (const l of [...listeners2]) l();
8651
8745
  };
8652
- const remember2 = (next) => {
8746
+ const remember = (next) => {
8653
8747
  try {
8654
8748
  cache.setItem(EDITOR_STORAGE_KEY, JSON.stringify(next));
8655
8749
  } catch {
@@ -8660,7 +8754,7 @@ function createSettingsEditorPrefs(options) {
8660
8754
  const next = fromSettings(editor) ?? DEFAULT_EDITOR;
8661
8755
  if (same(state2, next)) return;
8662
8756
  state2 = next;
8663
- remember2(next);
8757
+ remember(next);
8664
8758
  notify2();
8665
8759
  };
8666
8760
  const persist = (next) => {
@@ -8716,7 +8810,7 @@ function createSettingsEditorPrefs(options) {
8716
8810
  const next = { ...prev, ...update, version: 1 };
8717
8811
  if (same(prev, next)) return;
8718
8812
  state2 = next;
8719
- remember2(next);
8813
+ remember(next);
8720
8814
  notify2();
8721
8815
  persist(next);
8722
8816
  },
@@ -9152,7 +9246,7 @@ const HostedPage = reactExports.memo(({ page }) => {
9152
9246
  if (frame) lastSize.current = { width: frame.rect.width, height: frame.rect.height };
9153
9247
  const scale = frame?.scale ?? lastScale.current;
9154
9248
  lastScale.current = scale;
9155
- useEmulation(page, scale);
9249
+ useSlotSize(page.sessionId, slot);
9156
9250
  const style = frame ? { position: "fixed", ...frame.rect, zIndex: PAGE_Z, ...page.device ? DEVICE_EDGE : {} } : page.driving ? { position: "fixed", left: 0, top: 0, ...lastSize.current, zIndex: -1, pointerEvents: "none" } : { position: "fixed", left: -1e5, top: 0, ...lastSize.current, zIndex: PAGE_Z, pointerEvents: "none" };
9157
9251
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "zg-browser-page", "data-session-id": page.sessionId, style, children: [
9158
9252
  partition && page.initialUrl && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -9171,15 +9265,9 @@ const HostedPage = reactExports.memo(({ page }) => {
9171
9265
  const DEVICE_EDGE = {
9172
9266
  boxShadow: "0 0 0 1px var(--zg-hairline), 0 10px 30px rgb(0 0 0 / 0.18)"
9173
9267
  };
9174
- const DEVICE_MARGIN = 16;
9175
9268
  function deviceFrame(slot, device) {
9176
9269
  if (!device) return { rect: slot, scale: 1 };
9177
- const room = {
9178
- width: Math.max(1, slot.width - DEVICE_MARGIN * 2),
9179
- height: Math.max(1, slot.height - DEVICE_MARGIN * 2)
9180
- };
9181
- const scale = Math.min(1, room.width / device.width, room.height / device.height);
9182
- const rounded = Math.max(0.05, Math.floor(scale * 100) / 100);
9270
+ const rounded = deviceFit(slot, device);
9183
9271
  const width = Math.round(device.width * rounded);
9184
9272
  const height = Math.round(device.height * rounded);
9185
9273
  return {
@@ -9192,26 +9280,13 @@ function deviceFrame(slot, device) {
9192
9280
  scale: rounded
9193
9281
  };
9194
9282
  }
9195
- function useEmulation(page, scale) {
9196
- const touched = reactExports.useRef(false);
9197
- const { webContentsId, colorScheme, device } = page;
9283
+ function useSlotSize(sessionId, slot) {
9284
+ const width = slot?.visible ? slot.rect.width : null;
9285
+ const height = slot?.visible ? slot.rect.height : null;
9198
9286
  reactExports.useEffect(() => {
9199
- if (webContentsId === null) return;
9200
- if (!touched.current && colorScheme === "system" && !device) return;
9201
- touched.current = true;
9202
- const emulation = {
9203
- colorScheme,
9204
- device: device ? {
9205
- width: device.width,
9206
- height: device.height,
9207
- dpr: device.dpr,
9208
- mobile: device.mobile,
9209
- userAgent: device.userAgent,
9210
- scale
9211
- } : null
9212
- };
9213
- window.api.browser.emulate(page.sessionId, emulation).catch(() => false);
9214
- }, [page.sessionId, webContentsId, colorScheme, device, scale]);
9287
+ if (width === null || height === null) return;
9288
+ window.api.browser.slotSize(sessionId, { width, height }).catch(() => void 0);
9289
+ }, [sessionId, width, height]);
9215
9290
  }
9216
9291
  function AgentLayer({ page, scale }) {
9217
9292
  const pointer = page.pointer;
@@ -9347,6 +9422,7 @@ function BrowserRequests() {
9347
9422
  latest.current = { sessions, activeSessionId, panels, enabled, autoShow };
9348
9423
  const shownThisRun = reactExports.useRef(/* @__PURE__ */ new Set());
9349
9424
  const running = useSessionRunning(activeSessionId);
9425
+ reactExports.useEffect(() => loadBrowserState().stop, []);
9350
9426
  reactExports.useEffect(() => {
9351
9427
  if (running && activeSessionId) shownThisRun.current.delete(activeSessionId);
9352
9428
  }, [running, activeSessionId]);
@@ -9453,39 +9529,6 @@ function TerminalHostProvider({ children }) {
9453
9529
  }
9454
9530
  );
9455
9531
  }
9456
- function createElectronSidebarHost(api) {
9457
- return {
9458
- revealPath: async (path) => {
9459
- await api.system.revealPath(path);
9460
- },
9461
- openWindow: async (sessionId, mode) => {
9462
- await api.windows.open(sessionId, mode);
9463
- },
9464
- environment: {
9465
- actions: (sessionId) => api.sessions.environmentActions(sessionId),
9466
- run: (sessionId, actionId) => api.sessions.runEnvironmentAction(sessionId, actionId),
9467
- retry: (sessionId) => api.sessions.retryEnvironment(sessionId)
9468
- },
9469
- openHostSettings: async (hostId) => {
9470
- api.openHostSettings(hostId);
9471
- }
9472
- };
9473
- }
9474
- let hostSettingsOpener = null;
9475
- function setHostSettingsOpener(open) {
9476
- hostSettingsOpener = open;
9477
- }
9478
- const windowApi$1 = {
9479
- system: { revealPath: (path) => window.api.system.revealPath(path) },
9480
- windows: { open: (sessionKey2, parts) => window.api.windows.open(sessionKey2, parts) },
9481
- sessions: {
9482
- environmentActions: (id) => window.api.sessions.environmentActions(id),
9483
- runEnvironmentAction: (id, actionId) => window.api.sessions.runEnvironmentAction(id, actionId),
9484
- retryEnvironment: (id) => window.api.sessions.retryEnvironment(id)
9485
- },
9486
- openHostSettings: (hostId) => hostSettingsOpener?.(hostId)
9487
- };
9488
- const sidebarHost = createElectronSidebarHost(windowApi$1);
9489
9532
  const standalone = windowRole.kind === "session";
9490
9533
  const ChatColumn = reactExports.memo(Center);
9491
9534
  function closeStandaloneConversation() {
@@ -9506,6 +9549,7 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
9506
9549
  activeSessionId,
9507
9550
  setActiveSessionId,
9508
9551
  defaultFolder,
9552
+ setDefaultFolder,
9509
9553
  refresh: refreshSessions,
9510
9554
  setDefaultModel,
9511
9555
  deleteSession,
@@ -9778,6 +9822,7 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
9778
9822
  toggleSidebar,
9779
9823
  openMainSession,
9780
9824
  newSession: () => {
9825
+ if (activeSession) requestDraftLike(activeSession, setDefaultFolder);
9781
9826
  setActiveSessionId(null);
9782
9827
  setNewSessionFocus((n) => n + 1);
9783
9828
  }
@@ -9815,6 +9860,7 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
9815
9860
  openUsagePanel,
9816
9861
  openMainSession,
9817
9862
  setActiveSessionId,
9863
+ setDefaultFolder,
9818
9864
  openKeybindings,
9819
9865
  palette.toggle,
9820
9866
  openRunningWork,
@@ -9862,6 +9908,13 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
9862
9908
  setHostSettingsOpener((hostId) => openSettings("hosts", hostSettingsFocus(hostId)));
9863
9909
  return () => setHostSettingsOpener(null);
9864
9910
  }, [openSettings]);
9911
+ reactExports.useEffect(() => {
9912
+ setMachinesNewChat((hostId, machine) => {
9913
+ closeModal();
9914
+ requestNewDraft({ hostId, ...machine ? { machine: { id: machine, name: machine } } : {} });
9915
+ });
9916
+ return () => setMachinesNewChat(null);
9917
+ }, [closeModal]);
9865
9918
  const openEnvironmentSettings = reactExports.useCallback(() => openSettings("environments"), [openSettings]);
9866
9919
  const regionKey = scope ? scopeKey(scope) : null;
9867
9920
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(LayoutProvider, { scope, children: [
@@ -10003,7 +10056,14 @@ function createElectronSessionHost(api, onStreamSignal2, onSettingsWritten) {
10003
10056
  queue: {
10004
10057
  items: queue.items,
10005
10058
  refresh: queue.refresh,
10006
- add: async (sessionId, text, options) => (await api.queue.add(key(sessionId), text, options?.activatedSkills, options?.attachments, options?.delivery)).delivered,
10059
+ add: async (sessionId, text, options) => (await api.queue.add(
10060
+ key(sessionId),
10061
+ text,
10062
+ options?.activatedSkills,
10063
+ options?.attachments,
10064
+ options?.delivery,
10065
+ crypto.randomUUID()
10066
+ )).delivered,
10007
10067
  remove: queue.drop,
10008
10068
  update: queue.edit,
10009
10069
  attachments: (sessionId, id) => api.queue.attachments(key(sessionId), id).catch(() => null),
@@ -10343,12 +10403,20 @@ function createElectronChatHost(api, streams, options = {}) {
10343
10403
  const { store: store2 } = streams;
10344
10404
  const cleanup = [];
10345
10405
  const ownRows = options.sessions ? null : writable([]);
10406
+ const rowChanges = createRecentChanges();
10346
10407
  let rowsStarted = false;
10347
10408
  const startRows = () => {
10348
10409
  if (!ownRows || rowsStarted) return;
10349
10410
  rowsStarted = true;
10350
10411
  void refresh().catch(onError);
10351
- cleanup.push(api.sessions.onChanged(() => void refresh().catch(onError)));
10412
+ cleanup.push(
10413
+ api.sessions.onChanged((signal) => {
10414
+ const row = signal.op === "delete" ? null : signal.row;
10415
+ if (row === void 0) return;
10416
+ ownRows.set((all) => withRow(all, signal.sessionId, row));
10417
+ rowChanges.note(signal.sessionId, row);
10418
+ })
10419
+ );
10352
10420
  };
10353
10421
  const rows2 = options.sessions ?? {
10354
10422
  get() {
@@ -10361,13 +10429,22 @@ function createElectronChatHost(api, streams, options = {}) {
10361
10429
  }
10362
10430
  };
10363
10431
  const refresh = async () => {
10364
- if (ownRows) ownRows.set(await api.sessions.list({ archive: "all" }));
10432
+ if (!ownRows) return;
10433
+ const reading = rowChanges.begin();
10434
+ try {
10435
+ const listed = await api.sessions.list({ archive: "all" });
10436
+ ownRows.set(
10437
+ rowChanges.end(reading, listed, (list2, row, id) => withRow(list2, id, row))
10438
+ );
10439
+ } finally {
10440
+ rowChanges.drop(reading);
10441
+ }
10365
10442
  };
10366
10443
  const patchRow = (sessionId, patch) => ownRows?.set((all) => all.map((s) => s.id === sessionId ? { ...s, ...patch } : s));
10367
10444
  const hydrate = async (sessionId) => {
10368
10445
  const version = store2.runStateVersion;
10369
10446
  const [page, running] = await Promise.all([api.sessions.loadEvents(sessionId), api.chat.isRunning(sessionId)]);
10370
- if (!store2.isHydrated(sessionId)) store2.setEventsPage(sessionId, page);
10447
+ if (!store2.isHydrated(sessionId)) streams.setEventsPage(sessionId, page);
10371
10448
  if (running && store2.runStateVersion === version) store2.markRunning(sessionId);
10372
10449
  };
10373
10450
  const transcripts = /* @__PURE__ */ new WeakMap();
@@ -10496,7 +10573,7 @@ function createElectronChatHost(api, streams, options = {}) {
10496
10573
  );
10497
10574
  return response.results;
10498
10575
  },
10499
- onChanged: (listener) => api.sessions.onChanged((signal) => listener(signal.sessionId)),
10576
+ onChanged: (listener) => api.sessions.onChanged((signal) => listener(signal)),
10500
10577
  ...api.orchestration ? { main: () => api.orchestration.main() } : {},
10501
10578
  ...api.sidebar ? { views: electronSidebarViews(api.sidebar) } : {}
10502
10579
  },
@@ -10521,18 +10598,21 @@ function createElectronChatHost(api, streams, options = {}) {
10521
10598
  prompt2,
10522
10599
  activatedSkills ? [...activatedSkills] : void 0,
10523
10600
  toPromptAttachments(attachments ?? []),
10524
- delivery
10601
+ delivery,
10602
+ crypto.randomUUID()
10525
10603
  );
10526
10604
  return;
10527
10605
  }
10528
10606
  const echoed = echo !== false;
10529
- if (echoed) store2.appendUserPrompt(sessionId, prompt2, refs, withoutOriginals(attachments ?? []));
10607
+ const clientMessageId = crypto.randomUUID();
10608
+ if (echoed) store2.appendUserPrompt(sessionId, prompt2, refs, withoutOriginals(attachments ?? []), clientMessageId);
10530
10609
  try {
10531
10610
  await applyChoice(sessionId, model, thinking);
10532
10611
  const uploads = toPromptAttachments(attachments ?? []);
10533
10612
  await api.chat.send({
10534
10613
  sessionId,
10535
10614
  prompt: prompt2,
10615
+ clientMessageId,
10536
10616
  ...activatedSkills ? { activatedSkills: [...activatedSkills] } : {},
10537
10617
  ...uploads.length > 0 ? { attachments: uploads } : {},
10538
10618
  ...keepDraft ? { keepDraft: true } : {}
@@ -10578,6 +10658,10 @@ function createElectronChatHost(api, streams, options = {}) {
10578
10658
  }
10579
10659
  };
10580
10660
  }
10661
+ function withRow(rows2, sessionId, row) {
10662
+ if (row === null) return rows2.some((s) => s.id === sessionId) ? rows2.filter((s) => s.id !== sessionId) : rows2;
10663
+ return rows2.some((s) => s.id === row.id) ? rows2.map((s) => s.id === row.id ? row : s) : [row, ...rows2];
10664
+ }
10581
10665
  const onInvalidate = (topics, listener) => subscribeInvalidation(
10582
10666
  {
10583
10667
  topics,
@@ -10934,7 +11018,7 @@ const GUI_LABELS = {
10934
11018
  };
10935
11019
  const APP_RENDERERS = { attachmentLabel: codeAttachmentLabel };
10936
11020
  function AppProviders({ children }) {
10937
- return /* @__PURE__ */ jsxRuntimeExports.jsx(LabelsProvider, { labels: GUI_LABELS, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HostsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalsHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(StreamProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComposerHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PromptHistoryProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTurnProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilesHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PanelsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionsHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TerminalHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DesktopPaletteProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChatHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeybindingsProvider, { host: keybindingsHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(GitProvider, { host: gitHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarHostProvider, { host: sidebarHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptRenderersProvider, { value: APP_RENDERERS, children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) });
11021
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(LabelsProvider, { labels: GUI_LABELS, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NoticeStackProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HostsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalsHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(StreamProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComposerHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PromptHistoryProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTurnProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilesHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PanelsProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionsHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TerminalHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DesktopPaletteProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChatHostProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeybindingsProvider, { host: keybindingsHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(GitProvider, { host: gitHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarHostProvider, { host: sidebarHost, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptRenderersProvider, { value: APP_RENDERERS, children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) });
10938
11022
  }
10939
11023
  const HIGHLIGHTER = createCodeHighlighter(
10940
11024
  typeof WorkerWrapper$1 === "function" ? { createWorker: () => trackRendererWorker("Code highlighting", new WorkerWrapper$1()) } : {}
@@ -10968,7 +11052,7 @@ const subscribe = (listener) => {
10968
11052
  listeners.add(listener);
10969
11053
  return () => void listeners.delete(listener);
10970
11054
  };
10971
- const EditorWorkerPool = reactExports.lazy(() => __vitePreload(() => import("./EditorWorkers-CY0St-9O.js"), true ? __vite__mapDeps([2,1,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.EditorWorkerPool })));
11055
+ const EditorWorkerPool = reactExports.lazy(() => __vitePreload(() => import("./EditorWorkers-BgCbhgVz.js"), true ? __vite__mapDeps([2,1,3,4,5,6,7,8,9]) : void 0, import.meta.url).then((m) => ({ default: m.EditorWorkerPool })));
10972
11056
  function EditorWorkersHold() {
10973
11057
  const on2 = reactExports.useSyncExternalStore(
10974
11058
  subscribe,