@agimon-ai/po-web-dashboard 0.0.0-alpha.48 → 0.0.0-alpha.49
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/dist/core.cjs +2 -0
- package/dist/core.d.mts +3 -3
- package/dist/core.mjs +3 -3
- package/dist/index.cjs +2 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/web/features/sessions/useSessionRail.cjs +118 -101
- package/dist/web/features/sessions/useSessionRail.cjs.map +1 -1
- package/dist/web/features/sessions/useSessionRail.mjs +119 -102
- package/dist/web/features/sessions/useSessionRail.mjs.map +1 -1
- package/dist/web/lib/sessionRailModel.cjs +27 -0
- package/dist/web/lib/sessionRailModel.cjs.map +1 -1
- package/dist/web/lib/sessionRailModel.d.mts +6 -0
- package/dist/web/lib/sessionRailModel.d.mts.map +1 -1
- package/dist/web/lib/sessionRailModel.mjs +28 -2
- package/dist/web/lib/sessionRailModel.mjs.map +1 -1
- package/dist/web/lib/sessionSummary.cjs +12 -0
- package/dist/web/lib/sessionSummary.cjs.map +1 -1
- package/dist/web/lib/sessionSummary.d.mts +2 -0
- package/dist/web/lib/sessionSummary.d.mts.map +1 -1
- package/dist/web/lib/sessionSummary.mjs +12 -1
- package/dist/web/lib/sessionSummary.mjs.map +1 -1
- package/dist/web/stores/sessionsStore.cjs +3 -10
- package/dist/web/stores/sessionsStore.cjs.map +1 -1
- package/dist/web/stores/sessionsStore.d.mts.map +1 -1
- package/dist/web/stores/sessionsStore.mjs +1 -8
- package/dist/web/stores/sessionsStore.mjs.map +1 -1
- package/package.json +5 -5
package/dist/core.cjs
CHANGED
|
@@ -223,6 +223,7 @@ exports.resolveParentId = require_sessionsStore.resolveParentId;
|
|
|
223
223
|
exports.resubscribeThreads = require_threadStore.resubscribeThreads;
|
|
224
224
|
exports.resumeQueueCommand = require_commands.resumeQueueCommand;
|
|
225
225
|
exports.resumeQueuedMessages = require_sessionStore.resumeQueuedMessages;
|
|
226
|
+
exports.reuseRailWorkspaces = require_sessionRailModel.reuseRailWorkspaces;
|
|
226
227
|
exports.rewindCommand = require_commands.rewindCommand;
|
|
227
228
|
exports.rewindToMessage = require_sessionStore.rewindToMessage;
|
|
228
229
|
exports.runCommand = require_sessionStore.runCommand;
|
|
@@ -271,6 +272,7 @@ exports.subscribeActivitySources = require_composition.subscribeActivitySources;
|
|
|
271
272
|
exports.subscribeThread = require_threadStore.subscribeThread;
|
|
272
273
|
exports.subscribeWebPluginRegistry = require_pluginRegistry.subscribeWebPluginRegistry;
|
|
273
274
|
exports.summariseArgs = require_sessionModel.summariseArgs;
|
|
275
|
+
exports.summaryValueEqual = require_sessionSummary.summaryValueEqual;
|
|
274
276
|
exports.textFromContent = require_sessionModel.textFromContent;
|
|
275
277
|
exports.threadStoreKey = require_threadStore.threadStoreKey;
|
|
276
278
|
exports.toolMessageProps = require_toolMessageProps.toolMessageProps;
|
package/dist/core.d.mts
CHANGED
|
@@ -13,8 +13,8 @@ import { TransientTabActions, pluginSessionContext, pluginSlotProps } from "./we
|
|
|
13
13
|
import { toolMessageProps } from "./web/lib/toolMessageProps.mjs";
|
|
14
14
|
import { ToolRendererBoundary } from "./web/lib/ToolRendererBoundary.mjs";
|
|
15
15
|
import { updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
|
|
16
|
-
import { AttachPhase, StatusClock, StatusLineInput, abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine } from "./web/lib/sessionSummary.mjs";
|
|
17
|
-
import { LEGACY_WORKSPACE_ID, RailRestartState, RailSessionInput, SessionRailModelInput, buildRailWorkspaces, pendingSetupView, railSessionStatus, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
16
|
+
import { AttachPhase, StatusClock, StatusLineInput, abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine, summaryValueEqual } from "./web/lib/sessionSummary.mjs";
|
|
17
|
+
import { LEGACY_WORKSPACE_ID, RailRestartState, RailSessionInput, SessionRailModelInput, buildRailWorkspaces, pendingSetupView, railSessionStatus, reuseRailWorkspaces, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
18
18
|
import { SessionMeta, SessionsState, UPDATE_REQUIRED_REASON, activeSessionId, applySessionBacklog, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, beginSessionTransfer, completeSessionTransfer, markSocketClosed, markUpdateRequired, noSessions, resetSessions, resolveParentId, sameRailEntries, sameRailEntry, sessionsStore, setActiveSession, useActiveSessionMeta, useNoSessions, useRailEntries, useRailEntry, waitForSession } from "./web/stores/sessionsStore.mjs";
|
|
19
19
|
import { HistoryPage, abortRun, answerDialogConfirm, answerDialogValue, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySessionFrame, applySessionLifecycle, applyThreadFrame, beginSessionReplay, bindHistoryReader, cancelDialog, clearQueuedMessages, deleteQueuedMessage, dropSessionStore, endSessionReplay, loadModelChoices, promoteQueuedMessage, queueFollowUp, queueFollowUpWithAck, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseProtocolTranscript, renameSession, requestLatestHistory, requestNewerHistory, requestOlderHistory, resetSessionStore, resetSessionStores, resumeQueuedMessages, rewindToMessage, runCommand, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, sessionStoreFor, setAgentLock, setHasNewerHistory, setSessionStreamed, streamedSessions, submitMessage, submitMessageWithAck, useActiveSession, useHasOlderHistory } from "./web/stores/sessionStore.mjs";
|
|
20
20
|
import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
|
|
@@ -34,4 +34,4 @@ import { bindSessionFileLinkModes, sessionMinorModes } from "./web/stores/fileLi
|
|
|
34
34
|
import { createToolCompletionTabs } from "./web/lib/toolCompletionTabs.mjs";
|
|
35
35
|
import { createWebMcpSimulator } from "./web/lib/webmcpSimulator.mjs";
|
|
36
36
|
import { localHostId, parseHostKey, qualifyHostId, qualifyHostKey, splitHostId } from "./web/lib/hostIdentity.mjs";
|
|
37
|
-
export { type ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerPromptClaim, type ContextGroup, type ContextItemSource, DialogMethod, DialogPromptClaim, DialogRequest, EditorTextRequest, EntryKind, HOST_SLOTS, HistoryPage, ImageRefScope, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, type InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, IntercomEntry, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MenuClaim, MenuKind, MenuState, type MinorMode, ModelChoice, type NativeTemplateCatalog, NoticeEntry, ProfileIdentity, QueuedEntry, RailRestartState, RailSessionInput, ReduceSessionOptions, ResolvedFill, RpcImage, type SelectionAxis, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettledEntry, StatusClock, StatusLineInput, TRIGGER_CHARS, ThreadTranscriptReader, TimelineEntry, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolRendererBoundary, type TransientTabActions, UPDATE_REQUIRED_REASON, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginRegistry, WorkspacesState, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
|
|
37
|
+
export { type ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerPromptClaim, type ContextGroup, type ContextItemSource, DialogMethod, DialogPromptClaim, DialogRequest, EditorTextRequest, EntryKind, HOST_SLOTS, HistoryPage, ImageRefScope, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, type InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, IntercomEntry, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MenuClaim, MenuKind, MenuState, type MinorMode, ModelChoice, type NativeTemplateCatalog, NoticeEntry, ProfileIdentity, QueuedEntry, RailRestartState, RailSessionInput, ReduceSessionOptions, ResolvedFill, RpcImage, type SelectionAxis, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettledEntry, StatusClock, StatusLineInput, TRIGGER_CHARS, ThreadTranscriptReader, TimelineEntry, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolRendererBoundary, type TransientTabActions, UPDATE_REQUIRED_REASON, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginRegistry, WorkspacesState, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
|
package/dist/core.mjs
CHANGED
|
@@ -15,8 +15,8 @@ import { bindHostTransport, bindTransport, createDashboardTransport, invokeServe
|
|
|
15
15
|
import { pluginSessionContext, pluginSlotProps } from "./web/lib/pluginSlotProps.mjs";
|
|
16
16
|
import { createProtocolHubSocket } from "./web/lib/protocolHubSocket.mjs";
|
|
17
17
|
import { appendQueued, appendUserPrompt, applySelectionAnswer, clearDialog, clearQueuedEntries, imagesFromContent, initialSessionState, isSupportedImageMimeType, prependHistory, reduceSession, removeQueuedEntry, replaceQueuedEntries, selectionStatuses, summariseArgs, textFromContent } from "./web/lib/sessionModel.mjs";
|
|
18
|
-
import { abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine } from "./web/lib/sessionSummary.mjs";
|
|
19
|
-
import { LEGACY_WORKSPACE_ID, buildRailWorkspaces, pendingSetupView, railSessionStatus, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
18
|
+
import { abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine, summaryValueEqual } from "./web/lib/sessionSummary.mjs";
|
|
19
|
+
import { LEGACY_WORKSPACE_ID, buildRailWorkspaces, pendingSetupView, railSessionStatus, reuseRailWorkspaces, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
20
20
|
import { createToolCompletionTabs } from "./web/lib/toolCompletionTabs.mjs";
|
|
21
21
|
import { toolMessageProps } from "./web/lib/toolMessageProps.mjs";
|
|
22
22
|
import { toolPromptClaim } from "./web/lib/toolPrompt.mjs";
|
|
@@ -34,4 +34,4 @@ import { closeTransientTab, dropTransientTabs, findTransientTab, openTransientTa
|
|
|
34
34
|
import { applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, resetWorkspaces, selectWorkspace, workspacesStore } from "./web/stores/workspacesStore.mjs";
|
|
35
35
|
import { updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
|
|
36
36
|
import { createWebMcpSimulator } from "./web/lib/webmcpSimulator.mjs";
|
|
37
|
-
export { BUILTIN_COMMANDS, HOST_SLOTS, ImageRefScope, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, TRIGGER_CHARS, ToolRendererBoundary, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
|
|
37
|
+
export { BUILTIN_COMMANDS, HOST_SLOTS, ImageRefScope, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, TRIGGER_CHARS, ToolRendererBoundary, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
|
package/dist/index.cjs
CHANGED
|
@@ -447,6 +447,7 @@ exports.resumeQueuedMessages = require_sessionStore.resumeQueuedMessages;
|
|
|
447
447
|
exports.resumeSession = require_hubApi.resumeSession;
|
|
448
448
|
exports.resumeWorkspaceSession = require_hubApi.resumeWorkspaceSession;
|
|
449
449
|
exports.retryWebPluginCompositions = require_pluginCompositions.retryWebPluginCompositions;
|
|
450
|
+
exports.reuseRailWorkspaces = require_sessionRailModel.reuseRailWorkspaces;
|
|
450
451
|
exports.reviveSession = require_hubApi.reviveSession;
|
|
451
452
|
exports.revokeDevice = require_remoteApi.revokeDevice;
|
|
452
453
|
exports.revokePairedDevice = require_remoteAccessStore.revokePairedDevice;
|
|
@@ -530,6 +531,7 @@ exports.subscribeActivitySources = require_composition.subscribeActivitySources;
|
|
|
530
531
|
exports.subscribeThread = require_threadStore.subscribeThread;
|
|
531
532
|
exports.subscribeWebPluginRegistry = require_pluginRegistry.subscribeWebPluginRegistry;
|
|
532
533
|
exports.summariseArgs = require_sessionModel.summariseArgs;
|
|
534
|
+
exports.summaryValueEqual = require_sessionSummary.summaryValueEqual;
|
|
533
535
|
exports.tabComposerContext = require_composerStore.tabComposerContext;
|
|
534
536
|
exports.templateStore = require_templateStore.templateStore;
|
|
535
537
|
exports.textFromContent = require_sessionModel.textFromContent;
|
package/dist/index.d.mts
CHANGED
|
@@ -12,8 +12,8 @@ import { UiTraceRecord, UiTraceSink, flushUiTrace, noteRender, noteStoreUpdate,
|
|
|
12
12
|
import { TransientTabActions, pluginSessionContext, pluginSlotProps } from "./web/lib/pluginSlotProps.mjs";
|
|
13
13
|
import { toolMessageProps } from "./web/lib/toolMessageProps.mjs";
|
|
14
14
|
import { DialogDraft, dialogDraftStore, updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
|
|
15
|
-
import { AttachPhase, StatusClock, StatusLineInput, abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine } from "./web/lib/sessionSummary.mjs";
|
|
16
|
-
import { LEGACY_WORKSPACE_ID, RailRestartState, RailSessionInput, SessionRailModelInput, buildRailWorkspaces, pendingSetupView, railSessionStatus, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
15
|
+
import { AttachPhase, StatusClock, StatusLineInput, abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine, summaryValueEqual } from "./web/lib/sessionSummary.mjs";
|
|
16
|
+
import { LEGACY_WORKSPACE_ID, RailRestartState, RailSessionInput, SessionRailModelInput, buildRailWorkspaces, pendingSetupView, railSessionStatus, reuseRailWorkspaces, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
17
17
|
import { SessionMeta, SessionsState, UPDATE_REQUIRED_REASON, activeSessionId, applySessionBacklog, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, beginSessionTransfer, completeSessionTransfer, markSocketClosed, markUpdateRequired, noSessions, resetSessions, resolveParentId, sameRailEntries, sameRailEntry, sessionsStore, setActiveSession, useActiveSessionMeta, useNoSessions, useRailEntries, useRailEntry, waitForSession } from "./web/stores/sessionsStore.mjs";
|
|
18
18
|
import { HistoryPage, abortRun, answerDialogConfirm, answerDialogValue, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySessionFrame, applySessionLifecycle, applyThreadFrame, beginSessionReplay, bindHistoryReader, cancelDialog, clearQueuedMessages, deleteQueuedMessage, dropSessionStore, endSessionReplay, loadModelChoices, promoteQueuedMessage, queueFollowUp, queueFollowUpWithAck, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseProtocolTranscript, renameSession, requestLatestHistory, requestNewerHistory, requestOlderHistory, resetSessionStore, resetSessionStores, resumeQueuedMessages, rewindToMessage, runCommand, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, sessionStoreFor, setAgentLock, setHasNewerHistory, setSessionStreamed, streamedSessions, submitMessage, submitMessageWithAck, useActiveSession, useHasOlderHistory } from "./web/stores/sessionStore.mjs";
|
|
19
19
|
import { BrowserPerformanceEvent, BrowserPerformanceEventName, browserReadyDuration, flushBrowserTelemetry, installBrowserErrorReporting, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace } from "./web/lib/browserTelemetry.mjs";
|
|
@@ -82,4 +82,4 @@ import { WorkspaceAdmissionDraft, admitDashboardWorkspace, resetWorkspaceAdmissi
|
|
|
82
82
|
import { EMPTY_SETTINGS_DRAFT, SettingsDraftState, SettingsDraftTarget, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
|
|
83
83
|
import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
|
|
84
84
|
import { DashboardRendererProvider, DashboardRenderers } from "./web/lib/dashboardRenderers.mjs";
|
|
85
|
-
export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerPromptClaim, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogPromptClaim, DialogRequest, DockTab, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, EditorTextRequest, EntryKind, FetchItemDetailResult, FileLinkResolver, FileMention, GroupUnit, HOST_SLOTS, HistoryPage, ImageSettingsResult, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, InstalledWebTemplate, IntercomEntry, LEGACY_WORKSPACE_ID, LeaderConflict, LeaderGroup, LeaderOption, LivePushStatus, LoginFlowResult, LogoutResult, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, MenuClaim, MenuKind, MenuState, MinorMode, MinorModeAvailability, MinorModeSource, ModelChoice, NativeTemplateCatalog, NewSessionDraft, NewSessionState, NoticeEntry, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, ResolvedFill, RestartSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ReviveSessionResult, RpcImage, STEP_UP_HEADER_NAME, Selection, SelectionAxis, SessionAsset, SessionGroupsResult, SessionHistoryResult, SessionMcpResult, SessionMcpViewState, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettingsDraftState, SettingsDraftTarget, SettingsSection, SettingsWorkspace, SettledEntry, SingleUnit, StateResult, StatusClock, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebPluginRegistry, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
|
|
85
|
+
export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerPromptClaim, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogPromptClaim, DialogRequest, DockTab, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, EditorTextRequest, EntryKind, FetchItemDetailResult, FileLinkResolver, FileMention, GroupUnit, HOST_SLOTS, HistoryPage, ImageSettingsResult, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, InstalledWebTemplate, IntercomEntry, LEGACY_WORKSPACE_ID, LeaderConflict, LeaderGroup, LeaderOption, LivePushStatus, LoginFlowResult, LogoutResult, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, MenuClaim, MenuKind, MenuState, MinorMode, MinorModeAvailability, MinorModeSource, ModelChoice, NativeTemplateCatalog, NewSessionDraft, NewSessionState, NoticeEntry, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, ResolvedFill, RestartSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ReviveSessionResult, RpcImage, STEP_UP_HEADER_NAME, Selection, SelectionAxis, SessionAsset, SessionGroupsResult, SessionHistoryResult, SessionMcpResult, SessionMcpViewState, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettingsDraftState, SettingsDraftTarget, SettingsSection, SettingsWorkspace, SettledEntry, SingleUnit, StateResult, StatusClock, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebPluginRegistry, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
|
package/dist/index.mjs
CHANGED
|
@@ -41,8 +41,8 @@ import { approvePairing, denyPairing, disableRemoteAccess, enableRemoteAccess, f
|
|
|
41
41
|
import { loadSessionAsset, uploadSessionAttachment } from "./web/lib/sessionAsset.mjs";
|
|
42
42
|
import { loadSessionAvatar } from "./web/lib/sessionAvatar.mjs";
|
|
43
43
|
import { createSessionMcpClient, isSessionMcpActivity, listSessionMcpClients, readSessionMcpActivity, readSessionMcpConfig, removeSessionMcpSetup, revokeSessionMcpClient } from "./web/lib/sessionMcpApi.mjs";
|
|
44
|
-
import { abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine } from "./web/lib/sessionSummary.mjs";
|
|
45
|
-
import { LEGACY_WORKSPACE_ID, buildRailWorkspaces, pendingSetupView, railSessionStatus, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
44
|
+
import { abbreviateCwd, personaInitials, runningCount, sessionStatusClock, sessionStatusLine, summaryValueEqual } from "./web/lib/sessionSummary.mjs";
|
|
45
|
+
import { LEGACY_WORKSPACE_ID, buildRailWorkspaces, pendingSetupView, railSessionStatus, reuseRailWorkspaces, workspaceName } from "./web/lib/sessionRailModel.mjs";
|
|
46
46
|
import { listSettingsModels, listSettingsRepositories, readImageSettings, readRepositorySettings, readSettingsConfig, writeImageSettings, writeRepositorySelection, writeSettingsValue } from "./web/lib/settingsApi.mjs";
|
|
47
47
|
import { canSaveSettings, plannedSettingsWrites, settingsKeyOf, settingsLockedReason } from "./web/lib/settingsDraft.mjs";
|
|
48
48
|
import { DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, settingsSection, settingsSections } from "./web/lib/settingsSections.mjs";
|
|
@@ -82,4 +82,4 @@ import { admitDashboardWorkspace, resetWorkspaceAdmission, updateWorkspaceAdmiss
|
|
|
82
82
|
import { dialogDraftStore, updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
|
|
83
83
|
import { EMPTY_SETTINGS_DRAFT, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
|
|
84
84
|
import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
|
|
85
|
-
export { BUILTIN_COMMANDS, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, HOST_SLOTS, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, STEP_UP_HEADER_NAME, TRIGGER_CHARS, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
|
|
85
|
+
export { BUILTIN_COMMANDS, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, HOST_SLOTS, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, STEP_UP_HEADER_NAME, TRIGGER_CHARS, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
|
|
@@ -152,7 +152,8 @@ function useSessionRail({ onDismiss }) {
|
|
|
152
152
|
onDismiss,
|
|
153
153
|
selectedWorkspaceId
|
|
154
154
|
]);
|
|
155
|
-
const
|
|
155
|
+
const committedWorkspaces = (0, react.useRef)([]);
|
|
156
|
+
const workspaces = (0, react.useMemo)(() => require_sessionRailModel.reuseRailWorkspaces(committedWorkspaces.current, require_sessionRailModel.buildRailWorkspaces({
|
|
156
157
|
order,
|
|
157
158
|
byId,
|
|
158
159
|
activeId,
|
|
@@ -162,7 +163,7 @@ function useSessionRail({ onDismiss }) {
|
|
|
162
163
|
now: Date.now(),
|
|
163
164
|
restarts,
|
|
164
165
|
avatarUrls
|
|
165
|
-
}), [
|
|
166
|
+
})), [
|
|
166
167
|
order,
|
|
167
168
|
byId,
|
|
168
169
|
activeId,
|
|
@@ -171,6 +172,120 @@ function useSessionRail({ onDismiss }) {
|
|
|
171
172
|
restarts,
|
|
172
173
|
avatarUrls
|
|
173
174
|
]);
|
|
175
|
+
(0, react.useEffect)(() => {
|
|
176
|
+
committedWorkspaces.current = workspaces;
|
|
177
|
+
}, [workspaces]);
|
|
178
|
+
const latest = (0, react.useRef)({
|
|
179
|
+
navigate,
|
|
180
|
+
onDismiss,
|
|
181
|
+
selectedWorkspaceId
|
|
182
|
+
});
|
|
183
|
+
(0, react.useEffect)(() => {
|
|
184
|
+
latest.current = {
|
|
185
|
+
navigate,
|
|
186
|
+
onDismiss,
|
|
187
|
+
selectedWorkspaceId
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
const actions = (0, react.useMemo)(() => ({
|
|
191
|
+
openSession(sessionId) {
|
|
192
|
+
latest.current.onDismiss?.();
|
|
193
|
+
latest.current.navigate({
|
|
194
|
+
to: "/session/$sessionId",
|
|
195
|
+
params: { sessionId }
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
renameSession(sessionId, name) {
|
|
199
|
+
const trimmed = name.trim();
|
|
200
|
+
if (trimmed !== "" && trimmed !== require_sessionsStore.sessionsStore.state.byId[sessionId]?.summary.name) require_sessionStore.renameSession(trimmed, sessionId);
|
|
201
|
+
},
|
|
202
|
+
async setSessionGroups(sessionId, groups) {
|
|
203
|
+
const result = await require_hubApi.setSessionGroups(sessionId, groups);
|
|
204
|
+
return "error" in result ? { error: result.error } : void 0;
|
|
205
|
+
},
|
|
206
|
+
async renameGroup(from, to) {
|
|
207
|
+
const result = await require_hubApi.renameSessionGroup(from, to);
|
|
208
|
+
return "error" in result ? { error: result.error } : void 0;
|
|
209
|
+
},
|
|
210
|
+
async deleteGroup(name) {
|
|
211
|
+
const result = await require_hubApi.deleteSessionGroup(name);
|
|
212
|
+
return "error" in result ? { error: result.error } : void 0;
|
|
213
|
+
},
|
|
214
|
+
restartSession(sessionId) {
|
|
215
|
+
require_railDialogStore.restartDashboardSession(sessionId);
|
|
216
|
+
},
|
|
217
|
+
async removeSession(sessionId) {
|
|
218
|
+
const result = await require_hubApi.stopSession(sessionId);
|
|
219
|
+
if ("error" in result) return { error: result.error };
|
|
220
|
+
require_sessionsStore.applySessionRemoved({ sessionId });
|
|
221
|
+
},
|
|
222
|
+
resumeSession(sessionId) {
|
|
223
|
+
require_railDialogStore.openResumeDialog({ sessionId });
|
|
224
|
+
},
|
|
225
|
+
createSession(workspaceId) {
|
|
226
|
+
require_workspacesStore.selectWorkspace(workspaceId);
|
|
227
|
+
latest.current.onDismiss?.();
|
|
228
|
+
require_newSessionStore.openNewSession(workspaceId);
|
|
229
|
+
},
|
|
230
|
+
resumeInWorkspace(workspaceId) {
|
|
231
|
+
require_railDialogStore.openResumeDialog({ workspaceId });
|
|
232
|
+
},
|
|
233
|
+
openWorkspaceSettings(workspaceId) {
|
|
234
|
+
require_workspacesStore.selectWorkspace(workspaceId);
|
|
235
|
+
latest.current.onDismiss?.();
|
|
236
|
+
latest.current.navigate({
|
|
237
|
+
to: "/settings/$section",
|
|
238
|
+
params: { section: require_settingsSections.DEFAULT_REPOSITORY_SETTINGS_SECTION },
|
|
239
|
+
search: { workspace: workspaceId }
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
async deleteWorkspace(workspaceId) {
|
|
243
|
+
const result = await require_hubApi.removeWorkspace(workspaceId);
|
|
244
|
+
if ("error" in result) return { error: result.error };
|
|
245
|
+
require_workspacesStore.applyWorkspaceRemoved({ workspaceId });
|
|
246
|
+
},
|
|
247
|
+
openAddWorkspace() {
|
|
248
|
+
latest.current.onDismiss?.();
|
|
249
|
+
require_newSessionStore.openNewSession(null);
|
|
250
|
+
},
|
|
251
|
+
closeAddWorkspace() {
|
|
252
|
+
if (require_workspaceAdmissionStore.workspaceAdmissionStore.state.pending) return;
|
|
253
|
+
require_workspaceAdmissionStore.resetWorkspaceAdmission();
|
|
254
|
+
require_newSessionStore.closeNewSession();
|
|
255
|
+
},
|
|
256
|
+
async addWorkspace(input) {
|
|
257
|
+
const result = await require_workspaceAdmissionStore.admitDashboardWorkspace(input);
|
|
258
|
+
if (result === void 0) require_newSessionStore.closeNewSession();
|
|
259
|
+
return result;
|
|
260
|
+
},
|
|
261
|
+
searchDirectories: require_hubApi.searchDirectories,
|
|
262
|
+
listDirectory: require_hubApi.listDirectory,
|
|
263
|
+
async removePendingSetup(sessionId, setupId) {
|
|
264
|
+
const workspaceId = require_sessionsStore.sessionsStore.state.byId[sessionId]?.summary.workspaceId;
|
|
265
|
+
if (workspaceId === void 0) return { error: "This session belongs to no workspace." };
|
|
266
|
+
const result = await require_sessionMcpApi.removeSessionMcpSetup(workspaceId, sessionId, setupId);
|
|
267
|
+
return "error" in result ? { error: result.error } : void 0;
|
|
268
|
+
},
|
|
269
|
+
openSettings() {
|
|
270
|
+
latest.current.onDismiss?.();
|
|
271
|
+
latest.current.navigate({
|
|
272
|
+
to: "/settings/$section",
|
|
273
|
+
params: { section: require_settingsSections.DEFAULT_SETTINGS_SECTION },
|
|
274
|
+
search: { workspace: latest.current.selectedWorkspaceId ?? void 0 }
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
openRemoteAccess() {
|
|
278
|
+
latest.current.onDismiss?.();
|
|
279
|
+
require_remoteAccessStore.openRemoteDialog();
|
|
280
|
+
},
|
|
281
|
+
turnRemoteAccessOff() {
|
|
282
|
+
require_remoteAccessStore.turnRemoteAccessOff();
|
|
283
|
+
},
|
|
284
|
+
renderSessionMenuItems: (sessionId) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PluginSurface.PluginSurface, {
|
|
285
|
+
slot: require_pluginRegistry.HOST_SLOTS.sessionMenu,
|
|
286
|
+
sessionId
|
|
287
|
+
})
|
|
288
|
+
}), []);
|
|
174
289
|
const addingWorkspace = creating.open && (creating.workspaceId === null || workspacesById[creating.workspaceId] === void 0);
|
|
175
290
|
return {
|
|
176
291
|
workspaces,
|
|
@@ -186,105 +301,7 @@ function useSessionRail({ onDismiss }) {
|
|
|
186
301
|
sessionId: activeId
|
|
187
302
|
}),
|
|
188
303
|
...addingWorkspace ? { addWorkspace: { suggestedPaths: [] } } : {},
|
|
189
|
-
actions
|
|
190
|
-
openSession(sessionId) {
|
|
191
|
-
onDismiss?.();
|
|
192
|
-
navigate({
|
|
193
|
-
to: "/session/$sessionId",
|
|
194
|
-
params: { sessionId }
|
|
195
|
-
});
|
|
196
|
-
},
|
|
197
|
-
renameSession(sessionId, name) {
|
|
198
|
-
const trimmed = name.trim();
|
|
199
|
-
if (trimmed !== "" && trimmed !== byId[sessionId]?.summary.name) require_sessionStore.renameSession(trimmed, sessionId);
|
|
200
|
-
},
|
|
201
|
-
async setSessionGroups(sessionId, groups) {
|
|
202
|
-
const result = await require_hubApi.setSessionGroups(sessionId, groups);
|
|
203
|
-
return "error" in result ? { error: result.error } : void 0;
|
|
204
|
-
},
|
|
205
|
-
async renameGroup(from, to) {
|
|
206
|
-
const result = await require_hubApi.renameSessionGroup(from, to);
|
|
207
|
-
return "error" in result ? { error: result.error } : void 0;
|
|
208
|
-
},
|
|
209
|
-
async deleteGroup(name) {
|
|
210
|
-
const result = await require_hubApi.deleteSessionGroup(name);
|
|
211
|
-
return "error" in result ? { error: result.error } : void 0;
|
|
212
|
-
},
|
|
213
|
-
restartSession(sessionId) {
|
|
214
|
-
require_railDialogStore.restartDashboardSession(sessionId);
|
|
215
|
-
},
|
|
216
|
-
async removeSession(sessionId) {
|
|
217
|
-
const result = await require_hubApi.stopSession(sessionId);
|
|
218
|
-
if ("error" in result) return { error: result.error };
|
|
219
|
-
require_sessionsStore.applySessionRemoved({ sessionId });
|
|
220
|
-
},
|
|
221
|
-
resumeSession(sessionId) {
|
|
222
|
-
require_railDialogStore.openResumeDialog({ sessionId });
|
|
223
|
-
},
|
|
224
|
-
createSession(workspaceId) {
|
|
225
|
-
require_workspacesStore.selectWorkspace(workspaceId);
|
|
226
|
-
onDismiss?.();
|
|
227
|
-
require_newSessionStore.openNewSession(workspaceId);
|
|
228
|
-
},
|
|
229
|
-
resumeInWorkspace(workspaceId) {
|
|
230
|
-
require_railDialogStore.openResumeDialog({ workspaceId });
|
|
231
|
-
},
|
|
232
|
-
openWorkspaceSettings(workspaceId) {
|
|
233
|
-
require_workspacesStore.selectWorkspace(workspaceId);
|
|
234
|
-
onDismiss?.();
|
|
235
|
-
navigate({
|
|
236
|
-
to: "/settings/$section",
|
|
237
|
-
params: { section: require_settingsSections.DEFAULT_REPOSITORY_SETTINGS_SECTION },
|
|
238
|
-
search: { workspace: workspaceId }
|
|
239
|
-
});
|
|
240
|
-
},
|
|
241
|
-
async deleteWorkspace(workspaceId) {
|
|
242
|
-
const result = await require_hubApi.removeWorkspace(workspaceId);
|
|
243
|
-
if ("error" in result) return { error: result.error };
|
|
244
|
-
require_workspacesStore.applyWorkspaceRemoved({ workspaceId });
|
|
245
|
-
},
|
|
246
|
-
openAddWorkspace() {
|
|
247
|
-
onDismiss?.();
|
|
248
|
-
require_newSessionStore.openNewSession(null);
|
|
249
|
-
},
|
|
250
|
-
closeAddWorkspace() {
|
|
251
|
-
if (require_workspaceAdmissionStore.workspaceAdmissionStore.state.pending) return;
|
|
252
|
-
require_workspaceAdmissionStore.resetWorkspaceAdmission();
|
|
253
|
-
require_newSessionStore.closeNewSession();
|
|
254
|
-
},
|
|
255
|
-
async addWorkspace(input) {
|
|
256
|
-
const result = await require_workspaceAdmissionStore.admitDashboardWorkspace(input);
|
|
257
|
-
if (result === void 0) require_newSessionStore.closeNewSession();
|
|
258
|
-
return result;
|
|
259
|
-
},
|
|
260
|
-
searchDirectories: require_hubApi.searchDirectories,
|
|
261
|
-
listDirectory: require_hubApi.listDirectory,
|
|
262
|
-
async removePendingSetup(sessionId, setupId) {
|
|
263
|
-
const workspaceId = byId[sessionId]?.summary.workspaceId;
|
|
264
|
-
if (workspaceId === void 0) return { error: "This session belongs to no workspace." };
|
|
265
|
-
const result = await require_sessionMcpApi.removeSessionMcpSetup(workspaceId, sessionId, setupId);
|
|
266
|
-
return "error" in result ? { error: result.error } : void 0;
|
|
267
|
-
},
|
|
268
|
-
openSettings() {
|
|
269
|
-
onDismiss?.();
|
|
270
|
-
navigate({
|
|
271
|
-
to: "/settings/$section",
|
|
272
|
-
params: { section: require_settingsSections.DEFAULT_SETTINGS_SECTION },
|
|
273
|
-
search: { workspace: selectedWorkspaceId ?? void 0 }
|
|
274
|
-
});
|
|
275
|
-
},
|
|
276
|
-
openRemoteAccess() {
|
|
277
|
-
onDismiss?.();
|
|
278
|
-
require_remoteAccessStore.openRemoteDialog();
|
|
279
|
-
},
|
|
280
|
-
turnRemoteAccessOff() {
|
|
281
|
-
require_remoteAccessStore.turnRemoteAccessOff();
|
|
282
|
-
},
|
|
283
|
-
renderSessionMenuItems: (sessionId) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PluginSurface.PluginSurface, {
|
|
284
|
-
slot: require_pluginRegistry.HOST_SLOTS.sessionMenu,
|
|
285
|
-
sessionId
|
|
286
|
-
})
|
|
287
|
-
}
|
|
304
|
+
actions
|
|
288
305
|
};
|
|
289
306
|
}
|
|
290
307
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSessionRail.cjs","names":["useState","useRef","loadSessionAvatar","useNavigate","useCallback","useStore","sessionsStore","useRailEntries","workspacesStore","sessionStoreFor","remoteAccessStore","newSessionStore","railRestartStore","listWorkspaces","paletteStore","useMemo","buildRailWorkspaces","resolveParentId","PluginSurface","HOST_SLOTS","setSessionGroups","renameSessionGroup","deleteSessionGroup","restartDashboardSession","stopSession","DEFAULT_REPOSITORY_SETTINGS_SECTION","removeWorkspace","workspaceAdmissionStore","admitDashboardWorkspace","removeSessionMcpSetup","DEFAULT_SETTINGS_SECTION","turnRemoteAccessOff"],"sources":["../../../../src/web/features/sessions/useSessionRail.tsx"],"sourcesContent":["import type { WebTemplateRail } from '@agimon-ai/po-core/web';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport {\n deleteSessionGroup,\n listDirectory,\n listWorkspaces,\n removeWorkspace,\n renameSessionGroup,\n searchDirectories,\n setSessionGroups,\n stopSession,\n} from '../../lib/hubApi';\nimport { HOST_SLOTS } from '../../lib/pluginRegistry';\nimport { loadSessionAvatar } from '../../lib/sessionAvatar';\nimport { removeSessionMcpSetup } from '../../lib/sessionMcpApi';\nimport { buildRailWorkspaces } from '../../lib/sessionRailModel';\nimport { DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION } from '../../lib/settingsSections';\nimport { closeNewSession, newSessionStore, openNewSession } from '../../stores/newSessionStore';\nimport { paletteStore } from '../../stores/paletteStore';\nimport { openResumeDialog, railRestartStore, restartDashboardSession } from '../../stores/railDialogStore';\nimport { openRemoteDialog, remoteAccessStore, turnRemoteAccessOff } from '../../stores/remoteAccessStore';\nimport {\n applySessionRemoved,\n resolveParentId,\n sessionsStore,\n type SessionMeta,\n useRailEntries,\n} from '../../stores/sessionsStore';\nimport { renameSession, sessionStoreFor } from '../../stores/sessionStore';\nimport {\n admitDashboardWorkspace,\n resetWorkspaceAdmission,\n workspaceAdmissionStore,\n} from '../../stores/workspaceAdmissionStore';\nimport {\n applyWorkspaceRemoved,\n applyWorkspacesSnapshot,\n selectWorkspace,\n workspacesStore,\n} from '../../stores/workspacesStore';\n\nfunction isEditable(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';\n}\n\n/** A key pressed inside an overlay belongs to that overlay, never to the rail. */\nfunction insideOverlay(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest('[role=\"dialog\"], [role=\"menu\"], [role=\"alertdialog\"]') !== null;\n}\n\n/**\n * Loads each distinct profile avatar once, keyed by profile and icon version so\n * sessions sharing a persona share one image, and revokes images no card shows.\n */\nfunction useSessionAvatars(order: readonly string[], byId: Readonly<Record<string, SessionMeta>>) {\n const wanted = new Map<string, string>();\n for (const id of order) {\n const profile = byId[id]?.summary.profile;\n if (profile?.iconVersion !== undefined) wanted.set(id, `${profile.name}:${profile.iconVersion}`);\n }\n const wantedKey = [...wanted].map(([id, key]) => `${id}=${key}`).join('\\n');\n const [loaded, setLoaded] = useState<Readonly<Record<string, string>>>({});\n const requested = useRef(new Set<string>());\n\n useEffect(() => {\n const keys = new Set(wanted.values());\n for (const [id, key] of wanted) {\n if (requested.current.has(key)) continue;\n requested.current.add(key);\n const version = key.slice(key.lastIndexOf(':') + 1);\n void loadSessionAvatar(id, version).then(\n (url) => setLoaded((previous) => ({ ...previous, [key]: url })),\n // A missing image leaves the initials in place; the next icon version retries.\n () => undefined,\n );\n }\n setLoaded((previous) => {\n const stale = Object.keys(previous).filter((key) => !keys.has(key));\n if (stale.length === 0) return previous;\n const next = { ...previous };\n for (const key of stale) {\n URL.revokeObjectURL(next[key]!);\n delete next[key];\n requested.current.delete(key);\n }\n return next;\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `wanted` is rebuilt each render; `wantedKey` tracks its content.\n }, [wantedKey]);\n\n useEffect(\n () => () => {\n setLoaded((previous) => {\n for (const url of Object.values(previous)) URL.revokeObjectURL(url);\n return {};\n });\n },\n [],\n );\n\n const urls: Record<string, string> = {};\n for (const [id, key] of wanted) {\n const url = loaded[key];\n if (url !== undefined) urls[id] = url;\n }\n return urls;\n}\n\n/**\n * The session rail as data and actions for the active template.\n *\n * Owns what must keep working whichever template renders (or hides) the rail:\n * the status clock, workspace hydration, the Ctrl+T and 1-9 shortcuts, and the\n * actions that reach the hub and the router.\n */\nexport function useSessionRail({ onDismiss }: { onDismiss?: () => void }): WebTemplateRail {\n const navigate = useNavigate();\n const scrollTop = useRef(0);\n const scrollRef = useCallback((element: HTMLElement | null) => {\n if (element === null) return;\n element.scrollTop = scrollTop.current;\n return () => {\n scrollTop.current = element.scrollTop;\n };\n }, []);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const workspacesById = useStore(workspacesStore, (state) => state.byId);\n const selectedWorkspaceId = useStore(workspacesStore, (state) => state.selectedId);\n const workspacesHydrated = useStore(workspacesStore, (state) => state.hydrated);\n const hasDialog = useStore(sessionStoreFor(activeId), (state) => state.dialog !== null);\n const remote = useStore(remoteAccessStore, (state) => state.view);\n const creating = useStore(newSessionStore, (state) => state);\n const restarts = useStore(railRestartStore);\n const avatarUrls = useSessionAvatars(order, byId);\n useEffect(() => {\n if (workspacesHydrated) return;\n let stale = false;\n void listWorkspaces().then((result) => {\n if (!stale && 'workspaces' in result) applyWorkspacesSnapshot(result);\n });\n return () => {\n stale = true;\n };\n }, [workspacesHydrated]);\n\n useEffect(() => {\n const workspaceId = activeId === null ? undefined : byId[activeId]?.summary.workspaceId;\n if (workspaceId !== undefined && workspacesById[workspaceId] !== undefined) selectWorkspace(workspaceId);\n }, [activeId, byId, workspacesById]);\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.ctrlKey && !event.metaKey && !event.altKey && event.key === 't') {\n event.preventDefault();\n onDismiss?.();\n openNewSession(selectedWorkspaceId);\n return;\n }\n if (event.ctrlKey || event.metaKey || event.altKey || event.defaultPrevented) return;\n if (isEditable(event.target) || insideOverlay(event.target) || paletteStore.state.open || hasDialog) return;\n const ordinal = Number.parseInt(event.key, 10);\n if (!Number.isInteger(ordinal) || ordinal < 1 || ordinal > 9) return;\n const target = order[ordinal - 1];\n if (target === undefined) return;\n event.preventDefault();\n onDismiss?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n }, [order, hasDialog, navigate, onDismiss, selectedWorkspaceId]);\n\n // Read once per change; each card's LiveDuration ages its own clock, so the rail keeps no ticking state.\n const workspaces = useMemo(\n () =>\n buildRailWorkspaces({\n order,\n byId,\n activeId,\n workspaceOrder,\n workspacesById,\n nested: new Set(order.filter((id) => resolveParentId(byId, id) !== undefined)),\n now: Date.now(),\n restarts,\n avatarUrls,\n }),\n [order, byId, activeId, workspaceOrder, workspacesById, restarts, avatarUrls],\n );\n\n const addingWorkspace =\n creating.open && (creating.workspaceId === null || workspacesById[creating.workspaceId] === undefined);\n\n return {\n workspaces,\n scrollRef,\n remote: {\n status: remote?.status ?? 'off',\n deviceCount: remote?.devices.length ?? 0,\n ...(remote?.publicUrl === undefined ? {} : { host: new URL(remote.publicUrl).host }),\n ...(remote?.error === undefined ? {} : { error: remote.error }),\n },\n pluginContent: <PluginSurface slot={HOST_SLOTS.rail} sessionId={activeId} />,\n ...(addingWorkspace ? { addWorkspace: { suggestedPaths: [] } } : {}),\n actions: {\n openSession(sessionId) {\n onDismiss?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId } });\n },\n renameSession(sessionId, name) {\n const trimmed = name.trim();\n if (trimmed !== '' && trimmed !== byId[sessionId]?.summary.name) renameSession(trimmed, sessionId);\n },\n async setSessionGroups(sessionId, groups) {\n const result = await setSessionGroups(sessionId, groups);\n return 'error' in result ? { error: result.error } : undefined;\n },\n async renameGroup(from, to) {\n const result = await renameSessionGroup(from, to);\n return 'error' in result ? { error: result.error } : undefined;\n },\n async deleteGroup(name) {\n const result = await deleteSessionGroup(name);\n return 'error' in result ? { error: result.error } : undefined;\n },\n restartSession(sessionId) {\n void restartDashboardSession(sessionId);\n },\n async removeSession(sessionId) {\n const result = await stopSession(sessionId);\n if ('error' in result) return { error: result.error };\n applySessionRemoved({ sessionId });\n return undefined;\n },\n resumeSession(sessionId) {\n openResumeDialog({ sessionId });\n },\n createSession(workspaceId) {\n selectWorkspace(workspaceId);\n onDismiss?.();\n openNewSession(workspaceId);\n },\n resumeInWorkspace(workspaceId) {\n openResumeDialog({ workspaceId });\n },\n openWorkspaceSettings(workspaceId) {\n selectWorkspace(workspaceId);\n onDismiss?.();\n void navigate({\n to: '/settings/$section',\n params: { section: DEFAULT_REPOSITORY_SETTINGS_SECTION },\n search: { workspace: workspaceId },\n });\n },\n async deleteWorkspace(workspaceId) {\n const result = await removeWorkspace(workspaceId);\n if ('error' in result) return { error: result.error };\n applyWorkspaceRemoved({ workspaceId });\n return undefined;\n },\n openAddWorkspace() {\n onDismiss?.();\n openNewSession(null);\n },\n closeAddWorkspace() {\n if (workspaceAdmissionStore.state.pending) return;\n resetWorkspaceAdmission();\n closeNewSession();\n },\n async addWorkspace(input) {\n const result = await admitDashboardWorkspace(input);\n if (result === undefined) closeNewSession();\n return result;\n },\n searchDirectories,\n listDirectory,\n async removePendingSetup(sessionId, setupId) {\n const workspaceId = byId[sessionId]?.summary.workspaceId;\n if (workspaceId === undefined) return { error: 'This session belongs to no workspace.' };\n const result = await removeSessionMcpSetup(workspaceId, sessionId, setupId);\n return 'error' in result ? { error: result.error } : undefined;\n },\n openSettings() {\n onDismiss?.();\n void navigate({\n to: '/settings/$section',\n params: { section: DEFAULT_SETTINGS_SECTION },\n search: { workspace: selectedWorkspaceId ?? undefined },\n });\n },\n openRemoteAccess() {\n onDismiss?.();\n openRemoteDialog();\n },\n turnRemoteAccessOff() {\n void turnRemoteAccessOff();\n },\n renderSessionMenuItems: (sessionId) => <PluginSurface slot={HOST_SLOTS.sessionMenu} sessionId={sessionId} />,\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6CA,SAAS,WAAW,QAAqC;CACvD,IAAI,EAAE,kBAAkB,cAAc,OAAO;CAC7C,OAAO,OAAO,qBAAqB,OAAO,YAAY,WAAW,OAAO,YAAY;AACtF;;AAGA,SAAS,cAAc,QAAqC;CAC1D,OAAO,kBAAkB,WAAW,OAAO,QAAQ,4DAAsD,MAAM;AACjH;;;;;AAMA,SAAS,k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State","useRef","loadSessionAvatar","useNavigate","useCallback","useStore","sessionsStore","useRailEntries","workspacesStore","sessionStoreFor","remoteAccessStore","newSessionStore","railRestartStore","listWorkspaces","paletteStore","useMemo","reuseRailWorkspaces","buildRailWorkspaces","resolveParentId","setSessionGroups","renameSessionGroup","deleteSessionGroup","restartDashboardSession","stopSession","DEFAULT_REPOSITORY_SETTINGS_SECTION","removeWorkspace","workspaceAdmissionStore","admitDashboardWorkspace","removeSessionMcpSetup","DEFAULT_SETTINGS_SECTION","turnRemoteAccessOff","PluginSurface","HOST_SLOTS"],"sources":["../../../../src/web/features/sessions/useSessionRail.tsx"],"sourcesContent":["import type { WebTemplateRail, WebTemplateRailWorkspace } from '@agimon-ai/po-core/web';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport {\n deleteSessionGroup,\n listDirectory,\n listWorkspaces,\n removeWorkspace,\n renameSessionGroup,\n searchDirectories,\n setSessionGroups,\n stopSession,\n} from '../../lib/hubApi';\nimport { HOST_SLOTS } from '../../lib/pluginRegistry';\nimport { loadSessionAvatar } from '../../lib/sessionAvatar';\nimport { removeSessionMcpSetup } from '../../lib/sessionMcpApi';\nimport { buildRailWorkspaces, reuseRailWorkspaces } from '../../lib/sessionRailModel';\nimport { DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION } from '../../lib/settingsSections';\nimport { closeNewSession, newSessionStore, openNewSession } from '../../stores/newSessionStore';\nimport { paletteStore } from '../../stores/paletteStore';\nimport { openResumeDialog, railRestartStore, restartDashboardSession } from '../../stores/railDialogStore';\nimport { openRemoteDialog, remoteAccessStore, turnRemoteAccessOff } from '../../stores/remoteAccessStore';\nimport {\n applySessionRemoved,\n resolveParentId,\n sessionsStore,\n type SessionMeta,\n useRailEntries,\n} from '../../stores/sessionsStore';\nimport { renameSession, sessionStoreFor } from '../../stores/sessionStore';\nimport {\n admitDashboardWorkspace,\n resetWorkspaceAdmission,\n workspaceAdmissionStore,\n} from '../../stores/workspaceAdmissionStore';\nimport {\n applyWorkspaceRemoved,\n applyWorkspacesSnapshot,\n selectWorkspace,\n workspacesStore,\n} from '../../stores/workspacesStore';\n\nfunction isEditable(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';\n}\n\n/** A key pressed inside an overlay belongs to that overlay, never to the rail. */\nfunction insideOverlay(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest('[role=\"dialog\"], [role=\"menu\"], [role=\"alertdialog\"]') !== null;\n}\n\n/**\n * Loads each distinct profile avatar once, keyed by profile and icon version so\n * sessions sharing a persona share one image, and revokes images no card shows.\n */\nfunction useSessionAvatars(order: readonly string[], byId: Readonly<Record<string, SessionMeta>>) {\n const wanted = new Map<string, string>();\n for (const id of order) {\n const profile = byId[id]?.summary.profile;\n if (profile?.iconVersion !== undefined) wanted.set(id, `${profile.name}:${profile.iconVersion}`);\n }\n const wantedKey = [...wanted].map(([id, key]) => `${id}=${key}`).join('\\n');\n const [loaded, setLoaded] = useState<Readonly<Record<string, string>>>({});\n const requested = useRef(new Set<string>());\n\n useEffect(() => {\n const keys = new Set(wanted.values());\n for (const [id, key] of wanted) {\n if (requested.current.has(key)) continue;\n requested.current.add(key);\n const version = key.slice(key.lastIndexOf(':') + 1);\n void loadSessionAvatar(id, version).then(\n (url) => setLoaded((previous) => ({ ...previous, [key]: url })),\n // A missing image leaves the initials in place; the next icon version retries.\n () => undefined,\n );\n }\n setLoaded((previous) => {\n const stale = Object.keys(previous).filter((key) => !keys.has(key));\n if (stale.length === 0) return previous;\n const next = { ...previous };\n for (const key of stale) {\n URL.revokeObjectURL(next[key]!);\n delete next[key];\n requested.current.delete(key);\n }\n return next;\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `wanted` is rebuilt each render; `wantedKey` tracks its content.\n }, [wantedKey]);\n\n useEffect(\n () => () => {\n setLoaded((previous) => {\n for (const url of Object.values(previous)) URL.revokeObjectURL(url);\n return {};\n });\n },\n [],\n );\n\n const urls: Record<string, string> = {};\n for (const [id, key] of wanted) {\n const url = loaded[key];\n if (url !== undefined) urls[id] = url;\n }\n return urls;\n}\n\n/**\n * The session rail as data and actions for the active template.\n *\n * Owns what must keep working whichever template renders (or hides) the rail:\n * the status clock, workspace hydration, the Ctrl+T and 1-9 shortcuts, and the\n * actions that reach the hub and the router.\n */\nexport function useSessionRail({ onDismiss }: { onDismiss?: () => void }): WebTemplateRail {\n const navigate = useNavigate();\n const scrollTop = useRef(0);\n const scrollRef = useCallback((element: HTMLElement | null) => {\n if (element === null) return;\n element.scrollTop = scrollTop.current;\n return () => {\n scrollTop.current = element.scrollTop;\n };\n }, []);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const workspacesById = useStore(workspacesStore, (state) => state.byId);\n const selectedWorkspaceId = useStore(workspacesStore, (state) => state.selectedId);\n const workspacesHydrated = useStore(workspacesStore, (state) => state.hydrated);\n const hasDialog = useStore(sessionStoreFor(activeId), (state) => state.dialog !== null);\n const remote = useStore(remoteAccessStore, (state) => state.view);\n const creating = useStore(newSessionStore, (state) => state);\n const restarts = useStore(railRestartStore);\n const avatarUrls = useSessionAvatars(order, byId);\n useEffect(() => {\n if (workspacesHydrated) return;\n let stale = false;\n void listWorkspaces().then((result) => {\n if (!stale && 'workspaces' in result) applyWorkspacesSnapshot(result);\n });\n return () => {\n stale = true;\n };\n }, [workspacesHydrated]);\n\n useEffect(() => {\n const workspaceId = activeId === null ? undefined : byId[activeId]?.summary.workspaceId;\n if (workspaceId !== undefined && workspacesById[workspaceId] !== undefined) selectWorkspace(workspaceId);\n }, [activeId, byId, workspacesById]);\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.ctrlKey && !event.metaKey && !event.altKey && event.key === 't') {\n event.preventDefault();\n onDismiss?.();\n openNewSession(selectedWorkspaceId);\n return;\n }\n if (event.ctrlKey || event.metaKey || event.altKey || event.defaultPrevented) return;\n if (isEditable(event.target) || insideOverlay(event.target) || paletteStore.state.open || hasDialog) return;\n const ordinal = Number.parseInt(event.key, 10);\n if (!Number.isInteger(ordinal) || ordinal < 1 || ordinal > 9) return;\n const target = order[ordinal - 1];\n if (target === undefined) return;\n event.preventDefault();\n onDismiss?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n }, [order, hasDialog, navigate, onDismiss, selectedWorkspaceId]);\n\n // Read once per change; each card's LiveDuration ages its own clock, so the rail keeps no ticking state.\n // Unchanged sessions keep the object the last commit rendered, so only the card that moved renders again.\n const committedWorkspaces = useRef<readonly WebTemplateRailWorkspace[]>([]);\n const workspaces = useMemo(\n () =>\n reuseRailWorkspaces(\n committedWorkspaces.current,\n buildRailWorkspaces({\n order,\n byId,\n activeId,\n workspaceOrder,\n workspacesById,\n nested: new Set(order.filter((id) => resolveParentId(byId, id) !== undefined)),\n now: Date.now(),\n restarts,\n avatarUrls,\n }),\n ),\n [order, byId, activeId, workspaceOrder, workspacesById, restarts, avatarUrls],\n );\n useEffect(() => {\n committedWorkspaces.current = workspaces;\n }, [workspaces]);\n\n // The actions read these when called, so one object serves every render and never defeats a card's memo.\n const latest = useRef({ navigate, onDismiss, selectedWorkspaceId });\n useEffect(() => {\n latest.current = { navigate, onDismiss, selectedWorkspaceId };\n });\n const actions = useMemo<WebTemplateRail['actions']>(\n () => ({\n openSession(sessionId) {\n latest.current.onDismiss?.();\n void latest.current.navigate({ to: '/session/$sessionId', params: { sessionId } });\n },\n renameSession(sessionId, name) {\n const trimmed = name.trim();\n if (trimmed !== '' && trimmed !== sessionsStore.state.byId[sessionId]?.summary.name)\n renameSession(trimmed, sessionId);\n },\n async setSessionGroups(sessionId, groups) {\n const result = await setSessionGroups(sessionId, groups);\n return 'error' in result ? { error: result.error } : undefined;\n },\n async renameGroup(from, to) {\n const result = await renameSessionGroup(from, to);\n return 'error' in result ? { error: result.error } : undefined;\n },\n async deleteGroup(name) {\n const result = await deleteSessionGroup(name);\n return 'error' in result ? { error: result.error } : undefined;\n },\n restartSession(sessionId) {\n void restartDashboardSession(sessionId);\n },\n async removeSession(sessionId) {\n const result = await stopSession(sessionId);\n if ('error' in result) return { error: result.error };\n applySessionRemoved({ sessionId });\n return undefined;\n },\n resumeSession(sessionId) {\n openResumeDialog({ sessionId });\n },\n createSession(workspaceId) {\n selectWorkspace(workspaceId);\n latest.current.onDismiss?.();\n openNewSession(workspaceId);\n },\n resumeInWorkspace(workspaceId) {\n openResumeDialog({ workspaceId });\n },\n openWorkspaceSettings(workspaceId) {\n selectWorkspace(workspaceId);\n latest.current.onDismiss?.();\n void latest.current.navigate({\n to: '/settings/$section',\n params: { section: DEFAULT_REPOSITORY_SETTINGS_SECTION },\n search: { workspace: workspaceId },\n });\n },\n async deleteWorkspace(workspaceId) {\n const result = await removeWorkspace(workspaceId);\n if ('error' in result) return { error: result.error };\n applyWorkspaceRemoved({ workspaceId });\n return undefined;\n },\n openAddWorkspace() {\n latest.current.onDismiss?.();\n openNewSession(null);\n },\n closeAddWorkspace() {\n if (workspaceAdmissionStore.state.pending) return;\n resetWorkspaceAdmission();\n closeNewSession();\n },\n async addWorkspace(input) {\n const result = await admitDashboardWorkspace(input);\n if (result === undefined) closeNewSession();\n return result;\n },\n searchDirectories,\n listDirectory,\n async removePendingSetup(sessionId, setupId) {\n const workspaceId = sessionsStore.state.byId[sessionId]?.summary.workspaceId;\n if (workspaceId === undefined) return { error: 'This session belongs to no workspace.' };\n const result = await removeSessionMcpSetup(workspaceId, sessionId, setupId);\n return 'error' in result ? { error: result.error } : undefined;\n },\n openSettings() {\n latest.current.onDismiss?.();\n void latest.current.navigate({\n to: '/settings/$section',\n params: { section: DEFAULT_SETTINGS_SECTION },\n search: { workspace: latest.current.selectedWorkspaceId ?? undefined },\n });\n },\n openRemoteAccess() {\n latest.current.onDismiss?.();\n openRemoteDialog();\n },\n turnRemoteAccessOff() {\n void turnRemoteAccessOff();\n },\n renderSessionMenuItems: (sessionId) => <PluginSurface slot={HOST_SLOTS.sessionMenu} sessionId={sessionId} />,\n }),\n [],\n );\n\n const addingWorkspace =\n creating.open && (creating.workspaceId === null || workspacesById[creating.workspaceId] === undefined);\n\n return {\n workspaces,\n scrollRef,\n remote: {\n status: remote?.status ?? 'off',\n deviceCount: remote?.devices.length ?? 0,\n ...(remote?.publicUrl === undefined ? {} : { host: new URL(remote.publicUrl).host }),\n ...(remote?.error === undefined ? {} : { error: remote.error }),\n },\n pluginContent: <PluginSurface slot={HOST_SLOTS.rail} sessionId={activeId} />,\n ...(addingWorkspace ? { addWorkspace: { suggestedPaths: [] } } : {}),\n actions,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6CA,SAAS,WAAW,QAAqC;CACvD,IAAI,EAAE,kBAAkB,cAAc,OAAO;CAC7C,OAAO,OAAO,qBAAqB,OAAO,YAAY,WAAW,OAAO,YAAY;AACtF;;AAGA,SAAS,cAAc,QAAqC;CAC1D,OAAO,kBAAkB,WAAW,OAAO,QAAQ,4DAAsD,MAAM;AACjH;;;;;AAMA,SAAS,kBAAkB,OAA0B,MAA6C;CAChG,MAAM,yBAAS,IAAI,IAAoB;CACvC,KAAK,MAAM,MAAM,OAAO;EACtB,MAAM,UAAU,KAAK,GAAG,EAAE,QAAQ;EAClC,IAAI,SAAS,gBAAgB,KAAA,GAAW,OAAO,IAAI,IAAI,GAAG,QAAQ,KAAK,GAAG,QAAQ,aAAa;CACjG;CACA,MAAM,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,KAAK,IAAI;CAC1E,MAAM,CAA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