zidane-gui 9.1.4 → 9.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +525 -142
- package/out/preload/index.mjs +28 -9
- package/out/renderer/assets/{43YPWK3Q-BLwohgFu.js → 43YPWK3Q-BVJpf1u1.js} +6 -6
- package/out/renderer/assets/{45MVAN6X-DCPmrh2y.js → 45MVAN6X-BWuIeWOc.js} +5 -5
- package/out/renderer/assets/{46GJKBLZ-n_NiMQEY.js → 46GJKBLZ-41BAHmt4.js} +10 -10
- package/out/renderer/assets/{63WH7YNF-B0-gnOSz.js → 63WH7YNF-DuatnhlB.js} +8 -8
- package/out/renderer/assets/{6DDU7VKX-BKAF5gyQ.js → 6DDU7VKX-BAI-vKC1.js} +6 -6
- package/out/renderer/assets/{CLQLV5VT-BIZsXon4.js → CLQLV5VT-CmHu2HE3.js} +6 -6
- package/out/renderer/assets/{CUSPXG5M-Donlp74Y.js → CUSPXG5M-DE3uzfbs.js} +6 -6
- package/out/renderer/assets/{CodeEditor-80QT2Pyq.js → CodeEditor-CIwCP1F_.js} +3 -3
- package/out/renderer/assets/{ComposerEditor-CXpNHoo1.js → ComposerEditor-leA8S_Yk.js} +2 -2
- package/out/renderer/assets/{D3L7O4X2-BCbmkNpB.js → D3L7O4X2-BZ4caDcX.js} +4 -4
- package/out/renderer/assets/{D5TW5CPZ-Bp-wetYa.js → D5TW5CPZ-BXdKc68h.js} +1 -1
- package/out/renderer/assets/{DiffsTab-Dy8a_hwG.js → DiffsTab-CyRIVfQk.js} +5 -5
- package/out/renderer/assets/{EGADTWYV-CqSrkc7g.js → EGADTWYV-Bf6Kicdv.js} +5 -5
- package/out/renderer/assets/{EOJSJZXM-BTI84tys.js → EOJSJZXM-NAa-K4U0.js} +8 -8
- package/out/renderer/assets/{EditorWorkers-Durn1REy.js → EditorWorkers-CY0St-9O.js} +4 -4
- package/out/renderer/assets/{FilesTab-h32FFVsw.js → FilesTab-CnRw0KCN.js} +111 -17
- package/out/renderer/assets/{G2OEIG6X-CS8YUqSL.js → G2OEIG6X-BarwxCkp.js} +5 -5
- package/out/renderer/assets/{GXJ2T77W-BHaQFzB4.js → GXJ2T77W-CyQVHlsG.js} +6 -6
- package/out/renderer/assets/{HX3UMAK7-DOOY2pSg.js → HX3UMAK7-BcoG4mYG.js} +5 -5
- package/out/renderer/assets/{IU7WZTP6-D7pwhQLH.js → IU7WZTP6-kOLrUSwF.js} +1 -1
- package/out/renderer/assets/{J5J2NR2G-SPjkbJgo.js → J5J2NR2G-DE-SGCIz.js} +4 -4
- package/out/renderer/assets/{JRCWTJEL-DT7JLR7k.js → JRCWTJEL-DZY5HKk0.js} +3 -3
- package/out/renderer/assets/{KHUP5TOH-BX0A2YHC.js → KHUP5TOH-DevvG2jY.js} +1 -1
- package/out/renderer/assets/{L74FQTH5-MbDLfIZo.js → L74FQTH5-CnOj-zIY.js} +4 -4
- package/out/renderer/assets/{LAV4ZXOS-ClHlsIHg.js → LAV4ZXOS-BATWssHi.js} +6 -6
- package/out/renderer/assets/{LBIZYCRR-DmofT7Vk.js → LBIZYCRR-BXTsyX1O.js} +7 -7
- package/out/renderer/assets/{LFFXNLRS-yLLLefJM.js → LFFXNLRS-BpnXEoXM.js} +3 -3
- package/out/renderer/assets/{LLLWOAQD-DNhT1-qV.js → LLLWOAQD-BjLHR3Pk.js} +1 -1
- package/out/renderer/assets/{LTYQZ5U5-BxUtiilS.js → LTYQZ5U5-CDOIyknV.js} +8 -8
- package/out/renderer/assets/{NDSCUZ25-DltJ5xGa.js → NDSCUZ25-Bl1idg0d.js} +2 -2
- package/out/renderer/assets/{NMN3IKWL-BXUYzi9o.js → NMN3IKWL-BYE2yrn3.js} +9 -9
- package/out/renderer/assets/{NMUA3R2D-CAVxt8OJ.js → NMUA3R2D-Xl410xeQ.js} +7 -7
- package/out/renderer/assets/{NY5A6PPW-B3P5KUoQ.js → NY5A6PPW-CkzCXBsB.js} +3 -3
- package/out/renderer/assets/{OHJ2EJXK-CKyEtj37.js → OHJ2EJXK-DCVoLmOH.js} +1 -1
- package/out/renderer/assets/{OU2GIT2H-i9HfUuBk.js → OU2GIT2H-DG4LbVmY.js} +4 -4
- package/out/renderer/assets/{PDMLSE6I-BnbSSXbG.js → PDMLSE6I-Cr8MjczD.js} +2 -2
- package/out/renderer/assets/{PJ7X32S5-Do_rplzd.js → PJ7X32S5-DFZu5Xsj.js} +5 -5
- package/out/renderer/assets/{RLLQ44NJ-SEvjKAya.js → RLLQ44NJ-D-LvBssh.js} +7 -7
- package/out/renderer/assets/{S6DWMCK5-CK9P5x9H.js → S6DWMCK5-BQEAXG2z.js} +8 -8
- package/out/renderer/assets/{STIOTUT7-KYZS5tvF.js → STIOTUT7-jszPNHGr.js} +6 -6
- package/out/renderer/assets/{SXSLPWUD-ylCpsia5.js → SXSLPWUD-CEMEDuKR.js} +2 -2
- package/out/renderer/assets/{TR4WJQGX-DXlqK6NQ.js → TR4WJQGX-8wGWCKKm.js} +1 -1
- package/out/renderer/assets/{UWRPUF3N-7_KSfEv0.js → UWRPUF3N-ONJaPLUk.js} +1 -1
- package/out/renderer/assets/{VSWIZJ7B-qmPn48eQ.js → VSWIZJ7B-DbkRTlJD.js} +1 -1
- package/out/renderer/assets/{WM7NR6YK-D4oWq6L3.js → WM7NR6YK-CFy2rge0.js} +4 -4
- package/out/renderer/assets/{WXKV2YEK-DsK-bqP8.js → WXKV2YEK-BFHYSpQF.js} +3 -3
- package/out/renderer/assets/{XLHPVVFU-4_9lhZe2.js → XLHPVVFU-BJFPh1Rn.js} +1 -1
- package/out/renderer/assets/{YNX532HU-C1DPijVc.js → YNX532HU-3QqofRh5.js} +5 -5
- package/out/renderer/assets/{YUPSMAUO-0pM5w-ie.js → YUPSMAUO-COLbQro8.js} +1 -1
- package/out/renderer/assets/{ZFRCZTLK-4EIJek0V.js → ZFRCZTLK-BuPbgRNC.js} +6 -6
- package/out/renderer/assets/{ZZDR4CN3-B_T2R-Zh.js → ZZDR4CN3-Do4onAxu.js} +4 -4
- package/out/renderer/assets/{core-2jWUG3m-.js → core-T80gwwf3.js} +2251 -1661
- package/out/renderer/assets/{file-tabs-DwqRIh1X.js → file-tabs-DWQZlQfx.js} +5 -5
- package/out/renderer/assets/{ghostty-web-DnI2p8KS.js → ghostty-web-DXNGAB4P.js} +1 -1
- package/out/renderer/assets/{highlights-6LT5DvBO.js → highlights-B0vcJ7-n.js} +2 -2
- package/out/renderer/assets/{highlights-DmxOEap0.js → highlights-Yvd7kpJw.js} +3 -3
- package/out/renderer/assets/{index-BnnCv70H.js → index-BbyDWT39.js} +465 -284
- package/out/renderer/assets/{index-C-Dal-Bp.css → index-CsOxRbAw.css} +186 -20
- package/out/renderer/assets/{kit-CdRTRA2T.js → kit-DgkO1_s6.js} +5641 -1986
- package/out/renderer/assets/{langs-D9nZatrh.js → langs-7bXaMxtL.js} +1 -1
- package/out/renderer/assets/{lazy-C1DShJVi.js → lazy-DE7xn_YD.js} +3 -3
- package/out/renderer/assets/{loader-BlmA-DDi.js → loader-CdKsI-e2.js} +1 -1
- package/out/renderer/assets/{pierre-theme-DpuLJ_93.js → pierre-theme-BouAfjrk.js} +7 -7
- package/out/renderer/assets/{shiki-RupN-xqP.js → shiki-CIKuDsHH.js} +3 -3
- package/out/renderer/assets/{stream-tokenizer-DLDzyMrK.js → stream-tokenizer-JLLsdqkH.js} +1 -1
- package/out/renderer/assets/{themes-B1aebwax.js → themes-mM7Qtyxf.js} +2 -2
- package/out/renderer/assets/{useDetachCleanup-BXvhEVk-.js → useDetachCleanup-1PVBQ1U4.js} +2 -2
- package/out/renderer/assets/{useFolderChanges-BHQktE6l.js → useFolderChanges-_vflCTEj.js} +144 -73
- package/out/renderer/index.html +4 -4
- package/package.json +2 -2
- package/scripts/app-installer.mjs +10 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./file-tabs-
|
|
2
|
-
import {
|
|
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";
|
|
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 { aj as createResourceStore, ak as useResource, al as readableResource, am as writable, an as keyedSettingsResources, ao as createSettingsResource, ap as toSettingsError, aq as settingsMcpServerOf, ar as createPresenceStore, as as createOnlineMachines, at as createMachineLists, au as lazyReadable, av as createHostSyncReads, aw as useSettingsHost, ax as SettingsProvider$1, ay as useSettings, ai as useReadable, az as PathDisplayProvider, aA as MachinesProvider, aB as createLayoutMemory, aC as useScopeLayout$1, aD as createDraftScopeStore, aE as draftScopeOf, aF as createRunMeter, aG as createSessionBadges, aH as createSessionActivity, aI as createRunEstimates, aJ as createCompactionProgress, aK as createTerminalStore, aL as usePeekSessionEvents, aM as useSessionStreamActions, aN as useIsSessionHydrated, aO as useSessionEvents$1, aP as useSessionEventsSelector$1, aQ as createSessionStreams, aR as SessionStreamsProvider, aS as RunEstimatesProvider, aT as useSessionStreams$1, aU as usePeekRunSeq$1, aV as usePeekSessionRunning, aW as useSessionRunning, aX as createSidebarViews, aY as createSessionDirectory, aZ as useSessionDirectoryView, a_ as useNewSessionDefaults, a$ as writePersisted, b0 as DEFAULT_SIDEBAR_LABELS, b1 as useCaptureRunState, b2 as pinnedSessions, b3 as useCycleAgent$1, b4 as createPanelFocusStore, b5 as pickTab, b6 as useWorkspaceView, b7 as useWorkspaceRequests, b8 as useWorkspaceContent, b9 as useExtensionPanels, ba as WorkspaceHostProvider, bb as WorkspaceProvider, bc as useWorkspaceActions, bd as createSidebarCollapsed, ah as useAppearanceState, be as LayoutBudgetProvider, bf as LIMITS, bg as useTurnCommands, bh as useTurnMenu$1, bi as createOpenTarget, bj as CommandScopeContext, bk as findCommand, bl as hasInteractionBody, bm as InteractionToolBody, bn as InlineChipText, bo as ProseMarkdown, bp as useTranscriptActions, bq as PromptEcho, br as createModelPickerPrefs, bs as ComposerHostProvider$1, bt as modelNamesOf, bu as useSelectTurn, bv as useTranscriptOptions, bw as useSessionRetry, bx as pushComposerPrompt, by as MarkdownContext, bz as TranscriptRenderersProvider, bA as TranscriptActionsProvider, bB as PathDisplayScope, bC as Transcript, bD as TranscriptSearch$1, bE as useSessionPresence$1, bF as usePresenceMap$1, bG as createSidebarLive, bH as useSessionApprovalHead, bI as useInteractionHead, bJ as useRunElapsedSec, bK as ZidaneUiExtensionsKit, bL as ZidaneUiExtensions, bM as EXTENSION_TOKENS, bN as ExtensionsHostError, bO as createUiEffectChannel, bP as createDialogQueue, bQ as sidebarContributionsOf, bR as ExtensionsProvider, bS as useProjectIcons, bT as useConfirmDeleteSession, bU as useMoveSession, bV as basename, bW as useSessionMenuItems, bX as SessionListRow, bY as moveSubject, bZ as useWorkspaceHost, b_ as useLinkRouter, b$ as PanelSessionRowProvider, c0 as ProjectHome, c1 as ProjectIconGlyph, c2 as WelcomeScreen$1, c3 as modelKnobsOf, c4 as commitModelPick$1, c5 as createStorageBoot, c6 as createStorageAppearancePrefs, c7 as codeThemeTypeOf, c8 as constant, c9 as EFFORT_LEVELS, ca as BUILTIN_THEMES, cb as useModal, cc as useAppearance, cd as OnboardingProvider, ce as OnboardingFlow, cf as createSiteIcons, cg as useEnvironmentChoices, ch as BranchMenu$1, ci as GitBar$1, cj as createKeybindingOverrides, ck as useSessionFallbackModel, cl as getMergedKeybindings, K as KeyHint, cm as ComposerStatusPills, cn as ComposerControls, co as RetryPill, cp as useLayoutBudgetOptional, cq as ConversationBadges$1, cr as hostReachable, cs as useLentServers, ct as ServerOfflineBanner, cu as ArchivedBanner, cv as HostRemovedBanner, cw as ComposerNotice, cx as ConnectProviderCard, cy as ComposerDock, cz as SelectTurnHint, cA as ApprovalDock, cB as ErrorBoundary, cC as RichComposer, cD as codeAttachmentLabel, cE as WherePicker, cF as RemoteFolderPicker, cG as ServerScopeToggle, cH as ScopeToggle, cI as MachineWaitingBanner, U as Tooltip, V as IconButton, cJ as useSidebarHost, cK as useSidebarLabels, cL as useEnvironmentCommands, cM as useEnvironmentActions, cN as sessionMenuItems, cO as useReferenceMatches, cP as SessionHeader$1, cQ as HostStatusDot, cR as ReferenceText, cS as useComposerSearch$1, cT as createSideRequests, cU as DEFAULT_SESSION_LABELS, cV as useSendPrompt$1, cW as useSessionHost, cX as useSessionPage, cY as useTranscriptScroll$1, cZ as useSessionMeters, c_ as useDraftTarget, c$ as useSettledReveal, d0 as LoadEarlierRow, d1 as SearchHighlightStyle, d2 as ArtifactsPanel$1, d3 as BTN_SECONDARY, d4 as BTN_PRIMARY, b as pushComposerAttachment, c as textAttachment, d5 as focusComposer, n as usePanelVisible, d6 as subscribeLayoutAnimating, d7 as isLayoutAnimating, d8 as useSiteIcon, d9 as useKeybindings, da as usePaletteSource, db as NavButton, dc as AddressBar, dd as Popover, de as SectionLabel, df as MenuRow, dg as Menu, dh as MenuSection, di as MenuSeparator, dj as relativeTime, R as RowActionsMenu, dk as InboxPanel, dl as attachmentLightboxItems, dm as AttachmentRow, dn as QueueTab$1, dp as SideChat, dq as HostModelPicker, dr as HostModelOptionsPicker, ds as TerminalPanelTab, dt as TodosPanel, du as PanelContentView, dv as useLayoutBudget, dw as panelCornerWidth, dx as PanelCorner, dy as countArtifacts, dz as useSessionArtifacts, dA as splitPanelWidth, dB as SidePanel$1, dC as TAB_REGION_PROPS, dD as panelDragResult, dE as TerminalDrawer, dF as SidebarFooter, dG as SidebarSignInPrompt, dH as DaemonMenu, dI as useProviderUsage, dJ as SidebarUsageIndicator, dK as useCompactionProgress, dL as Presence, dM as SidebarCompactingIndicator, dN as useProjectSessionActions, dO as SpaceSwitcher, dP as SessionSidebar, dQ as useSaveViewAsSpace, dR as SidebarFilterMenu, dS as ExtensionSlot, dT as CreateExtensionDialog, dU as useTerminalsEnabled, dV as useTerminalStore, dW as useScopeTerminals, dX as RunningWorkDialog, dY as renderSessionModalShell, dZ as useAgentProfiles$1, d_ as useConfirm, d$ as useSessionCacheReport, e0 as useColors, e1 as useDisplayPath, e2 as compactPath, e3 as SessionDetailsDialog, e4 as renderWideSessionModalShell, e5 as SessionCacheFacts, e6 as deleteSessionPrompt, e7 as useExtensionsHost, e8 as extensionsErrorOf, e9 as BTN_LG_SECONDARY, ea as SettingsTutorial, eb as McpSection, ec as ServerProvidersSection, ed as ProvidersSection, ee as ExtensionsSection, ef as SkillsSection, eg as InstructionsSection, eh as KeybindingsSection, ei as EditorSection, ej as AppearanceSection, ek as HostCatalogSection, el as PluginsSection, em as PerformanceSection, en as LogsSection, eo as EnvironmentsSection, ep as HostsSection, eq as ROW_BUTTON_CLASS, er as RowText, es as useSettingsSection, et as useServerSyncStatus, eu as agentDefaultsOf, ev as SettingsRowsPage, ew as SpacesDefaultsSection, ex as ConversationPresetsRow, ey as CompactionModelRow, ez as DecisionModelRow, eA as TextModelRow, eB as AgentDefaultsRows, eC as SyncMarker, eD as ApprovalModeRow, eE as agentDefaultsPatch, eF as settingsPageCounts, eG as listLength, eH as KEYBINDING_ROW_COUNT, eI as SegmentSpinner, eJ as SettingsHostSwitcher, eK as ScreenShell, eL as visiblePages, eM as useExtensionSettingsSections, eN as layoutSections, eO as SettingsHeadingText, eP as SettingsShell, eQ as UsagePanel, eR as TurnDetailsDialog, eS as usePanelGroupHandlers$1, eT as InboxAttention$1, eU as TodosAttention$1, eV as QueueAttention$1, eW as PerformanceHud, eX as DEFAULT_EDITOR, eY as EDITOR_STORAGE_KEY, eZ as parseEditor, e_ as createPaletteRows, e$ as usePaletteHost, f0 as usePaletteLabels, f1 as useSessionRank, f2 as sessionsSource, f3 as conversationsSource, f4 as useActionsPaletteSource, f5 as panelsSource, f6 as spacesSource, f7 as commandsSource, f8 as useImportRepo, f9 as repoSource, fa as filesSource, fb as settingsSource, fc as prefsSource, fd as extensionsSource, fe as setupSource, ff as usePaletteModalSlot, fg as PaletteDialog, fh as pushComposerInsert, fi as useExtensionEffects, fj as ExtensionDialogHost, fk as matchesBinding, fl as registerTabScope, fm as serializeTerminalExcerpt, fn as hasComposerFor, fo as TerminalProvider, fp as ModalProvider, fq as KeyCommandsProvider, fr as useSessionContextStatus, fs as useProviderReadyPoll, ft as useClaudeImportAvailable, fu as AgentPickerDialog, fv as effortPickerTarget, fw as EffortPickerDialog, fx as createSessionActions, fy as useHelpKey, fz as useTranscriptFind, fA as ModelPickerDialog, fB as usePaletteActions, fC as useWorkspaceKeyCommands, fD as useMainSession, fE as useSelectTurnKeys, fF as zoomKeyCommands, fG as sessionKeyCommands, fH as useKeyCommands, fI as ClaudeImportDialog, fJ as SafelistPanel, fK as ModalShell, fL as SidebarToggleButton, fM as hostSettingsFocus, fN as createPendingApprovals, fO as createSafelist, fP as ApprovalsProvider, fQ as createRunningWorkState, fR as createArtifactsState, fS as createQueueState, fT as createTodosState, fU as SessionProvider, fV as ProviderUsageProvider, fW as FilesProvider, fX as createChatBlockRuns, fY as ChatProvider, fZ as useHasFocusedComposer, f_ as hasFocusedComposer, d as pushComposerMention, f$ as OpenSessionContext, g0 as BadgeMenuProvider, g1 as createStorageRecents, g2 as PaletteProvider, g3 as WorkerWrapper, g4 as LabelsProvider, g5 as PromptHistoryProvider, g6 as SelectTurnProvider, g7 as KeybindingsProvider, g8 as GitProvider, g9 as SidebarHostProvider, ga as useShikiTheme, T as useEditorPrefs, gb as CodeHighlightProvider, gc as CodeWrapProvider, gd as createCodeHighlighter, ge as WorkerWrapper$1, gf as AppearanceProvider, gg as EditorEnvironmentRoot, gh as configureErrorReports, gi as installRendererErrorHandlers, gj as watchRuntimeIcons, gk as reportRendererError, G as buttonClass, gl as readMotionMs, gm as crispPhosphor } from "./kit-CdRTRA2T.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";
|
|
6
6
|
import "./vendor-motion-BgQeucLF.js";
|
|
7
7
|
import "./vendor-editor-Cx3SvGyZ.js";
|
|
8
8
|
const LOCAL_SESSION_HOST = LOCAL_HOST_KEY;
|
|
@@ -57,13 +57,13 @@ function scopeOfSession(row) {
|
|
|
57
57
|
}
|
|
58
58
|
let health = "disconnected";
|
|
59
59
|
let wired$1 = false;
|
|
60
|
-
const listeners$
|
|
60
|
+
const listeners$7 = /* @__PURE__ */ new Set();
|
|
61
61
|
function set$2(next) {
|
|
62
62
|
if (health === next) {
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
health = next;
|
|
66
|
-
for (const listener of listeners$
|
|
66
|
+
for (const listener of listeners$7) {
|
|
67
67
|
listener();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -77,9 +77,9 @@ function wire$1() {
|
|
|
77
77
|
}
|
|
78
78
|
function subscribe$5(listener) {
|
|
79
79
|
wire$1();
|
|
80
|
-
listeners$
|
|
80
|
+
listeners$7.add(listener);
|
|
81
81
|
return () => {
|
|
82
|
-
listeners$
|
|
82
|
+
listeners$7.delete(listener);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function getSnapshot$1() {
|
|
@@ -832,6 +832,7 @@ function createElectronMachinesHost(api) {
|
|
|
832
832
|
},
|
|
833
833
|
pickFolder: () => api.folder.pick(),
|
|
834
834
|
capabilities: (hostId, opts) => api.hosts.capabilities(hostId, opts?.refresh === true).catch(rejected("read")),
|
|
835
|
+
installTool: (hostId, name) => api.hosts.installTool(hostId, name).catch(rejected("install")),
|
|
835
836
|
updates: {
|
|
836
837
|
status: (hostId) => api.hosts.selfUpdate(hostId, "status").catch(rejected("update")),
|
|
837
838
|
check: async (hostId) => await api.hosts.selfUpdate(hostId, "check").catch(rejected("update")),
|
|
@@ -872,7 +873,7 @@ function createElectronMachinesHost(api) {
|
|
|
872
873
|
}
|
|
873
874
|
};
|
|
874
875
|
}
|
|
875
|
-
const noop
|
|
876
|
+
const noop = () => void 0;
|
|
876
877
|
const windowApi$5 = {
|
|
877
878
|
hosts: {
|
|
878
879
|
// A failed backfill keeps the pushed statuses (This computer alone until the next push).
|
|
@@ -885,7 +886,8 @@ const windowApi$5 = {
|
|
|
885
886
|
remove: (id) => window.api.hosts.remove(id),
|
|
886
887
|
retry: (id) => window.api.hosts.retry(id),
|
|
887
888
|
selfUpdate: (hostId, action, enabled) => window.api.hosts.selfUpdate(hostId, action, enabled),
|
|
888
|
-
capabilities: (hostId, refresh) => window.api.hosts.capabilities(hostId, refresh)
|
|
889
|
+
capabilities: (hostId, refresh) => window.api.hosts.capabilities(hostId, refresh),
|
|
890
|
+
installTool: (hostId, name) => window.api.hosts.installTool(hostId, name)
|
|
889
891
|
},
|
|
890
892
|
machines: {
|
|
891
893
|
links: () => window.api.machines.links(),
|
|
@@ -895,8 +897,8 @@ const windowApi$5 = {
|
|
|
895
897
|
shareStart: (hostId, name, roots, token) => window.api.machines.shareStart(hostId, name, roots, token),
|
|
896
898
|
shareStop: (hostId) => window.api.machines.shareStop(hostId),
|
|
897
899
|
useServer: (hostId, enabled) => window.api.machines.useServer(hostId, enabled),
|
|
898
|
-
onLinks: (cb) => window.api.machines?.onLinks?.(cb) ?? noop
|
|
899
|
-
onStatus: (cb) => window.api.machines?.onStatus?.(cb) ?? noop
|
|
900
|
+
onLinks: (cb) => window.api.machines?.onLinks?.(cb) ?? noop,
|
|
901
|
+
onStatus: (cb) => window.api.machines?.onStatus?.(cb) ?? noop
|
|
900
902
|
},
|
|
901
903
|
folder: { pick: () => window.api.folder.pick() },
|
|
902
904
|
daemon: {
|
|
@@ -1614,6 +1616,12 @@ function electronSidebarViews(api = window.api.sidebar) {
|
|
|
1614
1616
|
setSpace: (spaceId) => api.setSpace(spaceId)
|
|
1615
1617
|
};
|
|
1616
1618
|
}
|
|
1619
|
+
function electronPageHistory(api = () => window.api.sidebar) {
|
|
1620
|
+
return {
|
|
1621
|
+
load: () => api().getHistory(),
|
|
1622
|
+
save: ({ entries, index }) => api().setHistory({ entries: [...entries], index })
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1617
1625
|
const electronDirectorySignals = {
|
|
1618
1626
|
onRunEnd: (listener) => onStreamSignal((signal) => {
|
|
1619
1627
|
if (signal.kind === "run:end") listener(signal.sessionId, signal.ok);
|
|
@@ -1907,11 +1915,11 @@ function parseWindowRole(search) {
|
|
|
1907
1915
|
const windowRole = typeof location === "undefined" ? { kind: "main" } : parseWindowRole(location.search);
|
|
1908
1916
|
const pinnedSession = windowRole.kind === "session" ? windowRole.session : null;
|
|
1909
1917
|
let list = [];
|
|
1910
|
-
const listeners$
|
|
1918
|
+
const listeners$6 = /* @__PURE__ */ new Set();
|
|
1911
1919
|
let started = false;
|
|
1912
1920
|
function set$1(next) {
|
|
1913
1921
|
list = next;
|
|
1914
|
-
for (const l of listeners$
|
|
1922
|
+
for (const l of listeners$6) l();
|
|
1915
1923
|
}
|
|
1916
1924
|
function start() {
|
|
1917
1925
|
if (started || typeof window === "undefined" || !window.api?.windows) return;
|
|
@@ -1926,8 +1934,8 @@ const standaloneWindows = {
|
|
|
1926
1934
|
},
|
|
1927
1935
|
subscribe: (l) => {
|
|
1928
1936
|
start();
|
|
1929
|
-
listeners$
|
|
1930
|
-
return () => listeners$
|
|
1937
|
+
listeners$6.add(l);
|
|
1938
|
+
return () => listeners$6.delete(l);
|
|
1931
1939
|
},
|
|
1932
1940
|
/** The parts of `sessionKey` held by a standalone window, if any. */
|
|
1933
1941
|
partsOf: (sessionKey2) => sessionKey2 && list.find((w) => w.sessionKey === sessionKey2)?.parts || null,
|
|
@@ -1955,6 +1963,95 @@ function useShowRequests(show, enabled) {
|
|
|
1955
1963
|
return off;
|
|
1956
1964
|
}, [show, enabled]);
|
|
1957
1965
|
}
|
|
1966
|
+
function createStore(initial) {
|
|
1967
|
+
let value = initial;
|
|
1968
|
+
const listeners2 = /* @__PURE__ */ new Set();
|
|
1969
|
+
return {
|
|
1970
|
+
get: () => value,
|
|
1971
|
+
set(next) {
|
|
1972
|
+
if (next === value) return;
|
|
1973
|
+
value = next;
|
|
1974
|
+
for (const listener of listeners2) listener();
|
|
1975
|
+
},
|
|
1976
|
+
subscribe(listener) {
|
|
1977
|
+
listeners2.add(listener);
|
|
1978
|
+
return () => listeners2.delete(listener);
|
|
1979
|
+
}
|
|
1980
|
+
};
|
|
1981
|
+
}
|
|
1982
|
+
const request = createStore(null);
|
|
1983
|
+
const home = createStore(null);
|
|
1984
|
+
const chatDraft = createStore(false);
|
|
1985
|
+
let seq = 0;
|
|
1986
|
+
function requestDraftOn(hostId, folder, machine) {
|
|
1987
|
+
request.set({ seq: ++seq, hostId, folder, ...machine });
|
|
1988
|
+
}
|
|
1989
|
+
function requestFolderlessDraft() {
|
|
1990
|
+
request.set({ seq: ++seq, hostId: LOCAL_HOST_KEY, folder: null, folderless: true });
|
|
1991
|
+
}
|
|
1992
|
+
function clearDraftRequest() {
|
|
1993
|
+
request.set(null);
|
|
1994
|
+
}
|
|
1995
|
+
function useDraftRequest() {
|
|
1996
|
+
return reactExports.useSyncExternalStore(request.subscribe, request.get, request.get);
|
|
1997
|
+
}
|
|
1998
|
+
function publishHomeProject(project) {
|
|
1999
|
+
const current = home.get();
|
|
2000
|
+
if (current?.path === project?.path && current?.hostId === project?.hostId) return;
|
|
2001
|
+
home.set(project);
|
|
2002
|
+
}
|
|
2003
|
+
function publishChatDraft(open) {
|
|
2004
|
+
chatDraft.set(open);
|
|
2005
|
+
}
|
|
2006
|
+
function useChatDraft() {
|
|
2007
|
+
return reactExports.useSyncExternalStore(chatDraft.subscribe, chatDraft.get, chatDraft.get);
|
|
2008
|
+
}
|
|
2009
|
+
function useHomeProject() {
|
|
2010
|
+
return reactExports.useSyncExternalStore(home.subscribe, home.get, home.get);
|
|
2011
|
+
}
|
|
2012
|
+
let prompt = null;
|
|
2013
|
+
const listeners$5 = /* @__PURE__ */ new Set();
|
|
2014
|
+
const setPrompt = (next) => {
|
|
2015
|
+
prompt = next;
|
|
2016
|
+
for (const listener of listeners$5) listener();
|
|
2017
|
+
};
|
|
2018
|
+
function useDraftPrompt() {
|
|
2019
|
+
return reactExports.useSyncExternalStore(
|
|
2020
|
+
(listener) => {
|
|
2021
|
+
listeners$5.add(listener);
|
|
2022
|
+
return () => listeners$5.delete(listener);
|
|
2023
|
+
},
|
|
2024
|
+
() => prompt,
|
|
2025
|
+
() => prompt
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
function clearDraftPrompt() {
|
|
2029
|
+
setPrompt(null);
|
|
2030
|
+
}
|
|
2031
|
+
function applyNewDraftRequest(request2, actions) {
|
|
2032
|
+
const { hostId, cwd, machine, agentId } = request2;
|
|
2033
|
+
if (machine) {
|
|
2034
|
+
requestDraftOn(hostId, null, { environment: `local@${machine.name}`, ...cwd ? { machineFolder: cwd } : {} });
|
|
2035
|
+
} else if (hostId === LOCAL_HOST_KEY) {
|
|
2036
|
+
if (cwd) actions.setDefaultFolder(cwd);
|
|
2037
|
+
requestDraftOn(LOCAL_HOST_KEY, null);
|
|
2038
|
+
} else {
|
|
2039
|
+
requestDraftOn(hostId, cwd ?? null);
|
|
2040
|
+
}
|
|
2041
|
+
if (agentId) actions.setDefaultAgentId(agentId);
|
|
2042
|
+
if (request2.prompt) setPrompt({ text: request2.prompt });
|
|
2043
|
+
actions.showDraft();
|
|
2044
|
+
}
|
|
2045
|
+
function useNewDraftRequests(apply, enabled) {
|
|
2046
|
+
reactExports.useEffect(() => {
|
|
2047
|
+
if (!enabled || !window.api.windows?.onNewDraft) return;
|
|
2048
|
+
const off = window.api.windows.onNewDraft(apply);
|
|
2049
|
+
void window.api.windows.takePendingDraft().then((request2) => {
|
|
2050
|
+
if (request2) apply(request2);
|
|
2051
|
+
});
|
|
2052
|
+
return off;
|
|
2053
|
+
}, [apply, enabled]);
|
|
2054
|
+
}
|
|
1958
2055
|
function StreamProvider({ children }) {
|
|
1959
2056
|
const { settings } = useSettings();
|
|
1960
2057
|
const smoothStreaming = settings.smoothStreaming;
|
|
@@ -2021,6 +2118,12 @@ function useSessionStream(sessionId) {
|
|
|
2021
2118
|
);
|
|
2022
2119
|
return { events, running, reset, appendUserPrompt };
|
|
2023
2120
|
}
|
|
2121
|
+
const pageHistory = pinnedSession ? null : createSessionHistory({
|
|
2122
|
+
store: electronPageHistory(),
|
|
2123
|
+
onError: (what, err) => console.warn(`[history] ${what} failed`, err)
|
|
2124
|
+
});
|
|
2125
|
+
const noHistory = { subscribe: () => () => {
|
|
2126
|
+
}, get: () => null };
|
|
2024
2127
|
function useDirectoryStreams() {
|
|
2025
2128
|
const hooks = {
|
|
2026
2129
|
captureRunState: useCaptureRunState(),
|
|
@@ -2091,6 +2194,7 @@ function SessionsProvider({ children }) {
|
|
|
2091
2194
|
onRemoved: (id) => {
|
|
2092
2195
|
browserStore.close(id);
|
|
2093
2196
|
forgetScopeLayout(id);
|
|
2197
|
+
pageHistory?.forget(id);
|
|
2094
2198
|
},
|
|
2095
2199
|
onError: (err) => console.warn("[sessions] refresh failed", err),
|
|
2096
2200
|
saveSpace: async (space) => {
|
|
@@ -2133,7 +2237,48 @@ function SessionsProvider({ children }) {
|
|
|
2133
2237
|
check();
|
|
2134
2238
|
return standaloneWindows.subscribe(check);
|
|
2135
2239
|
}, [directory]);
|
|
2136
|
-
useShowRequests(directory.
|
|
2240
|
+
useShowRequests(directory.select, !pinnedSession);
|
|
2241
|
+
const { setDefaultFolder: setDraftFolder, setDefaultAgentId: setDraftAgent } = defaults;
|
|
2242
|
+
const applyDraftRequest = reactExports.useCallback(
|
|
2243
|
+
(request2) => applyNewDraftRequest(request2, {
|
|
2244
|
+
showDraft: () => directory.select(null),
|
|
2245
|
+
setDefaultFolder: setDraftFolder,
|
|
2246
|
+
setDefaultAgentId: setDraftAgent
|
|
2247
|
+
}),
|
|
2248
|
+
[directory, setDraftFolder, setDraftAgent]
|
|
2249
|
+
);
|
|
2250
|
+
useNewDraftRequests(applyDraftRequest, !pinnedSession);
|
|
2251
|
+
reactExports.useEffect(() => {
|
|
2252
|
+
if (!pageHistory) return void 0;
|
|
2253
|
+
const follow = () => pageHistory.visit(directory.state.get().activeSessionId);
|
|
2254
|
+
follow();
|
|
2255
|
+
void pageHistory.load();
|
|
2256
|
+
return directory.state.subscribe(follow);
|
|
2257
|
+
}, [directory]);
|
|
2258
|
+
const canOpenPage = reactExports.useCallback(
|
|
2259
|
+
(id) => {
|
|
2260
|
+
if (!directory.state.get().allSessions.some((s) => s.id === id)) return false;
|
|
2261
|
+
const parts = standaloneWindows.partsOf(id);
|
|
2262
|
+
return !(parts && hasChat(parts));
|
|
2263
|
+
},
|
|
2264
|
+
[directory]
|
|
2265
|
+
);
|
|
2266
|
+
const history = pageHistory?.state ?? noHistory;
|
|
2267
|
+
const historyState = reactExports.useSyncExternalStore(history.subscribe, history.get, history.get);
|
|
2268
|
+
const windowsOpen = reactExports.useSyncExternalStore(standaloneWindows.subscribe, standaloneWindows.get, standaloneWindows.get);
|
|
2269
|
+
const [canGoBack, canGoForward] = reactExports.useMemo(
|
|
2270
|
+
() => historyState && pageHistory ? [pageHistory.peek("back", canOpenPage) !== void 0, pageHistory.peek("forward", canOpenPage) !== void 0] : [false, false],
|
|
2271
|
+
// `allSessions`: an entry opens once its session is listed; `windowsOpen`: or once its own window closes.
|
|
2272
|
+
[historyState, allSessions, windowsOpen, canOpenPage]
|
|
2273
|
+
);
|
|
2274
|
+
const goBack = reactExports.useCallback(() => {
|
|
2275
|
+
const page = pageHistory?.back(canOpenPage);
|
|
2276
|
+
if (page !== void 0) directory.select(page);
|
|
2277
|
+
}, [directory, canOpenPage]);
|
|
2278
|
+
const goForward = reactExports.useCallback(() => {
|
|
2279
|
+
const page = pageHistory?.forward(canOpenPage);
|
|
2280
|
+
if (page !== void 0) directory.select(page);
|
|
2281
|
+
}, [directory, canOpenPage]);
|
|
2137
2282
|
const setActiveSessionId = reactExports.useCallback(
|
|
2138
2283
|
(id) => {
|
|
2139
2284
|
if (pinnedSession) {
|
|
@@ -2163,6 +2308,8 @@ function SessionsProvider({ children }) {
|
|
|
2163
2308
|
renewDraft();
|
|
2164
2309
|
}
|
|
2165
2310
|
await directory.refresh();
|
|
2311
|
+
const shown = pageHistory?.state.get();
|
|
2312
|
+
if (draft2?.draft && shown && shown.entries[shown.index] === null) pageHistory?.replace(created.id);
|
|
2166
2313
|
setActiveSessionId(created.id);
|
|
2167
2314
|
return created;
|
|
2168
2315
|
},
|
|
@@ -2217,6 +2364,8 @@ function SessionsProvider({ children }) {
|
|
|
2217
2364
|
defaultModelId: defaults.defaultModelId,
|
|
2218
2365
|
defaultAccount: defaults.defaultAccount,
|
|
2219
2366
|
hostNotice: view.hostNotice,
|
|
2367
|
+
canGoBack,
|
|
2368
|
+
canGoForward,
|
|
2220
2369
|
switcherSpaces: view.switcherSpaces,
|
|
2221
2370
|
hiddenSpaces: view.hiddenSpaces,
|
|
2222
2371
|
query: view.query
|
|
@@ -2233,7 +2382,9 @@ function SessionsProvider({ children }) {
|
|
|
2233
2382
|
defaults.newSessionKnobs,
|
|
2234
2383
|
defaults.defaultProviderKey,
|
|
2235
2384
|
defaults.defaultModelId,
|
|
2236
|
-
defaults.defaultAccount
|
|
2385
|
+
defaults.defaultAccount,
|
|
2386
|
+
canGoBack,
|
|
2387
|
+
canGoForward
|
|
2237
2388
|
]
|
|
2238
2389
|
);
|
|
2239
2390
|
const { setDefaultFolder, setDefaultAgentId, setDefaultModel } = defaults;
|
|
@@ -2266,7 +2417,9 @@ function SessionsProvider({ children }) {
|
|
|
2266
2417
|
attachSidebarContributions: directory.attachContributions,
|
|
2267
2418
|
saveViewAsSpace: (name) => directory.saveViewAsSpace?.(name) ?? Promise.reject(new Error("unavailable")),
|
|
2268
2419
|
refresh: directory.refresh,
|
|
2269
|
-
dismissHostNotice: directory.dismissHostNotice
|
|
2420
|
+
dismissHostNotice: directory.dismissHostNotice,
|
|
2421
|
+
goBack,
|
|
2422
|
+
goForward
|
|
2270
2423
|
}),
|
|
2271
2424
|
[
|
|
2272
2425
|
directory,
|
|
@@ -2277,7 +2430,9 @@ function SessionsProvider({ children }) {
|
|
|
2277
2430
|
createSession,
|
|
2278
2431
|
deleteSession,
|
|
2279
2432
|
deleteSessions,
|
|
2280
|
-
patchView
|
|
2433
|
+
patchView,
|
|
2434
|
+
goBack,
|
|
2435
|
+
goForward
|
|
2281
2436
|
]
|
|
2282
2437
|
);
|
|
2283
2438
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SessionsStateContext.Provider, { value: state2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionsActionsContext.Provider, { value: actions, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotificationStoreContext.Provider, { value: directory.notifications, children }) }) });
|
|
@@ -2435,16 +2590,29 @@ function PanelsProvider({ children }) {
|
|
|
2435
2590
|
...browserOn ? [] : ["browser"],
|
|
2436
2591
|
...terminalOn ? [] : ["terminal"],
|
|
2437
2592
|
// A session's own data: hidden without one (kept in the stored strip).
|
|
2438
|
-
...bound ? [] : ["
|
|
2593
|
+
...bound ? [] : ["inbox", "queue"],
|
|
2439
2594
|
// `/side` chats live in this computer's store.
|
|
2440
2595
|
...bound && !onServer ? [] : ["side"]
|
|
2441
2596
|
];
|
|
2442
2597
|
return buildPanelCatalog(extensionPanels, {
|
|
2443
2598
|
showArtifacts: settings.artifacts !== false && bound,
|
|
2599
|
+
// `Settings.secrets` on: the session project's saved secrets.
|
|
2600
|
+
showSecrets: settings.secrets === true && bound,
|
|
2601
|
+
// `Settings.schedules` on: the reminders of This computer's sessions (a server keeps its own).
|
|
2602
|
+
showReminders: settings.schedules === true && bound && !onServer,
|
|
2444
2603
|
...omit.length > 0 ? { omitBuiltins: omit } : {},
|
|
2445
2604
|
...bound ? {} : { unbound: true }
|
|
2446
2605
|
});
|
|
2447
|
-
}, [
|
|
2606
|
+
}, [
|
|
2607
|
+
extensionPanels,
|
|
2608
|
+
settings.artifacts,
|
|
2609
|
+
settings.secrets,
|
|
2610
|
+
settings.schedules,
|
|
2611
|
+
browserOn,
|
|
2612
|
+
terminalOn,
|
|
2613
|
+
bound,
|
|
2614
|
+
onServer
|
|
2615
|
+
]);
|
|
2448
2616
|
const workspaceScope = reactExports.useMemo(() => scope ? workspaceScopeOf(scope) : null, [scope]);
|
|
2449
2617
|
const content = reactExports.useMemo(() => cwd ? { cwd, sessionId } : null, [cwd, sessionId]);
|
|
2450
2618
|
const loadContext = reactExports.useCallback(
|
|
@@ -2589,52 +2757,6 @@ function LayoutProvider({
|
|
|
2589
2757
|
}
|
|
2590
2758
|
);
|
|
2591
2759
|
}
|
|
2592
|
-
function createStore(initial) {
|
|
2593
|
-
let value = initial;
|
|
2594
|
-
const listeners2 = /* @__PURE__ */ new Set();
|
|
2595
|
-
return {
|
|
2596
|
-
get: () => value,
|
|
2597
|
-
set(next) {
|
|
2598
|
-
if (next === value) return;
|
|
2599
|
-
value = next;
|
|
2600
|
-
for (const listener of listeners2) listener();
|
|
2601
|
-
},
|
|
2602
|
-
subscribe(listener) {
|
|
2603
|
-
listeners2.add(listener);
|
|
2604
|
-
return () => listeners2.delete(listener);
|
|
2605
|
-
}
|
|
2606
|
-
};
|
|
2607
|
-
}
|
|
2608
|
-
const request = createStore(null);
|
|
2609
|
-
const home = createStore(null);
|
|
2610
|
-
const chatDraft = createStore(false);
|
|
2611
|
-
let seq = 0;
|
|
2612
|
-
function requestDraftOn(hostId, folder) {
|
|
2613
|
-
request.set({ seq: ++seq, hostId, folder });
|
|
2614
|
-
}
|
|
2615
|
-
function requestFolderlessDraft() {
|
|
2616
|
-
request.set({ seq: ++seq, hostId: LOCAL_HOST_KEY, folder: null, folderless: true });
|
|
2617
|
-
}
|
|
2618
|
-
function clearDraftRequest() {
|
|
2619
|
-
request.set(null);
|
|
2620
|
-
}
|
|
2621
|
-
function useDraftRequest() {
|
|
2622
|
-
return reactExports.useSyncExternalStore(request.subscribe, request.get, request.get);
|
|
2623
|
-
}
|
|
2624
|
-
function publishHomeProject(project) {
|
|
2625
|
-
const current = home.get();
|
|
2626
|
-
if (current?.path === project?.path && current?.hostId === project?.hostId) return;
|
|
2627
|
-
home.set(project);
|
|
2628
|
-
}
|
|
2629
|
-
function publishChatDraft(open) {
|
|
2630
|
-
chatDraft.set(open);
|
|
2631
|
-
}
|
|
2632
|
-
function useChatDraft() {
|
|
2633
|
-
return reactExports.useSyncExternalStore(chatDraft.subscribe, chatDraft.get, chatDraft.get);
|
|
2634
|
-
}
|
|
2635
|
-
function useHomeProject() {
|
|
2636
|
-
return reactExports.useSyncExternalStore(home.subscribe, home.get, home.get);
|
|
2637
|
-
}
|
|
2638
2760
|
function useTurnMenu(sessionId) {
|
|
2639
2761
|
const { setActiveSessionId, refresh } = useSessionsActions();
|
|
2640
2762
|
const setEventsPage = useSetEventsPage();
|
|
@@ -2666,7 +2788,7 @@ function useTurnMenu(sessionId) {
|
|
|
2666
2788
|
return useTurnMenu$1(sessionId, actions);
|
|
2667
2789
|
}
|
|
2668
2790
|
const system = {
|
|
2669
|
-
openPath: (path) => window.api.system.openPath(path),
|
|
2791
|
+
openPath: (path, at) => window.api.system.openPath(path, at),
|
|
2670
2792
|
revealPath: (path) => window.api.system.revealPath(path)
|
|
2671
2793
|
};
|
|
2672
2794
|
function useOpenTarget() {
|
|
@@ -2689,17 +2811,42 @@ function useSessionMarkdownContext(session, hostName) {
|
|
|
2689
2811
|
function useChipOpener(cwd) {
|
|
2690
2812
|
const openTarget = useOpenTarget();
|
|
2691
2813
|
return reactExports.useMemo(
|
|
2692
|
-
() => async (path, kind, event) => {
|
|
2814
|
+
() => async (path, kind, event, at) => {
|
|
2693
2815
|
if (kind === "dir") return openTarget.folder(path, cwd, event);
|
|
2694
2816
|
if (openTarget.resolve(event) === "panel") {
|
|
2695
|
-
await openTarget.file(path, event);
|
|
2817
|
+
await openTarget.file(path, event, at);
|
|
2696
2818
|
return;
|
|
2697
2819
|
}
|
|
2698
|
-
return window.api.system.openPath(path).catch(() => false);
|
|
2820
|
+
return window.api.system.openPath(path, at).catch(() => false);
|
|
2699
2821
|
},
|
|
2700
2822
|
[openTarget, cwd]
|
|
2701
2823
|
);
|
|
2702
2824
|
}
|
|
2825
|
+
let authSettingsOpener = null;
|
|
2826
|
+
function setAuthSettingsOpener(open) {
|
|
2827
|
+
authSettingsOpener = open;
|
|
2828
|
+
}
|
|
2829
|
+
const serverAccounts = /* @__PURE__ */ new Map();
|
|
2830
|
+
function accountsOnServer(hostId) {
|
|
2831
|
+
let accounts = serverAccounts.get(hostId);
|
|
2832
|
+
if (!accounts) {
|
|
2833
|
+
accounts = createElectronSettingsAccounts(window.api, { hostId });
|
|
2834
|
+
serverAccounts.set(hostId, accounts);
|
|
2835
|
+
}
|
|
2836
|
+
return accounts;
|
|
2837
|
+
}
|
|
2838
|
+
function useTranscriptAccounts(hostId, cwd) {
|
|
2839
|
+
const local = useSettingsHost();
|
|
2840
|
+
return reactExports.useMemo(() => {
|
|
2841
|
+
const { providers, mcp } = hostId ? accountsOnServer(hostId) : local;
|
|
2842
|
+
return {
|
|
2843
|
+
cwd,
|
|
2844
|
+
...providers ? { providers } : {},
|
|
2845
|
+
...mcp?.signIn ? { mcp } : {},
|
|
2846
|
+
openSettings: (target) => authSettingsOpener?.(target, hostId)
|
|
2847
|
+
};
|
|
2848
|
+
}, [hostId, cwd, local]);
|
|
2849
|
+
}
|
|
2703
2850
|
const CATALOG_TTL_MS = 3e4;
|
|
2704
2851
|
const SIDE_COMMAND = {
|
|
2705
2852
|
name: "side",
|
|
@@ -3072,6 +3219,7 @@ const Timeline = reactExports.memo(({ events, isStreaming, sessionId }) => {
|
|
|
3072
3219
|
() => sessionId && hasSession2 && settings.terminal !== false && session?.archived !== true ? scopeOfSession({ id: sessionId, cwd: scopeCwd, projectRoot: scopeRoot, workspace: scopeWorkspace }) : null,
|
|
3073
3220
|
[sessionId, hasSession2, settings.terminal, session?.archived, scopeCwd, scopeRoot, scopeWorkspace]
|
|
3074
3221
|
);
|
|
3222
|
+
const accounts = useTranscriptAccounts(sessionId ? serverIdOf(sessionId) : null, scopeCwd);
|
|
3075
3223
|
const actions = reactExports.useMemo(
|
|
3076
3224
|
() => ({
|
|
3077
3225
|
sessionId,
|
|
@@ -3089,9 +3237,10 @@ const Timeline = reactExports.memo(({ events, isStreaming, sessionId }) => {
|
|
|
3089
3237
|
...sessionId && serverIdOf(sessionId) === null && scopeCwd ? {
|
|
3090
3238
|
openFile: (path, event) => void openTarget.file(`${scopeCwd.replace(/\/+$/, "")}/${path}`, event)
|
|
3091
3239
|
} : {},
|
|
3092
|
-
...terminalScope ? { runInTerminal: (input) => void terminalStore.runIn(terminalScope, input) } : {}
|
|
3240
|
+
...terminalScope ? { runInTerminal: (input) => void terminalStore.runIn(terminalScope, input) } : {},
|
|
3241
|
+
accounts
|
|
3093
3242
|
}),
|
|
3094
|
-
[sessionId, openSession, modelName, openTarget, scopeCwd, terminalScope]
|
|
3243
|
+
[sessionId, openSession, modelName, openTarget, scopeCwd, terminalScope, accounts]
|
|
3095
3244
|
);
|
|
3096
3245
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownContext.Provider, { value: markdownCtx, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CommandScopeContext.Provider, { value: commandScope, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptRenderersProvider, { value: GUI_TRANSCRIPT_RENDERERS, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptActionsProvider, { value: actions, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PathDisplayScope, { hostId: sessionId ? serverIdOf(sessionId) : null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3097
3246
|
Transcript,
|
|
@@ -3998,6 +4147,7 @@ function ProjectHomeScreen({ draft: draft2 }) {
|
|
|
3998
4147
|
const server = draft2.server;
|
|
3999
4148
|
const folder = server ? draft2.remoteFolder ?? draft2.remoteRoot ?? "" : draft2.folderPath ?? "";
|
|
4000
4149
|
const root = server ? folder : scope?.root || folder;
|
|
4150
|
+
const startSession = useStartFromPanel(draft2, folder);
|
|
4001
4151
|
const serverId = server?.id;
|
|
4002
4152
|
reactExports.useEffect(() => {
|
|
4003
4153
|
publishHomeProject(root ? { path: root, ...serverId ? { hostId: serverId } : {} } : null);
|
|
@@ -4047,6 +4197,7 @@ function ProjectHomeScreen({ draft: draft2 }) {
|
|
|
4047
4197
|
...server ? { blocksUnavailable: true } : host2?.panels ? { panels: host2.panels } : {},
|
|
4048
4198
|
onOpenSession: (id) => setActiveSessionId(localSessionKey(id)),
|
|
4049
4199
|
onOpenPath,
|
|
4200
|
+
...server ? {} : { onStartSession: startSession },
|
|
4050
4201
|
...server ? {} : {
|
|
4051
4202
|
// A folder on this computer: its repository, its files, Finder, the editor.
|
|
4052
4203
|
...repo ? {
|
|
@@ -4745,7 +4896,7 @@ function ConversationComposer({
|
|
|
4745
4896
|
scrolled,
|
|
4746
4897
|
hostId,
|
|
4747
4898
|
draft: draft2,
|
|
4748
|
-
prompt,
|
|
4899
|
+
prompt: prompt2,
|
|
4749
4900
|
search,
|
|
4750
4901
|
searchOverlayOpen,
|
|
4751
4902
|
meters,
|
|
@@ -4797,7 +4948,7 @@ function ConversationComposer({
|
|
|
4797
4948
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
4798
4949
|
isNewSession && hostNotice && /* @__PURE__ */ jsxRuntimeExports.jsx(HostRemovedBanner, { notice: hostNotice, onDismiss: dismissHostNotice }),
|
|
4799
4950
|
isNewSession && draft2.error && /* @__PURE__ */ jsxRuntimeExports.jsx(ComposerNotice, { text: draft2.error, onDismiss: () => draft2.setError(null) }),
|
|
4800
|
-
|
|
4951
|
+
prompt2.needsProvider && providerReady === false && /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectProviderCard, { "data-testid": "connect-provider", onConnect: () => openOnboarding("connect") }),
|
|
4801
4952
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ComposerDock, { children: [
|
|
4802
4953
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTurnHint, { sessionId }),
|
|
4803
4954
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalDock, { sessionId })
|
|
@@ -4811,8 +4962,9 @@ function ConversationComposer({
|
|
|
4811
4962
|
activeSessionId: sessionId,
|
|
4812
4963
|
hostId,
|
|
4813
4964
|
running: running && Boolean(session),
|
|
4814
|
-
onStop:
|
|
4815
|
-
onSend:
|
|
4965
|
+
onStop: prompt2.stop,
|
|
4966
|
+
onSend: prompt2.send,
|
|
4967
|
+
messageDelivery: settings.messageDelivery,
|
|
4816
4968
|
attachmentsEnabled: settings.attachmentsEnabled !== false,
|
|
4817
4969
|
inlineAutocomplete: settings.inlineAutocomplete === true,
|
|
4818
4970
|
promptSuggestions: settings.promptSuggestions === true,
|
|
@@ -5223,6 +5375,12 @@ const ConversationPane = reactExports.memo(function ConversationPane2({
|
|
|
5223
5375
|
reactExports.useEffect(() => {
|
|
5224
5376
|
if (!isNewSession) clearDraftRequest();
|
|
5225
5377
|
}, [isNewSession]);
|
|
5378
|
+
const draftPrompt = useDraftPrompt();
|
|
5379
|
+
reactExports.useEffect(() => {
|
|
5380
|
+
if (!isNewSession || !draftPrompt) return;
|
|
5381
|
+
pushComposerDraft({ text: draftPrompt.text, attachments: [] });
|
|
5382
|
+
clearDraftPrompt();
|
|
5383
|
+
}, [isNewSession, draftPrompt]);
|
|
5226
5384
|
const chatDraft2 = isNewSession && !draft2.server && draft2.folderPath === "";
|
|
5227
5385
|
reactExports.useEffect(() => {
|
|
5228
5386
|
publishChatDraft(chatDraft2);
|
|
@@ -5234,7 +5392,7 @@ const ConversationPane = reactExports.memo(function ConversationPane2({
|
|
|
5234
5392
|
hydrated
|
|
5235
5393
|
);
|
|
5236
5394
|
const search = useComposerSearch(sessionId, scrollRef, actions.closeSearch);
|
|
5237
|
-
const
|
|
5395
|
+
const prompt2 = useSendPrompt({ session, running, draft: draft2, hostId, glideToBottom });
|
|
5238
5396
|
const veiled = useSettledReveal(sessionId, hydrated) && !isNewSession;
|
|
5239
5397
|
const { showRowIcons, projectHome: projectHomeOn } = useSettings().settings;
|
|
5240
5398
|
const projectHome = isNewSession && projectHomeOn === true;
|
|
@@ -5246,7 +5404,7 @@ const ConversationPane = reactExports.memo(function ConversationPane2({
|
|
|
5246
5404
|
scrolled: !projectHome && scrolledFromTop && !pinned,
|
|
5247
5405
|
hostId,
|
|
5248
5406
|
draft: draft2,
|
|
5249
|
-
prompt,
|
|
5407
|
+
prompt: prompt2,
|
|
5250
5408
|
search,
|
|
5251
5409
|
searchOverlayOpen: searchOpen,
|
|
5252
5410
|
meters,
|
|
@@ -6653,6 +6811,7 @@ function displayUrl(url) {
|
|
|
6653
6811
|
function InboxTab({ sessionId }) {
|
|
6654
6812
|
const { focusRequest } = usePanelRequests();
|
|
6655
6813
|
const { takeFocusRequest } = usePanelActions();
|
|
6814
|
+
const { current, recent } = useInboxPlans(sessionId);
|
|
6656
6815
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6657
6816
|
InboxPanel,
|
|
6658
6817
|
{
|
|
@@ -6660,7 +6819,9 @@ function InboxTab({ sessionId }) {
|
|
|
6660
6819
|
focus: focusRequest === INBOX_PANEL_ID,
|
|
6661
6820
|
onFocusTaken: takeFocusRequest,
|
|
6662
6821
|
onEscape: focusComposer,
|
|
6663
|
-
Markdown: ProseMarkdown
|
|
6822
|
+
Markdown: ProseMarkdown,
|
|
6823
|
+
inProgress: current && /* @__PURE__ */ jsxRuntimeExports.jsx(PlanTracker, { sessionId, plan: current }),
|
|
6824
|
+
recent: recent.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(RecentPlans, { sessionId, plans: recent })
|
|
6664
6825
|
}
|
|
6665
6826
|
);
|
|
6666
6827
|
}
|
|
@@ -6798,8 +6959,8 @@ function SideTab({ parentId, cwd }) {
|
|
|
6798
6959
|
}
|
|
6799
6960
|
);
|
|
6800
6961
|
}
|
|
6801
|
-
const DesktopDiffsTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-
|
|
6802
|
-
const DesktopFilesTab = reactExports.lazy(() => __vitePreload(() => import("./file-tabs-
|
|
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 })));
|
|
6803
6964
|
const KEEP_ALIVE = /* @__PURE__ */ new Set([
|
|
6804
6965
|
ARTIFACTS_PANEL_ID,
|
|
6805
6966
|
BROWSER_PANEL_ID,
|
|
@@ -6807,8 +6968,9 @@ const KEEP_ALIVE = /* @__PURE__ */ new Set([
|
|
|
6807
6968
|
FILES_PANEL_ID,
|
|
6808
6969
|
INBOX_PANEL_ID,
|
|
6809
6970
|
QUEUE_PANEL_ID,
|
|
6810
|
-
|
|
6811
|
-
|
|
6971
|
+
REMINDERS_PANEL_ID,
|
|
6972
|
+
SECRETS_PANEL_ID,
|
|
6973
|
+
SIDE_PANEL_ID
|
|
6812
6974
|
]);
|
|
6813
6975
|
const DESCRIPTIONS = {
|
|
6814
6976
|
[ARTIFACTS_PANEL_ID]: "Pull requests, branches and commits the session made",
|
|
@@ -6816,10 +6978,11 @@ const DESCRIPTIONS = {
|
|
|
6816
6978
|
[FILES_PANEL_ID]: "The folder as a tree, with a viewer and an editor",
|
|
6817
6979
|
[TERMINAL_PANEL_ID]: "Terminals where the session runs",
|
|
6818
6980
|
[BROWSER_PANEL_ID]: "A browser for the app you are building",
|
|
6819
|
-
[INBOX_PANEL_ID]: "
|
|
6820
|
-
[TODOS_PANEL_ID]: "The agent's todo list",
|
|
6981
|
+
[INBOX_PANEL_ID]: "What waits on you, the plan in progress and the recent ones",
|
|
6821
6982
|
[QUEUE_PANEL_ID]: "Messages waiting for the run to end",
|
|
6822
|
-
[SIDE_PANEL_ID]: "A side chat beside this session"
|
|
6983
|
+
[SIDE_PANEL_ID]: "A side chat beside this session",
|
|
6984
|
+
[SECRETS_PANEL_ID]: "API keys and tokens saved for this project",
|
|
6985
|
+
[REMINDERS_PANEL_ID]: "Prompts set to reach this session at a set time"
|
|
6823
6986
|
};
|
|
6824
6987
|
function tabBodyKey(scope) {
|
|
6825
6988
|
return [scopeKey(scope), scope.cwd, scope.root, scope.workspace ?? ""].join("\0");
|
|
@@ -6858,14 +7021,16 @@ function TabBody({ tab, scope }) {
|
|
|
6858
7021
|
switch (tab.id) {
|
|
6859
7022
|
case INBOX_PANEL_ID:
|
|
6860
7023
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InboxTab, { sessionId: scope.session });
|
|
6861
|
-
case TODOS_PANEL_ID:
|
|
6862
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TodosPanel, { sessionId: scope.session });
|
|
6863
7024
|
case QUEUE_PANEL_ID:
|
|
6864
7025
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(QueueTab, { sessionId: scope.session });
|
|
6865
7026
|
case BROWSER_PANEL_ID:
|
|
6866
7027
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserTab, { sessionId: scope.session });
|
|
6867
7028
|
case SIDE_PANEL_ID:
|
|
6868
7029
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SideTab, { parentId: scope.session, cwd: scope.cwd });
|
|
7030
|
+
case SECRETS_PANEL_ID:
|
|
7031
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SecretsPanel, { sessionId: scope.session });
|
|
7032
|
+
case REMINDERS_PANEL_ID:
|
|
7033
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(RemindersPanel, { sessionId: scope.session });
|
|
6869
7034
|
default:
|
|
6870
7035
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ArtifactsPanel, { sessionId: scope.session });
|
|
6871
7036
|
}
|
|
@@ -6991,6 +7156,8 @@ function ScopedSidePanel({ scope, fill }) {
|
|
|
6991
7156
|
const panels = usePanelLayout();
|
|
6992
7157
|
const budget = useLayoutBudget();
|
|
6993
7158
|
const registry = useTabRegistry(scope);
|
|
7159
|
+
const artifactCount = countArtifacts(useSessionArtifacts(sessionId));
|
|
7160
|
+
const counts = reactExports.useMemo(() => ({ [ARTIFACTS_PANEL_ID]: artifactCount }), [artifactCount]);
|
|
6994
7161
|
const overlay = !fill && budget.panelMode === "overlay";
|
|
6995
7162
|
const hadTabs = reactExports.useRef(false);
|
|
6996
7163
|
reactExports.useEffect(() => {
|
|
@@ -7026,6 +7193,7 @@ function ScopedSidePanel({ scope, fill }) {
|
|
|
7026
7193
|
slidAway: budget.panelHidden,
|
|
7027
7194
|
onReveal: budget.revealPanel,
|
|
7028
7195
|
fill,
|
|
7196
|
+
counts,
|
|
7029
7197
|
...TAB_REGION_PROPS
|
|
7030
7198
|
}
|
|
7031
7199
|
);
|
|
@@ -7318,20 +7486,26 @@ function Sidebar({ onNewSession, hasAuth, onOpenAuth, onOpenSettings }) {
|
|
|
7318
7486
|
});
|
|
7319
7487
|
const onNewSessionRef = reactExports.useRef(onNewSession);
|
|
7320
7488
|
onNewSessionRef.current = onNewSession;
|
|
7489
|
+
const [focusRequest, setFocusRequest] = reactExports.useState(0);
|
|
7490
|
+
reactExports.useEffect(() => {
|
|
7491
|
+
if (focusRequest > 0) focusComposerWhenReady();
|
|
7492
|
+
}, [focusRequest]);
|
|
7493
|
+
const requestComposerFocus = reactExports.useCallback(() => setFocusRequest((n) => n + 1), []);
|
|
7321
7494
|
const onNewSessionIn = reactExports.useCallback(
|
|
7322
7495
|
(fullPath) => {
|
|
7323
7496
|
setDefaultFolder(fullPath);
|
|
7324
7497
|
requestDraftOn(LOCAL_HOST_KEY, null);
|
|
7325
7498
|
onNewSessionRef.current();
|
|
7499
|
+
requestComposerFocus();
|
|
7326
7500
|
},
|
|
7327
|
-
[setDefaultFolder]
|
|
7501
|
+
[setDefaultFolder, requestComposerFocus]
|
|
7328
7502
|
);
|
|
7329
7503
|
const projectHome = settings.projectHome === true;
|
|
7330
7504
|
const homeProject = useHomeProject();
|
|
7331
7505
|
const onNewSessionOrFocus = reactExports.useCallback(() => {
|
|
7332
|
-
if (homeProject && activeSessionId == null)
|
|
7333
|
-
|
|
7334
|
-
}, [homeProject, activeSessionId]);
|
|
7506
|
+
if (!(homeProject && activeSessionId == null)) onNewSessionRef.current();
|
|
7507
|
+
requestComposerFocus();
|
|
7508
|
+
}, [homeProject, activeSessionId, requestComposerFocus]);
|
|
7335
7509
|
const chatsOpen = useChatDraft();
|
|
7336
7510
|
const onOpenChats = reactExports.useCallback(() => {
|
|
7337
7511
|
requestFolderlessDraft();
|
|
@@ -7437,6 +7611,7 @@ function Sidebar({ onNewSession, hasAuth, onOpenAuth, onOpenSettings }) {
|
|
|
7437
7611
|
function SidebarFilters() {
|
|
7438
7612
|
const { availableProjects, query, spacesOn, spaces, patchView, saveViewAsSpace } = useSessions();
|
|
7439
7613
|
const { enabled: remoteHosts } = useHosts();
|
|
7614
|
+
const { settings } = useSettings();
|
|
7440
7615
|
const onSaveView = useSaveViewAsSpace(saveViewAsSpace, spaces);
|
|
7441
7616
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7442
7617
|
SidebarFilterMenu,
|
|
@@ -7445,6 +7620,7 @@ function SidebarFilters() {
|
|
|
7445
7620
|
projects: availableProjects,
|
|
7446
7621
|
onChange: patchView,
|
|
7447
7622
|
hosts: remoteHosts,
|
|
7623
|
+
origin: settings.schedules === true,
|
|
7448
7624
|
agents: query.agents,
|
|
7449
7625
|
query,
|
|
7450
7626
|
...spacesOn && onSaveView ? { onSaveView } : {}
|
|
@@ -7654,159 +7830,6 @@ function usePinnedAccount(session) {
|
|
|
7654
7830
|
const found = catalog.find((e) => e.providerKey === providerKey && e.account?.id === account)?.account;
|
|
7655
7831
|
return found ? { label: found.label } : { label: "", signedOut: true };
|
|
7656
7832
|
}
|
|
7657
|
-
const EMPTY_SETTINGS = {
|
|
7658
|
-
schema: { categories: [], items: [] },
|
|
7659
|
-
actions: [],
|
|
7660
|
-
values: {},
|
|
7661
|
-
locked: []
|
|
7662
|
-
};
|
|
7663
|
-
const NO_INTEGRATIONS = [];
|
|
7664
|
-
const noop = { get: () => EMPTY_SETTINGS, subscribe: () => () => {
|
|
7665
|
-
} };
|
|
7666
|
-
const noIntegrations = { get: () => NO_INTEGRATIONS, subscribe: () => () => {
|
|
7667
|
-
} };
|
|
7668
|
-
const KIND_LABEL = {
|
|
7669
|
-
tools: "tool",
|
|
7670
|
-
agents: "agent",
|
|
7671
|
-
subagents: "sub-agent",
|
|
7672
|
-
models: "model",
|
|
7673
|
-
providers: "provider",
|
|
7674
|
-
mcp: "MCP server",
|
|
7675
|
-
skills: "skill"
|
|
7676
|
-
};
|
|
7677
|
-
function provenanceLabel(p) {
|
|
7678
|
-
if (p.removed) return `hidden by ${p.removedBy ?? p.changedBy.at(-1) ?? "an extension"}`;
|
|
7679
|
-
if (p.origin.kind === "extension" && p.changedBy.length <= 1)
|
|
7680
|
-
return `added by ${p.origin.id ?? p.changedBy[0] ?? "an extension"}`;
|
|
7681
|
-
return `modified by ${p.changedBy.join(", ")}`;
|
|
7682
|
-
}
|
|
7683
|
-
function errorText$1(err) {
|
|
7684
|
-
const error = extensionsErrorOf(err);
|
|
7685
|
-
if (error.code === "refused")
|
|
7686
|
-
return error.message ?? (error.reason === "locked" ? "Locked by the config file." : "Refused.");
|
|
7687
|
-
if (error.code === "unavailable") return "Not available here.";
|
|
7688
|
-
return error.message;
|
|
7689
|
-
}
|
|
7690
|
-
function IntegrationRow({ integration }) {
|
|
7691
|
-
const host2 = useExtensionsHost();
|
|
7692
|
-
const [keys, setKeys] = reactExports.useState({});
|
|
7693
|
-
const [busy, setBusy] = reactExports.useState(false);
|
|
7694
|
-
const [error, setError] = reactExports.useState(null);
|
|
7695
|
-
const run = (work) => {
|
|
7696
|
-
setBusy(true);
|
|
7697
|
-
setError(null);
|
|
7698
|
-
void Promise.resolve(work()).catch((err) => setError(errorText$1(err))).finally(() => setBusy(false));
|
|
7699
|
-
};
|
|
7700
|
-
const connections = integration.connections ?? (integration.connection ? [integration.connection] : []);
|
|
7701
|
-
const connected = connections.length > 0;
|
|
7702
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex flex-col gap-1.5 py-2", "data-integration": integration.id, children: [
|
|
7703
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7704
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[13px] font-medium", children: integration.name }),
|
|
7705
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[12px] text-[var(--zg-text-muted)]", children: !connected ? "Not connected" : connections.length === 1 ? "Connected" : `${connections.length} accounts` })
|
|
7706
|
-
] }),
|
|
7707
|
-
integration.description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[12px] text-[var(--zg-text-muted)]", children: integration.description }),
|
|
7708
|
-
connected && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { "aria-label": `${integration.name} accounts`, className: "flex flex-col gap-1", children: connections.map((c) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-center gap-2 text-[12px]", "data-connection": c.account, children: [
|
|
7709
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: c.label ?? c.account }),
|
|
7710
|
-
c.isDefault ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "zg-meta", children: "Default" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7711
|
-
"button",
|
|
7712
|
-
{
|
|
7713
|
-
type: "button",
|
|
7714
|
-
className: "text-[12px] underline",
|
|
7715
|
-
disabled: busy,
|
|
7716
|
-
"aria-label": `Make ${c.label ?? c.account} the default`,
|
|
7717
|
-
onClick: () => run(() => host2?.integrations?.setDefault(integration.id, c.account)),
|
|
7718
|
-
children: "Make default"
|
|
7719
|
-
}
|
|
7720
|
-
),
|
|
7721
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7722
|
-
"button",
|
|
7723
|
-
{
|
|
7724
|
-
type: "button",
|
|
7725
|
-
className: "ml-auto text-[12px] underline",
|
|
7726
|
-
disabled: busy,
|
|
7727
|
-
"aria-label": `Disconnect ${c.label ?? c.account}`,
|
|
7728
|
-
onClick: () => run(() => host2?.integrations?.disconnect(integration.id, { account: c.account })),
|
|
7729
|
-
children: "Disconnect"
|
|
7730
|
-
}
|
|
7731
|
-
)
|
|
7732
|
-
] }, c.account)) }),
|
|
7733
|
-
integration.methods.map(
|
|
7734
|
-
(method) => method.type === "apiKey" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
7735
|
-
"form",
|
|
7736
|
-
{
|
|
7737
|
-
className: "flex items-center gap-2",
|
|
7738
|
-
onSubmit: (e) => {
|
|
7739
|
-
e.preventDefault();
|
|
7740
|
-
run(
|
|
7741
|
-
() => host2?.integrations?.connect(integration.id, { methodId: method.id, key: keys[method.id] ?? "" }).then(() => setKeys((k) => ({ ...k, [method.id]: "" })))
|
|
7742
|
-
);
|
|
7743
|
-
},
|
|
7744
|
-
children: [
|
|
7745
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7746
|
-
"input",
|
|
7747
|
-
{
|
|
7748
|
-
type: "password",
|
|
7749
|
-
"aria-label": method.label,
|
|
7750
|
-
placeholder: method.placeholder ?? method.label,
|
|
7751
|
-
value: keys[method.id] ?? "",
|
|
7752
|
-
onChange: (e) => setKeys((k) => ({ ...k, [method.id]: e.target.value })),
|
|
7753
|
-
className: "zg-well flex-1 min-w-0 rounded px-2 py-1 text-[12px]"
|
|
7754
|
-
}
|
|
7755
|
-
),
|
|
7756
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "submit", disabled: busy || !keys[method.id], className: "text-[12px] underline", children: connected ? "Add account" : "Connect" })
|
|
7757
|
-
]
|
|
7758
|
-
},
|
|
7759
|
-
method.id
|
|
7760
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7761
|
-
"button",
|
|
7762
|
-
{
|
|
7763
|
-
type: "button",
|
|
7764
|
-
disabled: busy,
|
|
7765
|
-
className: "self-start text-[12px] underline",
|
|
7766
|
-
onClick: () => run(() => host2?.integrations?.connect(integration.id, { methodId: method.id })),
|
|
7767
|
-
children: connected ? `Add account with ${method.label}` : method.label
|
|
7768
|
-
},
|
|
7769
|
-
method.id
|
|
7770
|
-
)
|
|
7771
|
-
),
|
|
7772
|
-
error && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { role: "alert", className: "text-[12px] text-[var(--zg-danger)]", children: error })
|
|
7773
|
-
] });
|
|
7774
|
-
}
|
|
7775
|
-
function ExtensionSettingsSection() {
|
|
7776
|
-
const host2 = useExtensionsHost();
|
|
7777
|
-
const wire2 = useReadable(host2?.settings?.wire ?? noop);
|
|
7778
|
-
const integrations = useReadable(host2?.integrations?.list ?? noIntegrations);
|
|
7779
|
-
if (!host2) return null;
|
|
7780
|
-
const locked = wire2.locked;
|
|
7781
|
-
const changes = wire2.provenance ?? [];
|
|
7782
|
-
if (locked.length === 0 && changes.length === 0 && integrations.length === 0) return null;
|
|
7783
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "aria-label": "Extension settings", className: "flex flex-col gap-4", children: [
|
|
7784
|
-
locked.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
7785
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-[12px] uppercase tracking-wide text-[var(--zg-text-muted)]", children: "Set by the config file" }),
|
|
7786
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "text-[12px]", children: locked.map((id) => {
|
|
7787
|
-
const [extension = "", key2 = ""] = id.split(":");
|
|
7788
|
-
const value = wire2.values[extension]?.[key2];
|
|
7789
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex gap-2 py-0.5", "data-locked-setting": id, children: [
|
|
7790
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono", children: id }),
|
|
7791
|
-
value !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[var(--zg-text-muted)]", children: String(value) }),
|
|
7792
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto text-[var(--zg-text-muted)]", children: "locked" })
|
|
7793
|
-
] }, id);
|
|
7794
|
-
}) })
|
|
7795
|
-
] }),
|
|
7796
|
-
changes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
7797
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-[12px] uppercase tracking-wide text-[var(--zg-text-muted)]", children: "Changed by extensions" }),
|
|
7798
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "text-[12px]", children: changes.map((p) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex gap-2 py-0.5", "data-catalog-change": `${p.kind}:${p.id}`, children: [
|
|
7799
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[var(--zg-text-muted)]", children: KIND_LABEL[p.kind] }),
|
|
7800
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono", children: p.id }),
|
|
7801
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto text-[var(--zg-text-muted)]", children: provenanceLabel(p) })
|
|
7802
|
-
] }, `${p.kind}:${p.id}`)) })
|
|
7803
|
-
] }),
|
|
7804
|
-
integrations.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
7805
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-[12px] uppercase tracking-wide text-[var(--zg-text-muted)]", children: "Integrations" }),
|
|
7806
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "divide-y divide-[var(--zg-border)]", children: integrations.map((integration) => /* @__PURE__ */ jsxRuntimeExports.jsx(IntegrationRow, { integration }, integration.id)) })
|
|
7807
|
-
] })
|
|
7808
|
-
] });
|
|
7809
|
-
}
|
|
7810
7833
|
const LABELS = {
|
|
7811
7834
|
home: "Show the zidane folder in Finder",
|
|
7812
7835
|
skills: "Show the skills folder in Finder",
|
|
@@ -8510,15 +8533,15 @@ function InboxAttention() {
|
|
|
8510
8533
|
const overlayShowing = overlay && state2.open && !budget.panelHidden;
|
|
8511
8534
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InboxAttention$1, { sessionId: activeSessionId, actions, reveal: !overlay || overlayShowing });
|
|
8512
8535
|
}
|
|
8513
|
-
function
|
|
8536
|
+
function QueueAttention() {
|
|
8514
8537
|
const actions = usePanelActions();
|
|
8515
8538
|
const { activeSessionId } = useSessions();
|
|
8516
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8539
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(QueueAttention$1, { sessionId: activeSessionId, actions });
|
|
8517
8540
|
}
|
|
8518
|
-
function
|
|
8541
|
+
function SecretsAttention() {
|
|
8519
8542
|
const actions = usePanelActions();
|
|
8520
8543
|
const { activeSessionId } = useSessions();
|
|
8521
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8544
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SecretsAttention$1, { sessionId: activeSessionId, actions });
|
|
8522
8545
|
}
|
|
8523
8546
|
const WINDOWS_SOURCE_ID = "builtin:windows";
|
|
8524
8547
|
const ITEMS = [
|
|
@@ -8803,7 +8826,7 @@ function createElectronFilesHost(options) {
|
|
|
8803
8826
|
},
|
|
8804
8827
|
system: {
|
|
8805
8828
|
isLocal: isOnThisMachine,
|
|
8806
|
-
openPath: (path) => system2.openPath(path).catch(swallow),
|
|
8829
|
+
openPath: (path, at) => system2.openPath(path, at).catch(swallow),
|
|
8807
8830
|
revealPath: (path) => system2.revealPath(path).catch(swallow)
|
|
8808
8831
|
},
|
|
8809
8832
|
mediaUrl: (source) => source.kind === "file" ? fileMediaUrl(source.cwd, source.path, source.version) : diffMediaUrl(source.cwd, source.path, source.side, source.version)
|
|
@@ -8889,7 +8912,11 @@ function PaletteHost({
|
|
|
8889
8912
|
return {
|
|
8890
8913
|
open: p.state.open,
|
|
8891
8914
|
activeTabId: p.activeTab?.id,
|
|
8892
|
-
|
|
8915
|
+
// A row's icon is a class: an extension's logo or letter leaves it out.
|
|
8916
|
+
tabs: p.tabs.map((t) => {
|
|
8917
|
+
const mark = panelTabMark(t);
|
|
8918
|
+
return { id: t.id, label: t.label, icon: mark?.kind === "icon" ? mark.gui : void 0 };
|
|
8919
|
+
}),
|
|
8893
8920
|
attention: p.attention,
|
|
8894
8921
|
toggle: p.toggle,
|
|
8895
8922
|
close: p.close,
|
|
@@ -9484,7 +9511,11 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9484
9511
|
deleteSession,
|
|
9485
9512
|
spacesOn,
|
|
9486
9513
|
stepSpace,
|
|
9487
|
-
setFavorite
|
|
9514
|
+
setFavorite,
|
|
9515
|
+
canGoBack,
|
|
9516
|
+
canGoForward,
|
|
9517
|
+
goBack,
|
|
9518
|
+
goForward
|
|
9488
9519
|
} = useSessions();
|
|
9489
9520
|
const { hostById } = useHosts();
|
|
9490
9521
|
const { isOpen: modalIsOpen, open: openModal, close: closeModal } = useModal();
|
|
@@ -9515,7 +9546,7 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9515
9546
|
useProviderReadyPoll(providerStatus, modalIsOpen);
|
|
9516
9547
|
const claudeImportAvailable = useClaudeImportAvailable();
|
|
9517
9548
|
const openSettings = reactExports.useCallback(
|
|
9518
|
-
(initialTab, initialFocus) => {
|
|
9549
|
+
(initialTab, initialFocus, initialHostId) => {
|
|
9519
9550
|
const settingsCwd = activeSession?.hostId ? defaultFolder : activeSession?.cwd ?? defaultFolder;
|
|
9520
9551
|
const activeServer = activeSession?.hostId ? hostById(activeSession.hostId) : void 0;
|
|
9521
9552
|
const actions = [
|
|
@@ -9574,6 +9605,7 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9574
9605
|
actions,
|
|
9575
9606
|
initialTab,
|
|
9576
9607
|
initialFocus,
|
|
9608
|
+
...initialHostId ? { initialHostId } : {},
|
|
9577
9609
|
onCreateExtension: () => modal.open(
|
|
9578
9610
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9579
9611
|
CreateExtensionModal,
|
|
@@ -9731,6 +9763,10 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9731
9763
|
...forkTurn ? { fork: forkTurn } : {},
|
|
9732
9764
|
blocked: modalOwnsInput
|
|
9733
9765
|
});
|
|
9766
|
+
const [newSessionFocus, setNewSessionFocus] = reactExports.useState(0);
|
|
9767
|
+
reactExports.useEffect(() => {
|
|
9768
|
+
if (newSessionFocus > 0) focusComposerWhenReady();
|
|
9769
|
+
}, [newSessionFocus]);
|
|
9734
9770
|
const handlers = reactExports.useMemo(() => {
|
|
9735
9771
|
const { openTodos, openArtifacts, panelNext, panelPrev, closeTab, tabNext, tabPrev } = workspaceKeys;
|
|
9736
9772
|
return {
|
|
@@ -9738,7 +9774,14 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9738
9774
|
// not be mistaken for an `initialTab`.
|
|
9739
9775
|
openSettings: () => openSettings(),
|
|
9740
9776
|
// A standalone window shows one session: no sidebar, no switching from here.
|
|
9741
|
-
...standalone ? {} : {
|
|
9777
|
+
...standalone ? {} : {
|
|
9778
|
+
toggleSidebar,
|
|
9779
|
+
openMainSession,
|
|
9780
|
+
newSession: () => {
|
|
9781
|
+
setActiveSessionId(null);
|
|
9782
|
+
setNewSessionFocus((n) => n + 1);
|
|
9783
|
+
}
|
|
9784
|
+
},
|
|
9742
9785
|
...activeSession ? { openSessionDetails } : {},
|
|
9743
9786
|
...activeSession ? { cycleAgent } : {},
|
|
9744
9787
|
...activeSession ? { openEffortPicker } : {},
|
|
@@ -9782,10 +9825,39 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9782
9825
|
settings.terminal
|
|
9783
9826
|
]);
|
|
9784
9827
|
useKeyCommands(handlers);
|
|
9828
|
+
const historyHandlers = reactExports.useMemo(
|
|
9829
|
+
() => ({
|
|
9830
|
+
...canGoBack ? { navigateBack: goBack } : {},
|
|
9831
|
+
...canGoForward ? { navigateForward: goForward } : {}
|
|
9832
|
+
}),
|
|
9833
|
+
[canGoBack, canGoForward, goBack, goForward]
|
|
9834
|
+
);
|
|
9835
|
+
useKeyCommands(historyHandlers);
|
|
9836
|
+
reactExports.useEffect(() => {
|
|
9837
|
+
if (standalone) return void 0;
|
|
9838
|
+
const onMouseUp = (event) => {
|
|
9839
|
+
if (event.button !== 3 && event.button !== 4 || modalOwnsInput()) return;
|
|
9840
|
+
event.preventDefault();
|
|
9841
|
+
if (event.button === 3) goBack();
|
|
9842
|
+
else goForward();
|
|
9843
|
+
};
|
|
9844
|
+
window.addEventListener("mouseup", onMouseUp);
|
|
9845
|
+
return () => window.removeEventListener("mouseup", onMouseUp);
|
|
9846
|
+
}, [goBack, goForward, modalOwnsInput]);
|
|
9785
9847
|
reactExports.useEffect(() => {
|
|
9786
9848
|
setTerminalSettingsOpener(() => openSettings("advanced", "useDaemon"));
|
|
9787
9849
|
return () => setTerminalSettingsOpener(null);
|
|
9788
9850
|
}, [openSettings]);
|
|
9851
|
+
reactExports.useEffect(() => {
|
|
9852
|
+
setAuthSettingsOpener(
|
|
9853
|
+
(target, hostId) => target.source === "mcp" ? openSettings("mcp", void 0, hostId ?? void 0) : openSettings(
|
|
9854
|
+
"accounts",
|
|
9855
|
+
target.source === "provider" ? target.field === "apikey" ? accountsKeyFocusId(target.provider) : accountsFocusId(target.provider) : void 0,
|
|
9856
|
+
hostId ?? void 0
|
|
9857
|
+
)
|
|
9858
|
+
);
|
|
9859
|
+
return () => setAuthSettingsOpener(null);
|
|
9860
|
+
}, [openSettings]);
|
|
9789
9861
|
reactExports.useEffect(() => {
|
|
9790
9862
|
setHostSettingsOpener((hostId) => openSettings("hosts", hostSettingsFocus(hostId)));
|
|
9791
9863
|
return () => setHostSettingsOpener(null);
|
|
@@ -9806,8 +9878,8 @@ function AppShell({ appearanceFirstRun: appearanceFirstRun2 }) {
|
|
|
9806
9878
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Browser", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserHost, {}) }),
|
|
9807
9879
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Browser requests", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserRequests, {}) }),
|
|
9808
9880
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Inbox", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(InboxAttention, {}) }),
|
|
9809
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Todos", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TodosAttention, {}) }),
|
|
9810
9881
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Queue", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueueAttention, {}) }),
|
|
9882
|
+
settings.secrets === true && /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Secrets", resetKey: regionKey, fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SecretsAttention, {}) }),
|
|
9811
9883
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { region: "Performance overlay", fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PerfHudMount, { onOpen: () => openSettings("performance") }) }),
|
|
9812
9884
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col h-full w-full", children: windowRole.kind === "session" && windowRole.parts === "panels" ? (
|
|
9813
9885
|
// The session's side panels, alone in their window.
|
|
@@ -9895,8 +9967,8 @@ function ApprovalsHostProvider({ children }) {
|
|
|
9895
9967
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalsProvider, { host: host2, children });
|
|
9896
9968
|
}
|
|
9897
9969
|
const key = (sessionId) => sessionId;
|
|
9898
|
-
function createElectronSessionHost(api, onStreamSignal2) {
|
|
9899
|
-
const
|
|
9970
|
+
function createElectronSessionHost(api, onStreamSignal2, onSettingsWritten) {
|
|
9971
|
+
const plans = createPlansState((sessionId) => api.plans.get(key(sessionId)));
|
|
9900
9972
|
const queue = createQueueState({
|
|
9901
9973
|
list: (sessionId) => api.queue.list(key(sessionId)),
|
|
9902
9974
|
remove: (sessionId, id) => api.queue.remove(key(sessionId), id),
|
|
@@ -9904,12 +9976,26 @@ function createElectronSessionHost(api, onStreamSignal2) {
|
|
|
9904
9976
|
});
|
|
9905
9977
|
const artifacts = createArtifactsState((sessionId) => api.artifacts.list({ sessionId: key(sessionId) }));
|
|
9906
9978
|
const work = createRunningWorkState((sessionId) => api.chat.listWork(key(sessionId)));
|
|
9979
|
+
const secrets = createSecretsState((sessionId) => api.secrets.list(key(sessionId)));
|
|
9980
|
+
const schedules = createSchedulesState({ status: () => api.schedules.status(), list: () => api.schedules.list() });
|
|
9981
|
+
const unwrapped = async (call) => {
|
|
9982
|
+
try {
|
|
9983
|
+
return await call();
|
|
9984
|
+
} catch (err) {
|
|
9985
|
+
throw new Error(ipcErrorMessage(err));
|
|
9986
|
+
}
|
|
9987
|
+
};
|
|
9907
9988
|
const ownerKey = (sessionId, owner) => owner === void 0 ? key(sessionId) : siblingSessionKey(key(sessionId), owner);
|
|
9908
9989
|
return {
|
|
9909
|
-
|
|
9910
|
-
snapshot:
|
|
9911
|
-
refresh:
|
|
9912
|
-
|
|
9990
|
+
plans: {
|
|
9991
|
+
snapshot: plans.snapshot,
|
|
9992
|
+
refresh: plans.refresh,
|
|
9993
|
+
edit: async (sessionId, planId, op) => {
|
|
9994
|
+
plans.push(sessionId, await unwrapped(() => api.plans.edit(key(sessionId), planId, op)));
|
|
9995
|
+
},
|
|
9996
|
+
control: async (sessionId, planId, action) => {
|
|
9997
|
+
plans.push(sessionId, await unwrapped(() => api.plans.control(key(sessionId), planId, action)));
|
|
9998
|
+
},
|
|
9913
9999
|
retry: async (sessionId, message) => {
|
|
9914
10000
|
await api.chat.pushQueued(key(sessionId), message);
|
|
9915
10001
|
}
|
|
@@ -9917,7 +10003,7 @@ function createElectronSessionHost(api, onStreamSignal2) {
|
|
|
9917
10003
|
queue: {
|
|
9918
10004
|
items: queue.items,
|
|
9919
10005
|
refresh: queue.refresh,
|
|
9920
|
-
add: async (sessionId, text, options) => (await api.queue.add(key(sessionId), text, options?.activatedSkills, options?.attachments)).delivered,
|
|
10006
|
+
add: async (sessionId, text, options) => (await api.queue.add(key(sessionId), text, options?.activatedSkills, options?.attachments, options?.delivery)).delivered,
|
|
9921
10007
|
remove: queue.drop,
|
|
9922
10008
|
update: queue.edit,
|
|
9923
10009
|
attachments: (sessionId, id) => api.queue.attachments(key(sessionId), id).catch(() => null),
|
|
@@ -9931,6 +10017,36 @@ function createElectronSessionHost(api, onStreamSignal2) {
|
|
|
9931
10017
|
await api.artifacts.refresh(ownerKey(sessionId, artifact.sessionId), artifact, options?.force ? { force: true } : void 0).catch(() => void 0);
|
|
9932
10018
|
}
|
|
9933
10019
|
},
|
|
10020
|
+
secrets: {
|
|
10021
|
+
entries: secrets.entries,
|
|
10022
|
+
refresh: secrets.refresh,
|
|
10023
|
+
save: (sessionId, input) => unwrapped(() => api.secrets.save(key(sessionId), { name: input.name, value: input.value, ttl: input.ttl })),
|
|
10024
|
+
revoke: async (sessionId, name) => (await unwrapped(() => api.secrets.revoke(key(sessionId), name))).removed
|
|
10025
|
+
},
|
|
10026
|
+
schedules: {
|
|
10027
|
+
status: schedules.status,
|
|
10028
|
+
all: schedules.all,
|
|
10029
|
+
forSession: schedules.forSession,
|
|
10030
|
+
refresh: schedules.refresh,
|
|
10031
|
+
ensure: schedules.ensure,
|
|
10032
|
+
create: async (input) => {
|
|
10033
|
+
const created = await unwrapped(() => api.schedules.create(input));
|
|
10034
|
+
schedules.apply(created);
|
|
10035
|
+
return created;
|
|
10036
|
+
},
|
|
10037
|
+
update: async (id, patch) => {
|
|
10038
|
+
const updated = await unwrapped(() => api.schedules.update(id, patch));
|
|
10039
|
+
schedules.apply(updated);
|
|
10040
|
+
return updated;
|
|
10041
|
+
},
|
|
10042
|
+
remove: async (id) => {
|
|
10043
|
+
const removed = await unwrapped(() => api.schedules.delete(id));
|
|
10044
|
+
schedules.drop(id);
|
|
10045
|
+
return removed;
|
|
10046
|
+
},
|
|
10047
|
+
runNow: (id) => unwrapped(() => api.schedules.runNow(id)),
|
|
10048
|
+
fires: (id, limit) => unwrapped(() => api.schedules.fires(id, limit))
|
|
10049
|
+
},
|
|
9934
10050
|
runningWork: {
|
|
9935
10051
|
items: work.items,
|
|
9936
10052
|
refresh: work.refresh,
|
|
@@ -9988,16 +10104,25 @@ function createElectronSessionHost(api, onStreamSignal2) {
|
|
|
9988
10104
|
connect() {
|
|
9989
10105
|
const off = [
|
|
9990
10106
|
onStreamSignal2((signal) => {
|
|
9991
|
-
if (signal.kind === "
|
|
10107
|
+
if (signal.kind === "plans:snapshot") plans.push(signal.sessionId, signal.snapshot);
|
|
9992
10108
|
else if (signal.kind === "work:snapshot") work.push(signal.sessionId, signal.items);
|
|
9993
10109
|
else if (signal.kind === "artifact:recorded" || signal.kind === "artifact:changed")
|
|
9994
10110
|
artifacts.wake(signal.sessionId);
|
|
10111
|
+
else if (signal.kind === "secrets:changed") secrets.wakeAll();
|
|
10112
|
+
else if (signal.kind === "schedules:changed") schedules.wake();
|
|
9995
10113
|
}),
|
|
9996
10114
|
api.sessions.onChanged((signal) => {
|
|
9997
|
-
if (signal.op === "delete")
|
|
10115
|
+
if (signal.op === "delete") {
|
|
10116
|
+
plans.forget(signal.sessionId);
|
|
10117
|
+
secrets.forget(signal.sessionId);
|
|
10118
|
+
}
|
|
9998
10119
|
}),
|
|
9999
10120
|
api.queue.onChanged((signal) => queue.replace(signal.sessionId, signal.items)),
|
|
10000
|
-
api.daemon.onState(({ connected }) =>
|
|
10121
|
+
api.daemon.onState(({ connected }) => {
|
|
10122
|
+
queue.reset(connected);
|
|
10123
|
+
schedules.wake();
|
|
10124
|
+
}),
|
|
10125
|
+
...onSettingsWritten ? [onSettingsWritten(() => schedules.wake())] : []
|
|
10001
10126
|
];
|
|
10002
10127
|
return () => {
|
|
10003
10128
|
for (const stop of off) stop();
|
|
@@ -10006,7 +10131,13 @@ function createElectronSessionHost(api, onStreamSignal2) {
|
|
|
10006
10131
|
};
|
|
10007
10132
|
}
|
|
10008
10133
|
function SessionHostProvider({ children }) {
|
|
10009
|
-
const [host2] = reactExports.useState(
|
|
10134
|
+
const [host2] = reactExports.useState(
|
|
10135
|
+
() => createElectronSessionHost(
|
|
10136
|
+
window.api,
|
|
10137
|
+
onStreamSignal,
|
|
10138
|
+
(cb) => subscribeInvalidation({ topics: ["settings"], scope: hostScope(null) }, () => cb())
|
|
10139
|
+
)
|
|
10140
|
+
);
|
|
10010
10141
|
reactExports.useEffect(() => host2.connect(), [host2]);
|
|
10011
10142
|
const { settings } = useSettings();
|
|
10012
10143
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SessionProvider, { host: host2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProviderUsageProvider, { autoLoad: settings.subscriptionUsage !== false, children }) });
|
|
@@ -10187,9 +10318,14 @@ function toChatModelProviders(entries) {
|
|
|
10187
10318
|
function toPromptAttachments(attachments) {
|
|
10188
10319
|
return attachments.flatMap((att) => {
|
|
10189
10320
|
const match = /^data:([^;]+);base64,(.+)$/.exec(att.dataUrl ?? "");
|
|
10190
|
-
|
|
10321
|
+
if (!match) return [];
|
|
10322
|
+
const original = wireOriginal(att.original);
|
|
10323
|
+
return [
|
|
10324
|
+
{ mediaType: match[1] ?? att.mediaType, data: match[2] ?? "", name: att.name, ...original ? { original } : {} }
|
|
10325
|
+
];
|
|
10191
10326
|
});
|
|
10192
10327
|
}
|
|
10328
|
+
const withoutOriginals = (attachments) => attachments.map(({ original: _original, ...att }) => att);
|
|
10193
10329
|
const errorText = (err) => err?.message ?? String(err);
|
|
10194
10330
|
function mapped(source, map) {
|
|
10195
10331
|
let last;
|
|
@@ -10321,12 +10457,6 @@ function createElectronChatHost(api, streams, options = {}) {
|
|
|
10321
10457
|
if (thinking)
|
|
10322
10458
|
await api.sessions.setEffort(sessionId, thinking);
|
|
10323
10459
|
};
|
|
10324
|
-
const whileRunning = (deliver) => async (id, message) => {
|
|
10325
|
-
const sessionId = id;
|
|
10326
|
-
if (!store2.getRunningSnapshot(sessionId)) return false;
|
|
10327
|
-
await deliver(sessionId, message);
|
|
10328
|
-
return true;
|
|
10329
|
-
};
|
|
10330
10460
|
return {
|
|
10331
10461
|
sessions: {
|
|
10332
10462
|
list: mapped(rows2, (all) => all.map(toChatSession)),
|
|
@@ -10371,23 +10501,45 @@ function createElectronChatHost(api, streams, options = {}) {
|
|
|
10371
10501
|
...api.sidebar ? { views: electronSidebarViews(api.sidebar) } : {}
|
|
10372
10502
|
},
|
|
10373
10503
|
transcript,
|
|
10374
|
-
async send({
|
|
10504
|
+
async send({
|
|
10505
|
+
sessionId: id,
|
|
10506
|
+
prompt: prompt2,
|
|
10507
|
+
attachments,
|
|
10508
|
+
model,
|
|
10509
|
+
thinking,
|
|
10510
|
+
activatedSkills,
|
|
10511
|
+
refs,
|
|
10512
|
+
echo,
|
|
10513
|
+
keepDraft,
|
|
10514
|
+
delivery
|
|
10515
|
+
}) {
|
|
10375
10516
|
const sessionId = id;
|
|
10517
|
+
if (delivery) {
|
|
10518
|
+
await applyChoice(sessionId, model, thinking);
|
|
10519
|
+
await api.queue.add(
|
|
10520
|
+
sessionId,
|
|
10521
|
+
prompt2,
|
|
10522
|
+
activatedSkills ? [...activatedSkills] : void 0,
|
|
10523
|
+
toPromptAttachments(attachments ?? []),
|
|
10524
|
+
delivery
|
|
10525
|
+
);
|
|
10526
|
+
return;
|
|
10527
|
+
}
|
|
10376
10528
|
const echoed = echo !== false;
|
|
10377
|
-
if (echoed) store2.appendUserPrompt(sessionId,
|
|
10529
|
+
if (echoed) store2.appendUserPrompt(sessionId, prompt2, refs, withoutOriginals(attachments ?? []));
|
|
10378
10530
|
try {
|
|
10379
10531
|
await applyChoice(sessionId, model, thinking);
|
|
10380
10532
|
const uploads = toPromptAttachments(attachments ?? []);
|
|
10381
10533
|
await api.chat.send({
|
|
10382
10534
|
sessionId,
|
|
10383
|
-
prompt,
|
|
10535
|
+
prompt: prompt2,
|
|
10384
10536
|
...activatedSkills ? { activatedSkills: [...activatedSkills] } : {},
|
|
10385
10537
|
...uploads.length > 0 ? { attachments: uploads } : {},
|
|
10386
10538
|
...keepDraft ? { keepDraft: true } : {}
|
|
10387
10539
|
});
|
|
10388
10540
|
} catch (err) {
|
|
10389
10541
|
store2.appendErrorEvent(sessionId, errorText(err));
|
|
10390
|
-
if (echoed) store2.dropPendingEcho(sessionId,
|
|
10542
|
+
if (echoed) store2.dropPendingEcho(sessionId, prompt2);
|
|
10391
10543
|
throw err;
|
|
10392
10544
|
}
|
|
10393
10545
|
},
|
|
@@ -10401,13 +10553,13 @@ function createElectronChatHost(api, streams, options = {}) {
|
|
|
10401
10553
|
}
|
|
10402
10554
|
} : {},
|
|
10403
10555
|
...api.auth ? { providerReady: (cwd) => api.auth.hasAny(cwd) } : {},
|
|
10404
|
-
steer: whileRunning((sessionId, message) => api.chat.steer(sessionId, message)),
|
|
10405
|
-
followUp: whileRunning((sessionId, message) => api.chat.followUp(sessionId, message)),
|
|
10406
10556
|
interactions: {
|
|
10407
10557
|
pending,
|
|
10408
10558
|
all: () => allInteractions,
|
|
10409
10559
|
async answer(requestId, response) {
|
|
10410
|
-
await api.interactions.respond(requestId, response)
|
|
10560
|
+
await api.interactions.respond(requestId, response).catch((err) => {
|
|
10561
|
+
throw new Error(ipcErrorMessage(err));
|
|
10562
|
+
});
|
|
10411
10563
|
resolveInteraction(requestId);
|
|
10412
10564
|
},
|
|
10413
10565
|
async cancel(requestId, reason) {
|
|
@@ -10453,10 +10605,39 @@ function BadgeMenu({ children }) {
|
|
|
10453
10605
|
}),
|
|
10454
10606
|
[focused]
|
|
10455
10607
|
);
|
|
10608
|
+
const browser = useBadgeBrowser();
|
|
10456
10609
|
const openSession = useOptionalSessionsActions()?.setActiveSessionId ?? null;
|
|
10457
10610
|
const open = useChipOpener(null);
|
|
10458
10611
|
const chips = reactExports.useMemo(() => ({ cwd: null, repoWebBase: null, open }), [open]);
|
|
10459
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(OpenSessionContext.Provider, { value: openSession, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownContext.Provider, { value: chips, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BadgeMenuProvider, { composer, system: window.api.system, children }) }) });
|
|
10612
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(OpenSessionContext.Provider, { value: openSession, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownContext.Provider, { value: chips, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BadgeMenuProvider, { composer, system: window.api.system, browser, children }) }) });
|
|
10613
|
+
}
|
|
10614
|
+
function useBadgeBrowser() {
|
|
10615
|
+
const [name, setName] = reactExports.useState(null);
|
|
10616
|
+
reactExports.useEffect(() => {
|
|
10617
|
+
const read2 = () => void window.api.system.defaultBrowser().then(setName).catch(() => {
|
|
10618
|
+
});
|
|
10619
|
+
read2();
|
|
10620
|
+
window.addEventListener("focus", read2);
|
|
10621
|
+
return () => window.removeEventListener("focus", read2);
|
|
10622
|
+
}, []);
|
|
10623
|
+
const { sessions, activeSessionId } = useSessions();
|
|
10624
|
+
const panels = usePanelActions();
|
|
10625
|
+
const browserOn = useSettings().settings.browser !== false;
|
|
10626
|
+
const latest = reactExports.useRef({ sessions, panels });
|
|
10627
|
+
latest.current = { sessions, panels };
|
|
10628
|
+
return reactExports.useMemo(() => {
|
|
10629
|
+
if (!browserOn || !activeSessionId) return { name };
|
|
10630
|
+
return {
|
|
10631
|
+
name,
|
|
10632
|
+
openInPane: (url) => {
|
|
10633
|
+
const { sessions: list2, panels: p } = latest.current;
|
|
10634
|
+
const row = list2.find((s) => s.id === activeSessionId);
|
|
10635
|
+
const cwd = browserStore.page(activeSessionId)?.cwd ?? (row?.projectRoot || row?.cwd || "");
|
|
10636
|
+
browserStore.open(activeSessionId, cwd, url);
|
|
10637
|
+
p.requestAttention(BROWSER_PANEL_ID, { open: true });
|
|
10638
|
+
}
|
|
10639
|
+
};
|
|
10640
|
+
}, [name, browserOn, activeSessionId]);
|
|
10460
10641
|
}
|
|
10461
10642
|
const RECENTS_KEY = "zg:palette:v1";
|
|
10462
10643
|
function createElectronPaletteHost(options) {
|
|
@@ -10464,7 +10645,7 @@ function createElectronPaletteHost(options) {
|
|
|
10464
10645
|
return {
|
|
10465
10646
|
listCommands: async ({ cwd, hostId }) => api.commands.list(cwd, hostId ?? null),
|
|
10466
10647
|
listFiles: async ({ root }) => {
|
|
10467
|
-
const entries = await api.workspace.list(root, { showIgnored: false });
|
|
10648
|
+
const { entries } = await api.workspace.list(root, { showIgnored: false });
|
|
10468
10649
|
return entries.map((e) => ({ path: e.path, kind: e.kind }));
|
|
10469
10650
|
},
|
|
10470
10651
|
extensions: {
|
|
@@ -10787,7 +10968,7 @@ const subscribe = (listener) => {
|
|
|
10787
10968
|
listeners.add(listener);
|
|
10788
10969
|
return () => void listeners.delete(listener);
|
|
10789
10970
|
};
|
|
10790
|
-
const EditorWorkerPool = reactExports.lazy(() => __vitePreload(() => import("./EditorWorkers-
|
|
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 })));
|
|
10791
10972
|
function EditorWorkersHold() {
|
|
10792
10973
|
const on2 = reactExports.useSyncExternalStore(
|
|
10793
10974
|
subscribe,
|