@agimon-ai/po-web-dashboard 0.0.0-alpha.93 → 0.0.0-alpha.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.d.mts +3 -3
  3. package/dist/index.mjs +3 -3
  4. package/dist/web/components/DashboardTileGrid.cjs +1 -1
  5. package/dist/web/components/DashboardTileGrid.cjs.map +1 -1
  6. package/dist/web/components/DashboardTileGrid.mjs +1 -1
  7. package/dist/web/components/DashboardTileGrid.mjs.map +1 -1
  8. package/dist/web/components/HomePage.cjs +6 -1
  9. package/dist/web/components/HomePage.cjs.map +1 -1
  10. package/dist/web/components/HomePage.d.mts.map +1 -1
  11. package/dist/web/components/HomePage.mjs +7 -2
  12. package/dist/web/components/HomePage.mjs.map +1 -1
  13. package/dist/web/features/sessions/NewSessionDialog.cjs +13 -2
  14. package/dist/web/features/sessions/NewSessionDialog.cjs.map +1 -1
  15. package/dist/web/features/sessions/NewSessionDialog.d.mts +9 -1
  16. package/dist/web/features/sessions/NewSessionDialog.d.mts.map +1 -1
  17. package/dist/web/features/sessions/NewSessionDialog.mjs +15 -4
  18. package/dist/web/features/sessions/NewSessionDialog.mjs.map +1 -1
  19. package/dist/web/features/sessions/useNewSessionActions.cjs +9 -3
  20. package/dist/web/features/sessions/useNewSessionActions.cjs.map +1 -1
  21. package/dist/web/features/sessions/useNewSessionActions.d.mts +6 -1
  22. package/dist/web/features/sessions/useNewSessionActions.d.mts.map +1 -1
  23. package/dist/web/features/sessions/useNewSessionActions.mjs +9 -3
  24. package/dist/web/features/sessions/useNewSessionActions.mjs.map +1 -1
  25. package/dist/web/lib/hubApi.cjs +40 -4
  26. package/dist/web/lib/hubApi.cjs.map +1 -1
  27. package/dist/web/lib/hubApi.d.mts +10 -2
  28. package/dist/web/lib/hubApi.d.mts.map +1 -1
  29. package/dist/web/lib/hubApi.mjs +41 -6
  30. package/dist/web/lib/hubApi.mjs.map +1 -1
  31. package/dist/web/lib/pluginRegistry.cjs +6 -0
  32. package/dist/web/lib/pluginRegistry.cjs.map +1 -1
  33. package/dist/web/lib/pluginRegistry.d.mts +6 -0
  34. package/dist/web/lib/pluginRegistry.d.mts.map +1 -1
  35. package/dist/web/lib/pluginRegistry.mjs +6 -0
  36. package/dist/web/lib/pluginRegistry.mjs.map +1 -1
  37. package/dist/web/lib/sessionRailModel.cjs +2 -0
  38. package/dist/web/lib/sessionRailModel.cjs.map +1 -1
  39. package/dist/web/lib/sessionRailModel.d.mts.map +1 -1
  40. package/dist/web/lib/sessionRailModel.mjs +2 -0
  41. package/dist/web/lib/sessionRailModel.mjs.map +1 -1
  42. package/dist/web/stores/newSessionStore.cjs +33 -10
  43. package/dist/web/stores/newSessionStore.cjs.map +1 -1
  44. package/dist/web/stores/newSessionStore.d.mts +9 -2
  45. package/dist/web/stores/newSessionStore.d.mts.map +1 -1
  46. package/dist/web/stores/newSessionStore.mjs +33 -11
  47. package/dist/web/stores/newSessionStore.mjs.map +1 -1
  48. package/package.json +5 -5
package/dist/index.cjs CHANGED
@@ -294,6 +294,7 @@ exports.leaderConflicts = require_leaderTree.leaderConflicts;
294
294
  exports.leaderGroup = require_leaderTree.leaderGroup;
295
295
  exports.legacyHomeAppFills = require_pluginRegistry.legacyHomeAppFills;
296
296
  exports.listDirectory = require_hubApi.listDirectory;
297
+ exports.listLaunchProfiles = require_hubApi.listLaunchProfiles;
297
298
  exports.listPoFolders = require_hubApi.listPoFolders;
298
299
  exports.listProviders = require_authApi.listProviders;
299
300
  exports.listRemovedSessions = require_hubApi.listRemovedSessions;
@@ -515,6 +516,7 @@ exports.setDockTab = require_uiStore.setDockTab;
515
516
  exports.setHasNewerHistory = require_sessionStore.setHasNewerHistory;
516
517
  exports.setModelCommand = require_commands.setModelCommand;
517
518
  exports.setNewSessionName = require_newSessionStore.setNewSessionName;
519
+ exports.setNewSessionProfile = require_newSessionStore.setNewSessionProfile;
518
520
  exports.setPalettePath = require_paletteStore.setPalettePath;
519
521
  exports.setPendingMenu = require_menuStore.setPendingMenu;
520
522
  exports.setResumeView = require_railDialogStore.setResumeView;
package/dist/index.d.mts CHANGED
@@ -40,7 +40,7 @@ import { DashboardRoute, dashboardRouteFrom, useDashboardRoute } from "./web/lib
40
40
  import { bindDashboardTranscriptWatcher, watchDashboardTranscript } from "./web/lib/dashboardTranscript.mjs";
41
41
  import { TargetResult, TargetsResult, addDevProxyTarget, fetchDevProxyTargets, removeDevProxyTarget } from "./web/lib/devProxyApi.mjs";
42
42
  import { FileMention, mediaKindFor, parseFileMentions } from "./web/lib/fileMentions.mjs";
43
- import { CreateSessionResult, RemoveWorkspaceResult, RemovedSessionsResult, RestartSessionResult, RestoreRemovedSessionResult, ResumeSessionResult, ReviveSessionResult, SessionGroupsResult, SessionHistoryResult, StopSessionResult, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, admitWorkspace, asWorkspace, createGeneralSessionRequest, createSession, createWorkspaceSession, deleteSessionGroup, discoverWorkspaces, getWorkspace, listDirectory, listPoFolders, listRemovedSessions, listSessionHistory, listSessions, listWorkspaceHistory, listWorkspaces, readDormantTranscriptPage, removeWorkspace, renameSessionGroup, restartSession, restoreRemovedSession, resumeSession, resumeWorkspaceSession, reviveSession, searchDirectories, searchSessionFiles, setSessionGroups, setWorkspaceInstructions, setWorkspaceSandbox, stopSession } from "./web/lib/hubApi.mjs";
43
+ import { CreateSessionResult, RemoveWorkspaceResult, RemovedSessionsResult, RestartSessionResult, RestoreRemovedSessionResult, ResumeSessionResult, ReviveSessionResult, SessionGroupsResult, SessionHistoryResult, StopSessionResult, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, admitWorkspace, asWorkspace, createGeneralSessionRequest, createSession, createWorkspaceSession, deleteSessionGroup, discoverWorkspaces, getWorkspace, listDirectory, listLaunchProfiles, listPoFolders, listRemovedSessions, listSessionHistory, listSessions, listWorkspaceHistory, listWorkspaces, readDormantTranscriptPage, removeWorkspace, renameSessionGroup, restartSession, restoreRemovedSession, resumeSession, resumeWorkspaceSession, reviveSession, searchDirectories, searchSessionFiles, setSessionGroups, setWorkspaceInstructions, setWorkspaceSandbox, stopSession } from "./web/lib/hubApi.mjs";
44
44
  import { LeaderConflict, LeaderGroup, LeaderOption, leaderConflicts, leaderGroup } from "./web/lib/leaderTree.mjs";
45
45
  import { LivePushStatus, disableLivePush, enableLivePush, livePushStatus, restoreLivePushRegistration } from "./web/lib/livePush.mjs";
46
46
  import { acquireModelContext, disposeModelContextAdapter } from "./web/lib/modelContextAdapter.mjs";
@@ -66,7 +66,7 @@ import { PasskeyOutcome, STEP_UP_HEADER_NAME, assertionFor, passkeysAvailable, r
66
66
  import { ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerSessionState, ComposerTextAttachment, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, appendComposerDraft, appendComposerQuote, attachComposerCapture, attachComposerContext, clearComposerState, composerStore, dropComposerState, inlineTextBytes, resetComposerStore, restoreComposerDrafts, saveComposerDrafts, tabComposerContext, updateComposerState, useComposerState } from "./web/stores/composerStore.mjs";
67
67
  import { attachmentPrompt, composerSubmissionStore, submitComposerDraft } from "./web/stores/composerSubmissionStore.mjs";
68
68
  import { DevProxyState, createDevProxyTarget, deleteDevProxyTarget, devProxyStore, refreshDevProxyTargets, resetDevProxyStore } from "./web/stores/devProxyStore.mjs";
69
- import { EMPTY_NEW_SESSION_DRAFT, NewSessionDraft, NewSessionState, closeNewSession, createGeneralSession, createPlainSession, generalSessionDraftKey, newSessionDraftStore, newSessionStore, openGeneralSession, openNewSession, resetNewSessionStore, setNewSessionName } from "./web/stores/newSessionStore.mjs";
69
+ import { EMPTY_NEW_SESSION_DRAFT, NewSessionDraft, NewSessionState, closeNewSession, createGeneralSession, createPlainSession, generalSessionDraftKey, newSessionDraftStore, newSessionStore, openGeneralSession, openNewSession, resetNewSessionStore, setNewSessionName, setNewSessionProfile } from "./web/stores/newSessionStore.mjs";
70
70
  import { PaletteState, closePalette, openPalette, paletteStore, setPalettePath, togglePalette } from "./web/stores/paletteStore.mjs";
71
71
  import { RailDialogState, ResumeDraft, ResumeTarget, ResumeView, closeResumeDialog, openResumeDialog, railDialogStore, railRestartStore, resetRailDialogStore, restartDashboardSession, restoreRemovedThread, resumeDashboardSession, resumeDraftStore, setResumeView, updateResumeDraft } from "./web/stores/railDialogStore.mjs";
72
72
  import { PairTarget, PasskeySupportView, RemoteAccessState, RemoteStep, addPasskey, approveDevice, choosePairTarget, closeRemoteDialog, denyDevice, newPairingCode, openRemoteDialog, refreshPasskeys, refreshRemoteState, remoteAccessStore, revokePairedDevice, revokeTrustedNativeDevice, showRemoteOptions, turnRemoteAccessOff, turnRemoteAccessOn, updateRemoteSettings } from "./web/stores/remoteAccessStore.mjs";
@@ -82,4 +82,4 @@ import { WorkspaceAdmissionDraft, admitDashboardWorkspace, admitDeclaredDashboar
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, InstalledDashboardTile, 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, PairTarget, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, RemovedSessionsResult, ResolvedFill, RestartSessionResult, RestoreRemovedSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ResumeView, 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, activityWaitingCount, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitDeclaredDashboardWorkspaces, 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, choosePairTarget, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createGeneralSession, createGeneralSessionRequest, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, dashboardTileFills, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, discoverWorkspaceAdmission, discoverWorkspaces, 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, generalSessionDraftKey, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, getWorkspace, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, legacyHomeAppFills, listDirectory, listPoFolders, listProviders, listRemovedSessions, 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, openGeneralSession, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseDashboardTileData, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotFills, 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, restoreRemovedSession, restoreRemovedThread, 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, sessionWaitingCount, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setResumeView, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceInstructions, 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 };
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, InstalledDashboardTile, 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, PairTarget, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, RemovedSessionsResult, ResolvedFill, RestartSessionResult, RestoreRemovedSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ResumeView, 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, activityWaitingCount, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitDeclaredDashboardWorkspaces, 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, choosePairTarget, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createGeneralSession, createGeneralSessionRequest, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, dashboardTileFills, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, discoverWorkspaceAdmission, discoverWorkspaces, 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, generalSessionDraftKey, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, getWorkspace, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, legacyHomeAppFills, listDirectory, listLaunchProfiles, listPoFolders, listProviders, listRemovedSessions, 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, openGeneralSession, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseDashboardTileData, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotFills, 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, restoreRemovedSession, restoreRemovedThread, 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, sessionWaitingCount, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setNewSessionProfile, setPalettePath, setPendingMenu, setResumeView, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceInstructions, 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
@@ -21,7 +21,7 @@ import { dashboardRouteFrom, useDashboardRoute } from "./web/lib/dashboardRoute.
21
21
  import { bindDashboardTranscriptWatcher, watchDashboardTranscript } from "./web/lib/dashboardTranscript.mjs";
22
22
  import { addDevProxyTarget, fetchDevProxyTargets, removeDevProxyTarget } from "./web/lib/devProxyApi.mjs";
23
23
  import { mediaKindFor, parseFileMentions } from "./web/lib/fileMentions.mjs";
24
- import { admitWorkspace, asWorkspace, createGeneralSessionRequest, createSession, createWorkspaceSession, deleteSessionGroup, discoverWorkspaces, getWorkspace, listDirectory, listPoFolders, listRemovedSessions, listSessionHistory, listSessions, listWorkspaceHistory, listWorkspaces, readDormantTranscriptPage, removeWorkspace, renameSessionGroup, restartSession, restoreRemovedSession, resumeSession, resumeWorkspaceSession, reviveSession, searchDirectories, searchSessionFiles, setSessionGroups, setWorkspaceInstructions, setWorkspaceSandbox, stopSession } from "./web/lib/hubApi.mjs";
24
+ import { admitWorkspace, asWorkspace, createGeneralSessionRequest, createSession, createWorkspaceSession, deleteSessionGroup, discoverWorkspaces, getWorkspace, listDirectory, listLaunchProfiles, listPoFolders, listRemovedSessions, listSessionHistory, listSessions, listWorkspaceHistory, listWorkspaces, readDormantTranscriptPage, removeWorkspace, renameSessionGroup, restartSession, restoreRemovedSession, resumeSession, resumeWorkspaceSession, reviveSession, searchDirectories, searchSessionFiles, setSessionGroups, setWorkspaceInstructions, setWorkspaceSandbox, stopSession } from "./web/lib/hubApi.mjs";
25
25
  import { disableLivePush, enableLivePush, livePushStatus, restoreLivePushRegistration } from "./web/lib/livePush.mjs";
26
26
  import { acquireModelContext, disposeModelContextAdapter } from "./web/lib/modelContextAdapter.mjs";
27
27
  import { createProtocolLink, protocolSocketUrl } from "./web/lib/piTransport.mjs";
@@ -61,7 +61,7 @@ import { createDevProxyTarget, deleteDevProxyTarget, devProxyStore, refreshDevPr
61
61
  import { bindSessionFileLinkModes, sessionMinorModes } from "./web/stores/fileLinkModesStore.mjs";
62
62
  import { claimDialogMenu, clearPendingMenu, menuStore, pendingMenuFor, releaseDialogMenu, resetMenuStore, setPendingMenu } from "./web/stores/menuStore.mjs";
63
63
  import { applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, resetWorkspaces, selectWorkspace, workspacesStore } from "./web/stores/workspacesStore.mjs";
64
- import { EMPTY_NEW_SESSION_DRAFT, closeNewSession, createGeneralSession, createPlainSession, generalSessionDraftKey, newSessionDraftStore, newSessionStore, openGeneralSession, openNewSession, resetNewSessionStore, setNewSessionName } from "./web/stores/newSessionStore.mjs";
64
+ import { EMPTY_NEW_SESSION_DRAFT, closeNewSession, createGeneralSession, createPlainSession, generalSessionDraftKey, newSessionDraftStore, newSessionStore, openGeneralSession, openNewSession, resetNewSessionStore, setNewSessionName, setNewSessionProfile } from "./web/stores/newSessionStore.mjs";
65
65
  import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
66
66
  import { closePalette, openPalette, paletteStore, setPalettePath, togglePalette } from "./web/stores/paletteStore.mjs";
67
67
  import { closeResumeDialog, openResumeDialog, railDialogStore, railRestartStore, resetRailDialogStore, restartDashboardSession, restoreRemovedThread, resumeDashboardSession, resumeDraftStore, setResumeView, updateResumeDraft } from "./web/stores/railDialogStore.mjs";
@@ -82,4 +82,4 @@ import { admitDashboardWorkspace, admitDeclaredDashboardWorkspaces, discoverWork
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, activityWaitingCount, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitDeclaredDashboardWorkspaces, 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, choosePairTarget, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createGeneralSession, createGeneralSessionRequest, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, dashboardTileFills, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, discoverWorkspaceAdmission, discoverWorkspaces, 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, generalSessionDraftKey, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, getWorkspace, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, legacyHomeAppFills, listDirectory, listPoFolders, listProviders, listRemovedSessions, 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, openGeneralSession, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseDashboardTileData, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotFills, 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, restoreRemovedSession, restoreRemovedThread, 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, sessionWaitingCount, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setResumeView, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceInstructions, 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 };
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, activityWaitingCount, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitDeclaredDashboardWorkspaces, 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, choosePairTarget, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createGeneralSession, createGeneralSessionRequest, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, dashboardTileFills, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, discoverWorkspaceAdmission, discoverWorkspaces, 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, generalSessionDraftKey, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, getWorkspace, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, legacyHomeAppFills, listDirectory, listLaunchProfiles, listPoFolders, listProviders, listRemovedSessions, 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, openGeneralSession, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseDashboardTileData, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotFills, 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, restoreRemovedSession, restoreRemovedThread, 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, sessionWaitingCount, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setNewSessionProfile, setPalettePath, setPendingMenu, setResumeView, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceInstructions, 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 };
@@ -38,7 +38,7 @@ function DashboardTile({ tile, span = false }) {
38
38
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
39
39
  "data-tile-id": id,
40
40
  "data-tile-size": size,
41
- className: `min-w-0 ${span ? spans[size] : ""}`,
41
+ className: `min-w-0 empty:hidden ${span ? spans[size] : ""}`,
42
42
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ToolRendererBoundary.ToolRendererBoundary, {
43
43
  toolName: id,
44
44
  children: (failed) => failed ? null : legacy ? body : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_agimon_ai_po_web_components.Panel, {
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardTileGrid.cjs","names":["ToolRendererBoundary","Panel","Button","ChevronRightIcon"],"sources":["../../../src/web/components/DashboardTileGrid.tsx"],"sourcesContent":["import type { DashboardTileData, DashboardTileSize } from '@agimon-ai/po-core/web';\nimport { Button, ChevronRightIcon, Panel } from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\n\nexport interface DashboardTileView {\n id: string;\n size?: DashboardTileSize;\n column?: DashboardTileData['column'];\n body: ReactNode;\n title?: string;\n icon?: DashboardTileData['icon'];\n onOpen?: () => void;\n /** Existing full-card fills keep their own heading and natural content height. */\n legacy?: boolean;\n}\n\nconst spans: Record<DashboardTileSize, string> = {\n small: '',\n wide: '@min-[340px]:col-span-2',\n tall: 'row-span-2',\n large: 'row-span-2 @min-[340px]:col-span-2',\n};\n\n/** Explicit columns stack independently; unpositioned fills retain their size-based grid. */\nexport function DashboardTileGrid({ tiles }: { tiles: readonly DashboardTileView[] }) {\n const columns = tiles.some((tile) => tile.column !== undefined)\n ? [\n { name: 'main', tiles: tiles.filter((tile) => tile.column !== 'side') },\n { name: 'side', tiles: tiles.filter((tile) => tile.column === 'side') },\n ].filter((column) => column.tiles.length > 0)\n : undefined;\n return (\n <div className=\"@container min-w-0\">\n <div\n data-testid=\"dashboard-tile-grid\"\n className={\n columns\n ? columns.length > 1\n ? 'grid grid-cols-1 items-start gap-4 @min-[768px]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]'\n : 'grid grid-cols-1 items-start gap-4'\n : 'grid grid-cols-1 items-start gap-4 @min-[340px]:grid-cols-2 @min-[960px]:grid-cols-4'\n }\n >\n {columns\n ? columns.map((column) => (\n <div key={column.name} data-dashboard-column={column.name} className=\"flex min-w-0 flex-col gap-4\">\n {column.tiles.map((tile) => (\n <DashboardTile key={tile.id} tile={tile} />\n ))}\n </div>\n ))\n : tiles.map((tile) => <DashboardTile key={tile.id} tile={tile} span />)}\n </div>\n </div>\n );\n}\n\nfunction DashboardTile({ tile, span = false }: { tile: DashboardTileView; span?: boolean }) {\n const { id, size = 'small', title, icon: Icon, body, onOpen, legacy = false } = tile;\n return (\n <div data-tile-id={id} data-tile-size={size} className={`min-w-0 ${span ? spans[size] : ''}`}>\n <ToolRendererBoundary toolName={id}>\n {(failed) =>\n failed ? null : legacy ? (\n body\n ) : (\n <Panel className=\"flex min-w-0 flex-col\">\n <div className=\"flex min-h-11 items-center gap-2 px-3 py-2\">\n {Icon ? <Icon aria-hidden className=\"size-4 shrink-0 text-po-dim\" /> : null}\n <h2 className=\"min-w-0 flex-1 break-words text-base font-semibold text-po-hi\">{title}</h2>\n {onOpen ? (\n <Button variant=\"ghost\" size=\"icon-md\" aria-label={`Open ${title}`} onClick={onOpen}>\n <ChevronRightIcon aria-hidden className=\"size-4\" />\n </Button>\n ) : null}\n </div>\n <div className=\"min-w-0 border-t border-po-border-soft p-3\">{body}</div>\n </Panel>\n )\n }\n </ToolRendererBoundary>\n </div>\n );\n}\n"],"mappings":";;;;AAkBA,MAAM,QAA2C;CAC/C,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;AACT;;AAGA,SAAgB,kBAAkB,EAAE,SAAkD;CACpF,M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AD;IAAO,WAAU;IAAjB,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACG,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;OAAM,eAAA;OAAY,WAAU;MAA+B,CAAA,IAAI;MACvE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;OAAI,WAAU;OAAiE,UAAA;MAAU,CAAA;MACxF,SACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;OAAQ,SAAQ;OAAQ,MAAK;OAAU,cAAY,QAAQ;OAAS,SAAS;OAC3E,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,kBAAD;QAAkB,eAAA;QAAY,WAAU;OAAU,CAAA;MAC5C,CAAA,IACN;KACD;IACL,CAAA,GAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KAA8C,UAAA;IAAU,CAAA,CAClE;;EAGS,CAAA;CACnB,CAAA;AAET"}
1
+ {"version":3,"file":"DashboardTileGrid.cjs","names":["ToolRendererBoundary","Panel","Button","ChevronRightIcon"],"sources":["../../../src/web/components/DashboardTileGrid.tsx"],"sourcesContent":["import type { DashboardTileData, DashboardTileSize } from '@agimon-ai/po-core/web';\nimport { Button, ChevronRightIcon, Panel } from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\n\nexport interface DashboardTileView {\n id: string;\n size?: DashboardTileSize;\n column?: DashboardTileData['column'];\n body: ReactNode;\n title?: string;\n icon?: DashboardTileData['icon'];\n onOpen?: () => void;\n /** Existing full-card fills keep their own heading and natural content height. */\n legacy?: boolean;\n}\n\nconst spans: Record<DashboardTileSize, string> = {\n small: '',\n wide: '@min-[340px]:col-span-2',\n tall: 'row-span-2',\n large: 'row-span-2 @min-[340px]:col-span-2',\n};\n\n/** Explicit columns stack independently; unpositioned fills retain their size-based grid. */\nexport function DashboardTileGrid({ tiles }: { tiles: readonly DashboardTileView[] }) {\n const columns = tiles.some((tile) => tile.column !== undefined)\n ? [\n { name: 'main', tiles: tiles.filter((tile) => tile.column !== 'side') },\n { name: 'side', tiles: tiles.filter((tile) => tile.column === 'side') },\n ].filter((column) => column.tiles.length > 0)\n : undefined;\n return (\n <div className=\"@container min-w-0\">\n <div\n data-testid=\"dashboard-tile-grid\"\n className={\n columns\n ? columns.length > 1\n ? 'grid grid-cols-1 items-start gap-4 @min-[768px]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]'\n : 'grid grid-cols-1 items-start gap-4'\n : 'grid grid-cols-1 items-start gap-4 @min-[340px]:grid-cols-2 @min-[960px]:grid-cols-4'\n }\n >\n {columns\n ? columns.map((column) => (\n <div key={column.name} data-dashboard-column={column.name} className=\"flex min-w-0 flex-col gap-4\">\n {column.tiles.map((tile) => (\n <DashboardTile key={tile.id} tile={tile} />\n ))}\n </div>\n ))\n : tiles.map((tile) => <DashboardTile key={tile.id} tile={tile} span />)}\n </div>\n </div>\n );\n}\n\nfunction DashboardTile({ tile, span = false }: { tile: DashboardTileView; span?: boolean }) {\n const { id, size = 'small', title, icon: Icon, body, onOpen, legacy = false } = tile;\n return (\n // `empty:hidden`: a legacy body that draws nothing, such as an idle home-attention card, leaves no gap.\n <div data-tile-id={id} data-tile-size={size} className={`min-w-0 empty:hidden ${span ? spans[size] : ''}`}>\n <ToolRendererBoundary toolName={id}>\n {(failed) =>\n failed ? null : legacy ? (\n body\n ) : (\n <Panel className=\"flex min-w-0 flex-col\">\n <div className=\"flex min-h-11 items-center gap-2 px-3 py-2\">\n {Icon ? <Icon aria-hidden className=\"size-4 shrink-0 text-po-dim\" /> : null}\n <h2 className=\"min-w-0 flex-1 break-words text-base font-semibold text-po-hi\">{title}</h2>\n {onOpen ? (\n <Button variant=\"ghost\" size=\"icon-md\" aria-label={`Open ${title}`} onClick={onOpen}>\n <ChevronRightIcon aria-hidden className=\"size-4\" />\n </Button>\n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AC,OAAD;EAAK,gBAAc;EAAI,kBAAgB;EAAM,WAAW,wBAAwB,OAAO,MAAM,QAAQ;EACnG,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,6BAAAA,sBAAD;GAAsB,UAAU;GAC5B,WAAA,WACA,SAAS,OAAO,SACd,OAEA,iBAAA,GAAA,kBAAA,KAAA,CAACC,6BAAAA,OAAD;IAAO,WAAU;IAAjB,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACG,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;OAAM,eAAA;OAAY,WAAU;MAA+B,CAAA,IAAI;MACvE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;OAAI,WAAU;OAAiE,UAAA;MAAU,CAAA;MACxF,SACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;OAAQ,SAAQ;OAAQ,MAAK;OAAU,cAAY,QAAQ;OAAS,SAAS;OAC3E,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,kBAAD;QAAkB,eAAA;QAAY,WAAU;OAAU,CAAA;MAC5C,CAAA,IACN;KACD;IACL,CAAA,GAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KAA8C,UAAA;IAAU,CAAA,CAClE;;EAGS,CAAA;CACnB,CAAA;AAET"}
@@ -38,7 +38,7 @@ function DashboardTile({ tile, span = false }) {
38
38
  return /* @__PURE__ */ jsx("div", {
39
39
  "data-tile-id": id,
40
40
  "data-tile-size": size,
41
- className: `min-w-0 ${span ? spans[size] : ""}`,
41
+ className: `min-w-0 empty:hidden ${span ? spans[size] : ""}`,
42
42
  children: /* @__PURE__ */ jsx(ToolRendererBoundary, {
43
43
  toolName: id,
44
44
  children: (failed) => failed ? null : legacy ? body : /* @__PURE__ */ jsxs(Panel, {
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardTileGrid.mjs","names":[],"sources":["../../../src/web/components/DashboardTileGrid.tsx"],"sourcesContent":["import type { DashboardTileData, DashboardTileSize } from '@agimon-ai/po-core/web';\nimport { Button, ChevronRightIcon, Panel } from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\n\nexport interface DashboardTileView {\n id: string;\n size?: DashboardTileSize;\n column?: DashboardTileData['column'];\n body: ReactNode;\n title?: string;\n icon?: DashboardTileData['icon'];\n onOpen?: () => void;\n /** Existing full-card fills keep their own heading and natural content height. */\n legacy?: boolean;\n}\n\nconst spans: Record<DashboardTileSize, string> = {\n small: '',\n wide: '@min-[340px]:col-span-2',\n tall: 'row-span-2',\n large: 'row-span-2 @min-[340px]:col-span-2',\n};\n\n/** Explicit columns stack independently; unpositioned fills retain their size-based grid. */\nexport function DashboardTileGrid({ tiles }: { tiles: readonly DashboardTileView[] }) {\n const columns = tiles.some((tile) => tile.column !== undefined)\n ? [\n { name: 'main', tiles: tiles.filter((tile) => tile.column !== 'side') },\n { name: 'side', tiles: tiles.filter((tile) => tile.column === 'side') },\n ].filter((column) => column.tiles.length > 0)\n : undefined;\n return (\n <div className=\"@container min-w-0\">\n <div\n data-testid=\"dashboard-tile-grid\"\n className={\n columns\n ? columns.length > 1\n ? 'grid grid-cols-1 items-start gap-4 @min-[768px]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]'\n : 'grid grid-cols-1 items-start gap-4'\n : 'grid grid-cols-1 items-start gap-4 @min-[340px]:grid-cols-2 @min-[960px]:grid-cols-4'\n }\n >\n {columns\n ? columns.map((column) => (\n <div key={column.name} data-dashboard-column={column.name} className=\"flex min-w-0 flex-col gap-4\">\n {column.tiles.map((tile) => (\n <DashboardTile key={tile.id} tile={tile} />\n ))}\n </div>\n ))\n : tiles.map((tile) => <DashboardTile key={tile.id} tile={tile} span />)}\n </div>\n </div>\n );\n}\n\nfunction DashboardTile({ tile, span = false }: { tile: DashboardTileView; span?: boolean }) {\n const { id, size = 'small', title, icon: Icon, body, onOpen, legacy = false } = tile;\n return (\n <div data-tile-id={id} data-tile-size={size} className={`min-w-0 ${span ? spans[size] : ''}`}>\n <ToolRendererBoundary toolName={id}>\n {(failed) =>\n failed ? null : legacy ? (\n body\n ) : (\n <Panel className=\"flex min-w-0 flex-col\">\n <div className=\"flex min-h-11 items-center gap-2 px-3 py-2\">\n {Icon ? <Icon aria-hidden className=\"size-4 shrink-0 text-po-dim\" /> : null}\n <h2 className=\"min-w-0 flex-1 break-words text-base font-semibold text-po-hi\">{title}</h2>\n {onOpen ? (\n <Button variant=\"ghost\" size=\"icon-md\" aria-label={`Open ${title}`} onClick={onOpen}>\n <ChevronRightIcon aria-hidden className=\"size-4\" />\n </Button>\n ) : null}\n </div>\n <div className=\"min-w-0 border-t border-po-border-soft p-3\">{body}</div>\n </Panel>\n )\n }\n </ToolRendererBoundary>\n </div>\n );\n}\n"],"mappings":";;;;AAkBA,MAAM,QAA2C;CAC/C,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;AACT;;AAGA,SAAgB,kBAAkB,EAAE,SAAkD;CACpF,MAAM,UAAU,MAAM,MAAM,SAAS,KAAK,WAAW,KAAA,CAAS,IAC1D,CACE;EAAE,MAAM;EAAQ,OAAO,MAAM,QAAQ,SAAS,KAAK,WAAW,MAAM;CAAE,GACtE;EAAE,MAAM;EAAQ,OAAO,MAAM,QAAQ,SAAS,KAAK,WAAW,MAAM;CAAE,CACxE,CAAC,CAAC,QAAQ,WAAW,OAAO,MAAM,SAAS,CAAC,IAC5C,KAAA;CACJ,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,OAAD;GACE,eAAY;GACZ,WACE,UACI,QAAQ,SAAS,IACf,4FACA,uCACF;GAGL,UAAA,UACG,QAAQ,KAAK,WACX,oBAAC,OAAD;IAAuB,yBAAuB,OAAO;IAAM,WAAU;IAClE,UAAA,OAAO,MAAM,KAAK,SACjB,oBAAC,eAAD,EAAmC,KAAO,GAAtB,KAAK,EAAiB,CAC3C;GACE,GAJK,OAAO,IAIZ,CACN,IACD,MAAM,KAAK,SAAS,oBAAC,eAAD;IAAmC;IAAM,MAAA;GAAM,GAA3B,KAAK,EAAsB,CAAC;EACrE,CAAA;CACF,CAAA;AAET;AAEA,SAAS,cAAc,EAAE,MAAM,OAAO,SAAsD;CAC1F,MAAM,EAAE,IAAI,OAAO,SAAS,OAAO,MAAM,MAAM,MAAM,QAAQ,SAAS,UAAU;CAChF,OACE,oBAAC,OAAD;EAAK,gBAAc;EAAI,kBAAgB;EAAM,WAAW,WAAW,OAAO,MAAM,QAAQ;EACtF,UAAA,oBAAC,sBAAD;GAAsB,UAAU;GAC5B,WAAA,WACA,SAAS,OAAO,SACd,OAEA,qBAAC,OAAD;IAAO,WAAU;IAAjB,UAAA,CACE,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACG,OAAO,oBAAC,MAAD;OAAM,eAAA;OAAY,WAAU;MAA+B,CAAA,IAAI;MACvE,oBAAC,MAAD;OAAI,WAAU;OAAiE,UAAA;MAAU,CAAA;MACxF,SACC,oBAAC,QAAD;OAAQ,SAAQ;OAAQ,MAAK;OAAU,cAAY,QAAQ;OAAS,SAAS;OAC3E,UAAA,oBAAC,kBAAD;QAAkB,eAAA;QAAY,WAAU;OAAU,CAAA;MAC5C,CAAA,IACN;KACD;IACL,CAAA,GAAA,oBAAC,OAAD;KAAK,WAAU;KAA8C,UAAA;IAAU,CAAA,CAClE;;EAGS,CAAA;CACnB,CAAA;AAET"}
1
+ {"version":3,"file":"DashboardTileGrid.mjs","names":[],"sources":["../../../src/web/components/DashboardTileGrid.tsx"],"sourcesContent":["import type { DashboardTileData, DashboardTileSize } from '@agimon-ai/po-core/web';\nimport { Button, ChevronRightIcon, Panel } from '@agimon-ai/po-web-components';\nimport type { ReactNode } from 'react';\n\nimport { ToolRendererBoundary } from '../lib/ToolRendererBoundary';\n\nexport interface DashboardTileView {\n id: string;\n size?: DashboardTileSize;\n column?: DashboardTileData['column'];\n body: ReactNode;\n title?: string;\n icon?: DashboardTileData['icon'];\n onOpen?: () => void;\n /** Existing full-card fills keep their own heading and natural content height. */\n legacy?: boolean;\n}\n\nconst spans: Record<DashboardTileSize, string> = {\n small: '',\n wide: '@min-[340px]:col-span-2',\n tall: 'row-span-2',\n large: 'row-span-2 @min-[340px]:col-span-2',\n};\n\n/** Explicit columns stack independently; unpositioned fills retain their size-based grid. */\nexport function DashboardTileGrid({ tiles }: { tiles: readonly DashboardTileView[] }) {\n const columns = tiles.some((tile) => tile.column !== undefined)\n ? [\n { name: 'main', tiles: tiles.filter((tile) => tile.column !== 'side') },\n { name: 'side', tiles: tiles.filter((tile) => tile.column === 'side') },\n ].filter((column) => column.tiles.length > 0)\n : undefined;\n return (\n <div className=\"@container min-w-0\">\n <div\n data-testid=\"dashboard-tile-grid\"\n className={\n columns\n ? columns.length > 1\n ? 'grid grid-cols-1 items-start gap-4 @min-[768px]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]'\n : 'grid grid-cols-1 items-start gap-4'\n : 'grid grid-cols-1 items-start gap-4 @min-[340px]:grid-cols-2 @min-[960px]:grid-cols-4'\n }\n >\n {columns\n ? columns.map((column) => (\n <div key={column.name} data-dashboard-column={column.name} className=\"flex min-w-0 flex-col gap-4\">\n {column.tiles.map((tile) => (\n <DashboardTile key={tile.id} tile={tile} />\n ))}\n </div>\n ))\n : tiles.map((tile) => <DashboardTile key={tile.id} tile={tile} span />)}\n </div>\n </div>\n );\n}\n\nfunction DashboardTile({ tile, span = false }: { tile: DashboardTileView; span?: boolean }) {\n const { id, size = 'small', title, icon: Icon, body, onOpen, legacy = false } = tile;\n return (\n // `empty:hidden`: a legacy body that draws nothing, such as an idle home-attention card, leaves no gap.\n <div data-tile-id={id} data-tile-size={size} className={`min-w-0 empty:hidden ${span ? spans[size] : ''}`}>\n <ToolRendererBoundary toolName={id}>\n {(failed) =>\n failed ? null : legacy ? (\n body\n ) : (\n <Panel className=\"flex min-w-0 flex-col\">\n <div className=\"flex min-h-11 items-center gap-2 px-3 py-2\">\n {Icon ? <Icon aria-hidden className=\"size-4 shrink-0 text-po-dim\" /> : null}\n <h2 className=\"min-w-0 flex-1 break-words text-base font-semibold text-po-hi\">{title}</h2>\n {onOpen ? (\n <Button variant=\"ghost\" size=\"icon-md\" aria-label={`Open ${title}`} onClick={onOpen}>\n <ChevronRightIcon aria-hidden className=\"size-4\" />\n </Button>\n ) : null}\n </div>\n <div className=\"min-w-0 border-t border-po-border-soft p-3\">{body}</div>\n </Panel>\n )\n }\n </ToolRendererBoundary>\n </div>\n );\n}\n"],"mappings":";;;;AAkBA,MAAM,QAA2C;CAC/C,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;AACT;;AAGA,SAAgB,kBAAkB,EAAE,SAAkD;CACpF,MAAM,UAAU,MAAM,MAAM,SAAS,KAAK,WAAW,KAAA,CAAS,IAC1D,CACE;EAAE,MAAM;EAAQ,OAAO,MAAM,QAAQ,SAAS,KAAK,WAAW,MAAM;CAAE,GACtE;EAAE,MAAM;EAAQ,OAAO,MAAM,QAAQ,SAAS,KAAK,WAAW,MAAM;CAAE,CACxE,CAAC,CAAC,QAAQ,WAAW,OAAO,MAAM,SAAS,CAAC,IAC5C,KAAA;CACJ,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,OAAD;GACE,eAAY;GACZ,WACE,UACI,QAAQ,SAAS,IACf,4FACA,uCACF;GAGL,UAAA,UACG,QAAQ,KAAK,WACX,oBAAC,OAAD;IAAuB,yBAAuB,OAAO;IAAM,WAAU;IAClE,UAAA,OAAO,MAAM,KAAK,SACjB,oBAAC,eAAD,EAAmC,KAAO,GAAtB,KAAK,EAAiB,CAC3C;GACE,GAJK,OAAO,IAIZ,CACN,IACD,MAAM,KAAK,SAAS,oBAAC,eAAD;IAAmC;IAAM,MAAA;GAAM,GAA3B,KAAK,EAAsB,CAAC;EACrE,CAAA;CACF,CAAA;AAET;AAEA,SAAS,cAAc,EAAE,MAAM,OAAO,SAAsD;CAC1F,MAAM,EAAE,IAAI,OAAO,SAAS,OAAO,MAAM,MAAM,MAAM,QAAQ,SAAS,UAAU;CAChF,OAEE,oBAAC,OAAD;EAAK,gBAAc;EAAI,kBAAgB;EAAM,WAAW,wBAAwB,OAAO,MAAM,QAAQ;EACnG,UAAA,oBAAC,sBAAD;GAAsB,UAAU;GAC5B,WAAA,WACA,SAAS,OAAO,SACd,OAEA,qBAAC,OAAD;IAAO,WAAU;IAAjB,UAAA,CACE,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACG,OAAO,oBAAC,MAAD;OAAM,eAAA;OAAY,WAAU;MAA+B,CAAA,IAAI;MACvE,oBAAC,MAAD;OAAI,WAAU;OAAiE,UAAA;MAAU,CAAA;MACxF,SACC,oBAAC,QAAD;OAAQ,SAAQ;OAAQ,MAAK;OAAU,cAAY,QAAQ;OAAS,SAAS;OAC3E,UAAA,oBAAC,kBAAD;QAAkB,eAAA;QAAY,WAAU;OAAU,CAAA;MAC5C,CAAA,IACN;KACD;IACL,CAAA,GAAA,oBAAC,OAAD;KAAK,WAAU;KAA8C,UAAA;IAAU,CAAA,CAClE;;EAGS,CAAA;CACnB,CAAA;AAET"}
@@ -50,7 +50,12 @@ function HomeView({ tiles, main = [], side = [], title = "Home", emptyTitle = "N
50
50
  function HomePage({ onShowSessions, navigationToggle }) {
51
51
  const props = require_usePluginSlotProps.usePluginSlotProps(null);
52
52
  const fills = [...require_pluginRegistry.dashboardTileFills({ scope: "global" }), ...require_pluginRegistry.legacyHomeAppFills()].sort((left, right) => left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id));
53
- const tiles = [];
53
+ const tiles = require_pluginRegistry.globalSlotFills(require_pluginRegistry.HOST_SLOTS.homeAttention).flatMap((fill) => fill.component === void 0 ? [] : [{
54
+ id: JSON.stringify([fill.pluginId, fill.id]),
55
+ size: "wide",
56
+ legacy: true,
57
+ body: (0, react.createElement)(fill.component, props)
58
+ }]);
54
59
  for (const fill of fills) {
55
60
  const component = fill.component;
56
61
  if (component === void 0) continue;
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.cjs","names":["Button","FolderIcon","EmptyState","DashboardTileGrid","usePluginSlotProps","dashboardTileFills","legacyHomeAppFills","parseDashboardTileData","createElement"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport { dashboardTileFills, legacyHomeAppFills, parseDashboardTileData } from '../lib/pluginRegistry';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\n\nexport interface HomeViewProps {\n tiles?: readonly DashboardTileView[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** The shared Home and Workspace frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n main = [],\n side = [],\n title = 'Home',\n emptyTitle = 'Nothing on Home yet',\n emptyDescription = 'Apps you add show up here.',\n onShowSessions,\n navigationToggle = 'mobile',\n}: HomeViewProps) {\n const entries = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>\n {entries.length === 0 ? (\n <EmptyState title={emptyTitle} description={emptyDescription} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\n/** Home reads only global fills, regardless of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const fills = [...dashboardTileFills({ scope: 'global' }), ...legacyHomeAppFills()].sort(\n (left, right) =>\n left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id),\n );\n const tiles: DashboardTileView[] = [];\n for (const fill of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const id = JSON.stringify([fill.pluginId, fill.id]);\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const open = destination?.kind === 'page' ? props.openPage : props.openSettings;\n tiles.push({\n id,\n size:\n data === null\n ? (fill.data as { column?: unknown } | undefined)?.column === 'side'\n ? 'small'\n : 'wide'\n : (data.size ?? 'small'),\n ...(data === null ? { legacy: true } : { title: data.title, icon: data.icon, column: data.column }),\n ...(destination === undefined || open === undefined ? {} : { onOpen: () => open(destination.id) }),\n body: createElement(component, props),\n });\n }\n return (\n <HomeView\n tiles={tiles}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AAoBA,SAAgB,SAAS,EACvB,OACA,OAAO,CAAC,GACR,OAAO,CAAC,GACR,QAAQ,QACR,aAAa,uBACb,mBAAmB,8BACnB,gBACA,mBAAmB,YACH;CAChB,MAAM,UAAU,SAAS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,UACL,KAAK,QAAQ,MAAM,SAAS,KAAK,SAAS,cAAc,MAAM,QAAQ,KAAK,KAAK,GAAG,cAAc,MAAM,EAAE,CAC7G;CACA,MAAM,QAA6B,CAAC;CACpC,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,YAAY,KAAK;EACvB,IAAI,cAAc,KAAA,GAAW;EAC7B,MAAM,KAAK,KAAK,UAAU,CAAC,KAAK,UAAU,KAAK,EAAE,CAAC;EAClD,MAAM,OAAOC,uBAAAA,uBAAuB,KAAK,IAAI;EAC7C,MAAM,cAAc,MAAM;EAC1B,MAAM,OAAO,aAAa,SAAS,SAAS,MAAM,WAAW,MAAM;EACnE,MAAM,KAAK;GACT;GACA,MACE,SAAS,OACJ,KAAK,MAA2C,WAAW,SAC1D,UACA,SACD,KAAK,QAAQ;GACpB,GAAI,SAAS,OAAO,EAAE,QAAQ,KAAK,IAAI;IAAE,OAAO,KAAK;IAAO,MAAM,KAAK;IAAM,QAAQ,KAAK;GAAO;GACjG,GAAI,gBAAgB,KAAA,KAAa,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,EAAE,EAAE;GAChG,OAAA,GAAMC,MAAAA,cAAAA,CAAc,WAAW,KAAK;EACtC,CAAC;CACH;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACS;EACP,GAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EAC1D,GAAK,qBAAqB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB;CAC/D,CAAA;AAEL"}
1
+ {"version":3,"file":"HomePage.cjs","names":["Button","FolderIcon","EmptyState","DashboardTileGrid","usePluginSlotProps","dashboardTileFills","legacyHomeAppFills","globalSlotFills","HOST_SLOTS","createElement","parseDashboardTileData"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport {\n dashboardTileFills,\n globalSlotFills,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n} from '../lib/pluginRegistry';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\n\nexport interface HomeViewProps {\n tiles?: readonly DashboardTileView[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** The shared Home and Workspace frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n main = [],\n side = [],\n title = 'Home',\n emptyTitle = 'Nothing on Home yet',\n emptyDescription = 'Apps you add show up here.',\n onShowSessions,\n navigationToggle = 'mobile',\n}: HomeViewProps) {\n const entries = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>\n {entries.length === 0 ? (\n <EmptyState title={emptyTitle} description={emptyDescription} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\n/** Home reads only global fills, regardless of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const fills = [...dashboardTileFills({ scope: 'global' }), ...legacyHomeAppFills()].sort(\n (left, right) =>\n left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id),\n );\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const tiles: DashboardTileView[] = globalSlotFills(HOST_SLOTS.homeAttention).flatMap((fill) =>\n fill.component === undefined\n ? []\n : [\n {\n id: JSON.stringify([fill.pluginId, fill.id]),\n size: 'wide' as const,\n legacy: true,\n body: createElement(fill.component, props),\n },\n ],\n );\n for (const fill of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const id = JSON.stringify([fill.pluginId, fill.id]);\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const open = destination?.kind === 'page' ? props.openPage : props.openSettings;\n tiles.push({\n id,\n size:\n data === null\n ? (fill.data as { column?: unknown } | undefined)?.column === 'side'\n ? 'small'\n : 'wide'\n : (data.size ?? 'small'),\n ...(data === null ? { legacy: true } : { title: data.title, icon: data.icon, column: data.column }),\n ...(destination === undefined || open === undefined ? {} : { onOpen: () => open(destination.id) }),\n body: createElement(component, props),\n });\n }\n return (\n <HomeView\n tiles={tiles}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AA0BA,SAAgB,SAAS,EACvB,OACA,OAAO,CAAC,GACR,OAAO,CAAC,GACR,QAAQ,QACR,aAAa,uBACb,mBAAmB,8BACnB,gBACA,mBAAmB,YACH;CAChB,MAAM,UAAU,SAAS,CACvB,GAAG,KAAK,KAAK,MAAM,WAA8B;EAAE,IAAI,QAAQ;EAAS,MAAM;EAAQ;EAAM,QAAQ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;EACf,iBAAiB;;EAEjB,gBAAgB;EAChB,gBAAgB;EAChB;EACA;EACA;EACA;EACA;;;wBAIc,WACd,OACA,MACA,MACA,OACA,YACA,kBACA,gBACA,oBACC,gCAAa,IAAA;;wBAuCA,WACd,gBACA;EAEA;EACA;oBACD,IAAA"}
1
+ {"version":3,"file":"HomePage.d.mts","names":[],"sources":["../../../src/web/components/HomePage.tsx"],"mappings":";;;iBAaiB;EACf,iBAAiB;;EAEjB,gBAAgB;EAChB,gBAAgB;EAChB;EACA;EACA;EACA;EACA;;;wBAIc,WACd,OACA,MACA,MACA,OACA,YACA,kBACA,gBACA,oBACC,gCAAa,IAAA;;wBAuCA,WACd,gBACA;EAEA;EACA;oBACD,IAAA"}
@@ -1,4 +1,4 @@
1
- import { dashboardTileFills, legacyHomeAppFills, parseDashboardTileData } from "../lib/pluginRegistry.mjs";
1
+ import { HOST_SLOTS, dashboardTileFills, globalSlotFills, legacyHomeAppFills, parseDashboardTileData } from "../lib/pluginRegistry.mjs";
2
2
  import { usePluginSlotProps } from "../stores/usePluginSlotProps.mjs";
3
3
  import { DashboardTileGrid } from "./DashboardTileGrid.mjs";
4
4
  import { createElement } from "react";
@@ -50,7 +50,12 @@ function HomeView({ tiles, main = [], side = [], title = "Home", emptyTitle = "N
50
50
  function HomePage({ onShowSessions, navigationToggle }) {
51
51
  const props = usePluginSlotProps(null);
52
52
  const fills = [...dashboardTileFills({ scope: "global" }), ...legacyHomeAppFills()].sort((left, right) => left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id));
53
- const tiles = [];
53
+ const tiles = globalSlotFills(HOST_SLOTS.homeAttention).flatMap((fill) => fill.component === void 0 ? [] : [{
54
+ id: JSON.stringify([fill.pluginId, fill.id]),
55
+ size: "wide",
56
+ legacy: true,
57
+ body: createElement(fill.component, props)
58
+ }]);
54
59
  for (const fill of fills) {
55
60
  const component = fill.component;
56
61
  if (component === void 0) continue;
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.mjs","names":[],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport { dashboardTileFills, legacyHomeAppFills, parseDashboardTileData } from '../lib/pluginRegistry';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\n\nexport interface HomeViewProps {\n tiles?: readonly DashboardTileView[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** The shared Home and Workspace frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n main = [],\n side = [],\n title = 'Home',\n emptyTitle = 'Nothing on Home yet',\n emptyDescription = 'Apps you add show up here.',\n onShowSessions,\n navigationToggle = 'mobile',\n}: HomeViewProps) {\n const entries = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>\n {entries.length === 0 ? (\n <EmptyState title={emptyTitle} description={emptyDescription} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\n/** Home reads only global fills, regardless of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const fills = [...dashboardTileFills({ scope: 'global' }), ...legacyHomeAppFills()].sort(\n (left, right) =>\n left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id),\n );\n const tiles: DashboardTileView[] = [];\n for (const fill of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const id = JSON.stringify([fill.pluginId, fill.id]);\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const open = destination?.kind === 'page' ? props.openPage : props.openSettings;\n tiles.push({\n id,\n size:\n data === null\n ? (fill.data as { column?: unknown } | undefined)?.column === 'side'\n ? 'small'\n : 'wide'\n : (data.size ?? 'small'),\n ...(data === null ? { legacy: true } : { title: data.title, icon: data.icon, column: data.column }),\n ...(destination === undefined || open === undefined ? {} : { onOpen: () => open(destination.id) }),\n body: createElement(component, props),\n });\n }\n return (\n <HomeView\n tiles={tiles}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AAoBA,SAAgB,SAAS,EACvB,OACA,OAAO,CAAC,GACR,OAAO,CAAC,GACR,QAAQ,QACR,aAAa,uBACb,mBAAmB,8BACnB,gBACA,mBAAmB,YACH;CAChB,MAAM,UAAU,SAAS,CACvB,GAAG,KAAK,KAAK,MAAM,WAA8B;EAAE,IAAI,QAAQ;EAAS,MAAM;EAAQ;EAAM,QAAQ;CAAK,EAAE,GAC3G,GAAG,KAAK,KAAK,MAAM,WAA8B;EAAE,IAAI,QAAQ;EAAS,MAAM;EAAS;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ACJ,KAAK,MAA2C,WAAW,SAC1D,UACA,SACD,KAAK,QAAQ;GACpB,GAAI,SAAS,OAAO,EAAE,QAAQ,KAAK,IAAI;IAAE,OAAO,KAAK;IAAO,MAAM,KAAK;IAAM,QAAQ,KAAK;GAAO;GACjG,GAAI,gBAAgB,KAAA,KAAa,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,EAAE,EAAE;GAChG,MAAM,cAAc,WAAW,KAAK;EACtC,CAAC;CACH;CACA,OACE,oBAAC,UAAD;EACS;EACP,GAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EAC1D,GAAK,qBAAqB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB;CAC/D,CAAA;AAEL"}
1
+ {"version":3,"file":"HomePage.mjs","names":[],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { Button, EmptyState, FolderIcon } from '@agimon-ai/po-web-components';\nimport { createElement, type ReactNode } from 'react';\n\nimport {\n dashboardTileFills,\n globalSlotFills,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n} from '../lib/pluginRegistry';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\n\nexport interface HomeViewProps {\n tiles?: readonly DashboardTileView[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}\n\n/** The shared Home and Workspace frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n main = [],\n side = [],\n title = 'Home',\n emptyTitle = 'Nothing on Home yet',\n emptyDescription = 'Apps you add show up here.',\n onShowSessions,\n navigationToggle = 'mobile',\n}: HomeViewProps) {\n const entries = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-po-bg font-sans text-base text-po-text\"\n >\n {onShowSessions ? (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title=\"Show sessions\"\n aria-label=\"Show sessions\"\n onClick={onShowSessions}\n className=\"text-po-dim\"\n >\n <FolderIcon className=\"size-4\" />\n </Button>\n </div>\n ) : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>\n {entries.length === 0 ? (\n <EmptyState title={emptyTitle} description={emptyDescription} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\n/** Home reads only global fills, regardless of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n}) {\n const props = usePluginSlotProps(null);\n const fills = [...dashboardTileFills({ scope: 'global' }), ...legacyHomeAppFills()].sort(\n (left, right) =>\n left.order - right.order || left.pluginId.localeCompare(right.pluginId) || left.id.localeCompare(right.id),\n );\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const tiles: DashboardTileView[] = globalSlotFills(HOST_SLOTS.homeAttention).flatMap((fill) =>\n fill.component === undefined\n ? []\n : [\n {\n id: JSON.stringify([fill.pluginId, fill.id]),\n size: 'wide' as const,\n legacy: true,\n body: createElement(fill.component, props),\n },\n ],\n );\n for (const fill of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const id = JSON.stringify([fill.pluginId, fill.id]);\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const open = destination?.kind === 'page' ? props.openPage : props.openSettings;\n tiles.push({\n id,\n size:\n data === null\n ? (fill.data as { column?: unknown } | undefined)?.column === 'side'\n ? 'small'\n : 'wide'\n : (data.size ?? 'small'),\n ...(data === null ? { legacy: true } : { title: data.title, icon: data.icon, column: data.column }),\n ...(destination === undefined || open === undefined ? {} : { onOpen: () => open(destination.id) }),\n body: createElement(component, props),\n });\n }\n return (\n <HomeView\n tiles={tiles}\n {...(onShowSessions === undefined ? {} : { onShowSessions })}\n {...(navigationToggle === undefined ? {} : { navigationToggle })}\n />\n );\n}\n"],"mappings":";;;;;;;;AA0BA,SAAgB,SAAS,EACvB,OACA,OAAO,CAAC,GACR,OAAO,CAAC,GACR,QAAQ,QACR,aAAa,uBACb,mBAAmB,8BACnB,gBACA,mBAAmB,YACH;CAChB,MAAM,UAAU,SAAS,CACvB,GAAG,KAAK,KAAK,MAAM,WAA8B;EAAE,IAAI,QAAQ;EAAS,MAAM;EAAQ;EAAM,QAAQ;CAAK,EAAE,GAC3G,GAAG,KAAK,KAAK,MAAM,WAA8B;EAAE,IAAI,QAAQ;EAAS,MAAM;EAAS;EAAM,QAAQ;CAAK,EAAE,CAC9G;CACA,OACE,qBAAC,WAAD;EACE,cAAY;EACZ,eAAY;EACZ,WAAU;EAHZ,UAAA,CAKG,iBACC,oBAAC,OAAD;GAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;GAClF,UAAA,oBAAC,QAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAY;IACZ,OAAM;IACN,cAAW;IACX,SAAS;IACT,WAAU;IAEV,UAAA,oBAAC,YAAD,EAAY,WAAU,SAAU,CAAA;GAC1B,CAAA;EACL,CAAA,IACH,MACJ,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,MAAD;IAAI,WAAU;IAAqC,UAAA;GAAU,CAAA,GAC5D,QAAQ,WAAW,IAClB,oBAAC,YAAD;IAAY,OAAO;IAAY,aAAa;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AAC;CACH;CACA,OACE,oBAAC,UAAD;EACS;EACP,GAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EAC1D,GAAK,qBAAqB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB;CAC/D,CAAA;AAEL"}
@@ -6,21 +6,28 @@ let react_jsx_runtime = require("react/jsx-runtime");
6
6
  //#region src/web/features/sessions/NewSessionDialog.tsx
7
7
  /** The same plain creation form for an admitted workspace or a workspace-free session. */
8
8
  function NewSessionDialog({ workspaceId, workspaceRoot, hostId, onClose }) {
9
- const { createPlain } = require_useNewSessionActions.useNewSessionActions(workspaceId ?? null, onClose, hostId);
9
+ const { createPlain, loadProfiles } = require_useNewSessionActions.useNewSessionActions(workspaceId ?? null, onClose, hostId);
10
10
  const key = workspaceId ?? require_newSessionStore.generalSessionDraftKey(hostId);
11
11
  const draft = (0, _tanstack_react_store.useStore)(require_newSessionStore.newSessionDraftStore, (state) => state[key] ?? require_newSessionStore.EMPTY_NEW_SESSION_DRAFT);
12
+ const catalog = (0, _agimon_ai_po_web_components.useProfileCatalog)(key, loadProfiles);
12
13
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NewSessionDialogView, {
13
14
  workspaceRoot,
14
15
  name: draft.name,
15
16
  error: draft.error,
16
17
  busy: draft.pending,
18
+ profilePicker: catalog === void 0 ? void 0 : {
19
+ profiles: catalog.profiles,
20
+ status: catalog.status,
21
+ value: draft.profile,
22
+ onChange: (choice) => require_newSessionStore.setNewSessionProfile(key, choice)
23
+ },
17
24
  onName: (name) => require_newSessionStore.setNewSessionName(key, name),
18
25
  onCreate: () => void createPlain(draft.name),
19
26
  onClose
20
27
  });
21
28
  }
22
29
  /** Pure composition shared by production and deterministic approval stories. */
23
- function NewSessionDialogView({ workspaceRoot, name, error, busy, onName, onCreate, onClose }) {
30
+ function NewSessionDialogView({ workspaceRoot, name, error, busy, profilePicker, onName, onCreate, onClose }) {
24
31
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.Dialog, {
25
32
  open: true,
26
33
  onOpenChange: (next) => !next && !busy && onClose(),
@@ -53,6 +60,10 @@ function NewSessionDialogView({ workspaceRoot, name, error, busy, onName, onCrea
53
60
  placeholder: "Session name"
54
61
  })]
55
62
  }),
63
+ profilePicker === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.ProfilePicker, {
64
+ ...profilePicker,
65
+ disabled: busy
66
+ }),
56
67
  error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
57
68
  role: "alert",
58
69
  "data-testid": "new-session-error",
@@ -1 +1 @@
1
- {"version":3,"file":"NewSessionDialog.cjs","names":["useNewSessionActions","generalSessionDraftKey","useStore","newSessionDraftStore","EMPTY_NEW_SESSION_DRAFT","setNewSessionName","Dialog","DialogContent","DialogHeader","DialogTitle","DialogBody","Input","DialogFooter","Button"],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport {\n generalSessionDraftKey,\n newSessionDraftStore,\n EMPTY_NEW_SESSION_DRAFT,\n setNewSessionName,\n} from '../../stores/newSessionStore';\nimport { useNewSessionActions } from './useNewSessionActions';\n\n/** The same plain creation form for an admitted workspace or a workspace-free session. */\nexport function NewSessionDialog({\n workspaceId,\n workspaceRoot,\n hostId,\n onClose,\n}: {\n workspaceId?: string;\n workspaceRoot?: string;\n hostId?: string;\n onClose: () => void;\n}) {\n const { createPlain } = useNewSessionActions(workspaceId ?? null, onClose, hostId);\n const key = workspaceId ?? generalSessionDraftKey(hostId);\n const draft = useStore(newSessionDraftStore, (state) => state[key] ?? EMPTY_NEW_SESSION_DRAFT);\n return (\n <NewSessionDialogView\n workspaceRoot={workspaceRoot}\n name={draft.name}\n error={draft.error}\n busy={draft.pending}\n onName={(name) => setNewSessionName(key, name)}\n onCreate={() => void createPlain(draft.name)}\n onClose={onClose}\n />\n );\n}\n\n/** Pure composition shared by production and deterministic approval stories. */\nexport function NewSessionDialogView({\n workspaceRoot,\n name,\n error,\n busy,\n onName,\n onCreate,\n onClose,\n}: {\n workspaceRoot?: string;\n name: string;\n error: string;\n busy: boolean;\n onName: (name: string) => void;\n onCreate: () => void;\n onClose: () => void;\n}) {\n return (\n <Dialog open onOpenChange={(next) => !next && !busy && onClose()}>\n <DialogContent width=\"md\" data-testid=\"new-session-dialog\" aria-describedby={undefined}>\n <DialogHeader>\n <DialogTitle>New session</DialogTitle>\n </DialogHeader>\n <DialogBody>\n {workspaceRoot === undefined ? null : (\n <p className=\"truncate text-sm text-po-dim\" title={workspaceRoot}>\n {workspaceRoot}\n </p>\n )}\n <label htmlFor=\"new-session-name\" className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-po-text\">Name (optional)</span>\n <Input\n id=\"new-session-name\"\n data-testid=\"new-session-name\"\n value={name}\n autoFocus\n disabled={busy}\n onChange={(event) => onName(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !busy) onCreate();\n }}\n placeholder=\"Session name\"\n />\n </label>\n {error ? (\n <p role=\"alert\" data-testid=\"new-session-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : null}\n <DialogFooter>\n <Button variant=\"outline\" data-testid=\"new-session-cancel\" onClick={onClose} disabled={busy}>\n Cancel\n </Button>\n <Button variant=\"primary\" data-testid=\"new-session-create\" onClick={onCreate} disabled={busy}>\n {busy ? 'Creating…' : 'Create'}\n </Button>\n </DialogFooter>\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,iBAAiB,EAC/B,aACA,eACA,QACA,WAMC;CACD,MAAM,EAAE,gBAAgBA,6BAAAA,qBAAqB,eAAe,MAAM,SAAS,MAAM;CACjF,MAAM,MAAM,eAAeC,wBAAAA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MACA,UAAU;MACV,WAAW,UAAU,OAAO,MAAM,OAAO,KAAK;MAC9C,YAAY,UAAU;OACpB,IAAI,MAAM,QAAQ,WAAW,CAAC,MAAM,SAAS;MAC/C;MACA,aAAY;KACb,CAAA,CACI;;IACN,QACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KAAG,MAAK;KAAQ,eAAY;KAAoB,WAAU;KACvD,UAAA;IACA,CAAA,IACD;IACJ,iBAAA,GAAA,kBAAA,KAAA,CAACC,6BAAAA,cAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAS,UAAU;KAAM,UAAA;IAErF,CAAA,GACR,iBAAA,GAAA,kBAAA,IAAA,CAACA,6BAAAA,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAU,UAAU;KACrF,UAAA,OAAO,cAAc;IAChB,CAAA,CACI,EAAA,CAAA;GACJ,EAAA,CAAA,CACC;;CACT,CAAA;AAEZ"}
1
+ {"version":3,"file":"NewSessionDialog.cjs","names":["useNewSessionActions","generalSessionDraftKey","useStore","newSessionDraftStore","EMPTY_NEW_SESSION_DRAFT","useProfileCatalog","setNewSessionProfile","setNewSessionName","Dialog","DialogContent","DialogHeader","DialogTitle","DialogBody","Input","ProfilePicker","DialogFooter","Button"],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n ProfilePicker,\n type ProfileChoice,\n type ProfilePickerProfile,\n type ProfilePickerStatus,\n useProfileCatalog,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport {\n generalSessionDraftKey,\n newSessionDraftStore,\n EMPTY_NEW_SESSION_DRAFT,\n setNewSessionName,\n setNewSessionProfile,\n} from '../../stores/newSessionStore';\nimport { useNewSessionActions } from './useNewSessionActions';\n\n/** The same plain creation form for an admitted workspace or a workspace-free session. */\nexport function NewSessionDialog({\n workspaceId,\n workspaceRoot,\n hostId,\n onClose,\n}: {\n workspaceId?: string;\n workspaceRoot?: string;\n hostId?: string;\n onClose: () => void;\n}) {\n const { createPlain, loadProfiles } = useNewSessionActions(workspaceId ?? null, onClose, hostId);\n const key = workspaceId ?? generalSessionDraftKey(hostId);\n const draft = useStore(newSessionDraftStore, (state) => state[key] ?? EMPTY_NEW_SESSION_DRAFT);\n const catalog = useProfileCatalog(key, loadProfiles);\n return (\n <NewSessionDialogView\n workspaceRoot={workspaceRoot}\n name={draft.name}\n error={draft.error}\n busy={draft.pending}\n profilePicker={\n catalog === undefined\n ? undefined\n : {\n profiles: catalog.profiles,\n status: catalog.status,\n value: draft.profile,\n onChange: (choice) => setNewSessionProfile(key, choice),\n }\n }\n onName={(name) => setNewSessionName(key, name)}\n onCreate={() => void createPlain(draft.name)}\n onClose={onClose}\n />\n );\n}\n\n/** Pure composition shared by production and deterministic approval stories. */\nexport function NewSessionDialogView({\n workspaceRoot,\n name,\n error,\n busy,\n profilePicker,\n onName,\n onCreate,\n onClose,\n}: {\n workspaceRoot?: string;\n name: string;\n error: string;\n busy: boolean;\n /** Absent when the target has no profile list, such as a workspace-free session. */\n profilePicker?: {\n profiles: readonly ProfilePickerProfile[];\n status: ProfilePickerStatus;\n value: ProfileChoice;\n onChange: (choice: ProfileChoice) => void;\n };\n onName: (name: string) => void;\n onCreate: () => void;\n onClose: () => void;\n}) {\n return (\n <Dialog open onOpenChange={(next) => !next && !busy && onClose()}>\n <DialogContent width=\"md\" data-testid=\"new-session-dialog\" aria-describedby={undefined}>\n <DialogHeader>\n <DialogTitle>New session</DialogTitle>\n </DialogHeader>\n <DialogBody>\n {workspaceRoot === undefined ? null : (\n <p className=\"truncate text-sm text-po-dim\" title={workspaceRoot}>\n {workspaceRoot}\n </p>\n )}\n <label htmlFor=\"new-session-name\" className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-po-text\">Name (optional)</span>\n <Input\n id=\"new-session-name\"\n data-testid=\"new-session-name\"\n value={name}\n autoFocus\n disabled={busy}\n onChange={(event) => onName(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !busy) onCreate();\n }}\n placeholder=\"Session name\"\n />\n </label>\n {profilePicker === undefined ? null : <ProfilePicker {...profilePicker} disabled={busy} />}\n {error ? (\n <p role=\"alert\" data-testid=\"new-session-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : null}\n <DialogFooter>\n <Button variant=\"outline\" data-testid=\"new-session-cancel\" onClick={onClose} disabled={busy}>\n Cancel\n </Button>\n <Button variant=\"primary\" data-testid=\"new-session-create\" onClick={onCreate} disabled={busy}>\n {busy ? 'Creating…' : 'Create'}\n </Button>\n </DialogFooter>\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;AA2BA,SAAgB,iBAAiB,EAC/B,aACA,eACA,QACA,WAMC;CACD,MAAM,EAAE,aAAa,iBAAiBA,6BAAAA,qBAAqB,eAAe,MAAM,SAAS,MAAM;CAC/F,MAAM,MAAM,eAAeC,wBAAAA,uBAAuB,MAAM;CACxD,MAAM,SAAA,GAAQC,sBAAAA,SAAAA,CAASC,wBAAAA,uBAAuB,UAAU,MAAM,QAAQC,wBAAAA,uBAAuB;CAC7F,MAAM,WAAA,GAAUC,6BAAAA,kBAAAA,CAAkB,KAAK,YAAY;CACnD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAD;EACiB;EACf,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,eACE,YAAY,KAAA,IACR,KAAA,IACA;GACE,UAAU,QAAQ;GAClB,QAAQ,QAAQ;GAChB,OAAO,MAAM;GACb,WAAW,WAAWC,wBAAAA,qBAAqB,KAAK,MAAM;EACxD;EAEN,SAAS,SAASC,wBAAAA,kBAAkB,KAAK,IAAI;EAC7C,gBAAgB,KAAK,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,GAAA,kBAAA,IAAA,CAAC,KAAD;KAAG,MAAK;KAAQ,eAAY;KAAoB,WAAU;KACvD,UAAA;IACA,CAAA,IACD;IACJ,iBAAA,GAAA,kBAAA,KAAA,CAACC,6BAAAA,cAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAS,UAAU;KAAM,UAAA;IAErF,CAAA,GACR,iBAAA,GAAA,kBAAA,IAAA,CAACA,6BAAAA,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAU,UAAU;KACrF,UAAA,OAAO,cAAc;IAChB,CAAA,CACI,EAAA,CAAA;GACJ,EAAA,CAAA,CACC;;CACT,CAAA;AAEZ"}
@@ -1,3 +1,4 @@
1
+ import { ProfileChoice, ProfilePickerProfile, ProfilePickerStatus } from "@agimon-ai/po-web-components";
1
2
  //#region src/web/features/sessions/NewSessionDialog.d.ts
2
3
  /** The same plain creation form for an admitted workspace or a workspace-free session. */
3
4
  export declare function NewSessionDialog({ workspaceId, workspaceRoot, hostId, onClose }: {
@@ -7,11 +8,18 @@ export declare function NewSessionDialog({ workspaceId, workspaceRoot, hostId, o
7
8
  onClose: () => void;
8
9
  }): import("react").JSX.Element;
9
10
  /** Pure composition shared by production and deterministic approval stories. */
10
- export declare function NewSessionDialogView({ workspaceRoot, name, error, busy, onName, onCreate, onClose }: {
11
+ export declare function NewSessionDialogView({ workspaceRoot, name, error, busy, profilePicker, onName, onCreate, onClose }: {
11
12
  workspaceRoot?: string;
12
13
  name: string;
13
14
  error: string;
14
15
  busy: boolean;
16
+ /** Absent when the target has no profile list, such as a workspace-free session. */
17
+ profilePicker?: {
18
+ profiles: readonly ProfilePickerProfile[];
19
+ status: ProfilePickerStatus;
20
+ value: ProfileChoice;
21
+ onChange: (choice: ProfileChoice) => void;
22
+ };
15
23
  onName: (name: string) => void;
16
24
  onCreate: () => void;
17
25
  onClose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"NewSessionDialog.d.mts","names":[],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"mappings":";;wBAqBgB,mBACd,aACA,eACA,QACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;wBAkBe,uBACd,eACA,MACA,OACA,MACA,QACA,UACA;EAEA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;oBACD,IAAA"}
1
+ {"version":3,"file":"NewSessionDialog.d.mts","names":[],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"mappings":";;;wBA2BgB,mBACd,aACA,eACA,QACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;wBA6Be,uBACd,eACA,MACA,OACA,MACA,eACA,QACA,UACA;EAEA;EACA;EACA;EACA;;EAEA;IACE,mBAAmB;IACnB,QAAQ;IACR,OAAO;IACP,WAAW,QAAQ;;EAErB,SAAS;EACT;EACA;oBACD,IAAA"}
@@ -1,26 +1,33 @@
1
- import { EMPTY_NEW_SESSION_DRAFT, generalSessionDraftKey, newSessionDraftStore, setNewSessionName } from "../../stores/newSessionStore.mjs";
1
+ import { EMPTY_NEW_SESSION_DRAFT, generalSessionDraftKey, newSessionDraftStore, setNewSessionName, setNewSessionProfile } from "../../stores/newSessionStore.mjs";
2
2
  import { useNewSessionActions } from "./useNewSessionActions.mjs";
3
3
  import { useStore } from "@tanstack/react-store";
4
- import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input } from "@agimon-ai/po-web-components";
4
+ import { Button, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, ProfilePicker, useProfileCatalog } from "@agimon-ai/po-web-components";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/web/features/sessions/NewSessionDialog.tsx
7
7
  /** The same plain creation form for an admitted workspace or a workspace-free session. */
8
8
  function NewSessionDialog({ workspaceId, workspaceRoot, hostId, onClose }) {
9
- const { createPlain } = useNewSessionActions(workspaceId ?? null, onClose, hostId);
9
+ const { createPlain, loadProfiles } = useNewSessionActions(workspaceId ?? null, onClose, hostId);
10
10
  const key = workspaceId ?? generalSessionDraftKey(hostId);
11
11
  const draft = useStore(newSessionDraftStore, (state) => state[key] ?? EMPTY_NEW_SESSION_DRAFT);
12
+ const catalog = useProfileCatalog(key, loadProfiles);
12
13
  return /* @__PURE__ */ jsx(NewSessionDialogView, {
13
14
  workspaceRoot,
14
15
  name: draft.name,
15
16
  error: draft.error,
16
17
  busy: draft.pending,
18
+ profilePicker: catalog === void 0 ? void 0 : {
19
+ profiles: catalog.profiles,
20
+ status: catalog.status,
21
+ value: draft.profile,
22
+ onChange: (choice) => setNewSessionProfile(key, choice)
23
+ },
17
24
  onName: (name) => setNewSessionName(key, name),
18
25
  onCreate: () => void createPlain(draft.name),
19
26
  onClose
20
27
  });
21
28
  }
22
29
  /** Pure composition shared by production and deterministic approval stories. */
23
- function NewSessionDialogView({ workspaceRoot, name, error, busy, onName, onCreate, onClose }) {
30
+ function NewSessionDialogView({ workspaceRoot, name, error, busy, profilePicker, onName, onCreate, onClose }) {
24
31
  return /* @__PURE__ */ jsx(Dialog, {
25
32
  open: true,
26
33
  onOpenChange: (next) => !next && !busy && onClose(),
@@ -53,6 +60,10 @@ function NewSessionDialogView({ workspaceRoot, name, error, busy, onName, onCrea
53
60
  placeholder: "Session name"
54
61
  })]
55
62
  }),
63
+ profilePicker === void 0 ? null : /* @__PURE__ */ jsx(ProfilePicker, {
64
+ ...profilePicker,
65
+ disabled: busy
66
+ }),
56
67
  error ? /* @__PURE__ */ jsx("p", {
57
68
  role: "alert",
58
69
  "data-testid": "new-session-error",
@@ -1 +1 @@
1
- {"version":3,"file":"NewSessionDialog.mjs","names":[],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport {\n generalSessionDraftKey,\n newSessionDraftStore,\n EMPTY_NEW_SESSION_DRAFT,\n setNewSessionName,\n} from '../../stores/newSessionStore';\nimport { useNewSessionActions } from './useNewSessionActions';\n\n/** The same plain creation form for an admitted workspace or a workspace-free session. */\nexport function NewSessionDialog({\n workspaceId,\n workspaceRoot,\n hostId,\n onClose,\n}: {\n workspaceId?: string;\n workspaceRoot?: string;\n hostId?: string;\n onClose: () => void;\n}) {\n const { createPlain } = useNewSessionActions(workspaceId ?? null, onClose, hostId);\n const key = workspaceId ?? generalSessionDraftKey(hostId);\n const draft = useStore(newSessionDraftStore, (state) => state[key] ?? EMPTY_NEW_SESSION_DRAFT);\n return (\n <NewSessionDialogView\n workspaceRoot={workspaceRoot}\n name={draft.name}\n error={draft.error}\n busy={draft.pending}\n onName={(name) => setNewSessionName(key, name)}\n onCreate={() => void createPlain(draft.name)}\n onClose={onClose}\n />\n );\n}\n\n/** Pure composition shared by production and deterministic approval stories. */\nexport function NewSessionDialogView({\n workspaceRoot,\n name,\n error,\n busy,\n onName,\n onCreate,\n onClose,\n}: {\n workspaceRoot?: string;\n name: string;\n error: string;\n busy: boolean;\n onName: (name: string) => void;\n onCreate: () => void;\n onClose: () => void;\n}) {\n return (\n <Dialog open onOpenChange={(next) => !next && !busy && onClose()}>\n <DialogContent width=\"md\" data-testid=\"new-session-dialog\" aria-describedby={undefined}>\n <DialogHeader>\n <DialogTitle>New session</DialogTitle>\n </DialogHeader>\n <DialogBody>\n {workspaceRoot === undefined ? null : (\n <p className=\"truncate text-sm text-po-dim\" title={workspaceRoot}>\n {workspaceRoot}\n </p>\n )}\n <label htmlFor=\"new-session-name\" className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-po-text\">Name (optional)</span>\n <Input\n id=\"new-session-name\"\n data-testid=\"new-session-name\"\n value={name}\n autoFocus\n disabled={busy}\n onChange={(event) => onName(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !busy) onCreate();\n }}\n placeholder=\"Session name\"\n />\n </label>\n {error ? (\n <p role=\"alert\" data-testid=\"new-session-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : null}\n <DialogFooter>\n <Button variant=\"outline\" data-testid=\"new-session-cancel\" onClick={onClose} disabled={busy}>\n Cancel\n </Button>\n <Button variant=\"primary\" data-testid=\"new-session-create\" onClick={onCreate} disabled={busy}>\n {busy ? 'Creating…' : 'Create'}\n </Button>\n </DialogFooter>\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,iBAAiB,EAC/B,aACA,eACA,QACA,WAMC;CACD,MAAM,EAAE,gBAAgB,qBAAqB,eAAe,MAAM,SAAS,MAAM;CACjF,MAAM,MAAM,eAAe,uBAAuB,MAAM;CACxD,MAAM,QAAQ,SAAS,uBAAuB,UAAU,MAAM,QAAQ,uBAAuB;CAC7F,OACE,oBAAC,sBAAD;EACiB;EACf,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,SAAS,SAAS,kBAAkB,KAAK,IAAI;EAC7C,gBAAgB,KAAK,YAAY,MAAM,IAAI;EAClC;CACV,CAAA;AAEL;;AAGA,SAAgB,qBAAqB,EACnC,eACA,MACA,OACA,MACA,QACA,UACA,WASC;CACD,OACE,oBAAC,QAAD;EAAQ,MAAA;EAAK,eAAe,SAAS,CAAC,QAAQ,CAAC,QAAQ,QAAQ;EAC7D,UAAA,qBAAC,eAAD;GAAe,OAAM;GAAK,eAAY;GAAqB,oBAAkB,KAAA;GAA7E,UAAA,CACE,oBAAC,cAAD,EAAA,UACE,oBAAC,aAAD,EAAA,UAAa,cAAwB,CAAA,EACzB,CAAA,GACd,qBAAC,YAAD,EAAA,UAAA;IACG,kBAAkB,KAAA,IAAY,OAC7B,oBAAC,KAAD;KAAG,WAAU;KAA+B,OAAO;KAChD,UAAA;IACA,CAAA;IAEL,qBAAC,SAAD;KAAO,SAAQ;KAAmB,WAAU;KAA5C,UAAA,CACE,oBAAC,QAAD;MAAM,WAAU;MAAqC,UAAA;KAAqB,CAAA,GAC1E,oBAAC,OAAD;MACE,IAAG;MACH,eAAY;MACZ,OAAO;MACP,WAAA;MACA,UAAU;MACV,WAAW,UAAU,OAAO,MAAM,OAAO,KAAK;MAC9C,YAAY,UAAU;OACpB,IAAI,MAAM,QAAQ,WAAW,CAAC,MAAM,SAAS;MAC/C;MACA,aAAY;KACb,CAAA,CACI;;IACN,QACC,oBAAC,KAAD;KAAG,MAAK;KAAQ,eAAY;KAAoB,WAAU;KACvD,UAAA;IACA,CAAA,IACD;IACJ,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAS,UAAU;KAAM,UAAA;IAErF,CAAA,GACR,oBAAC,QAAD;KAAQ,SAAQ;KAAU,eAAY;KAAqB,SAAS;KAAU,UAAU;KACrF,UAAA,OAAO,cAAc;IAChB,CAAA,CACI,EAAA,CAAA;GACJ,EAAA,CAAA,CACC;;CACT,CAAA;AAEZ"}
1
+ {"version":3,"file":"NewSessionDialog.mjs","names":[],"sources":["../../../../src/web/features/sessions/NewSessionDialog.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n ProfilePicker,\n type ProfileChoice,\n type ProfilePickerProfile,\n type ProfilePickerStatus,\n useProfileCatalog,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\n\nimport {\n generalSessionDraftKey,\n newSessionDraftStore,\n EMPTY_NEW_SESSION_DRAFT,\n setNewSessionName,\n setNewSessionProfile,\n} from '../../stores/newSessionStore';\nimport { useNewSessionActions } from './useNewSessionActions';\n\n/** The same plain creation form for an admitted workspace or a workspace-free session. */\nexport function NewSessionDialog({\n workspaceId,\n workspaceRoot,\n hostId,\n onClose,\n}: {\n workspaceId?: string;\n workspaceRoot?: string;\n hostId?: string;\n onClose: () => void;\n}) {\n const { createPlain, loadProfiles } = useNewSessionActions(workspaceId ?? null, onClose, hostId);\n const key = workspaceId ?? generalSessionDraftKey(hostId);\n const draft = useStore(newSessionDraftStore, (state) => state[key] ?? EMPTY_NEW_SESSION_DRAFT);\n const catalog = useProfileCatalog(key, loadProfiles);\n return (\n <NewSessionDialogView\n workspaceRoot={workspaceRoot}\n name={draft.name}\n error={draft.error}\n busy={draft.pending}\n profilePicker={\n catalog === undefined\n ? undefined\n : {\n profiles: catalog.profiles,\n status: catalog.status,\n value: draft.profile,\n onChange: (choice) => setNewSessionProfile(key, choice),\n }\n }\n onName={(name) => setNewSessionName(key, name)}\n onCreate={() => void createPlain(draft.name)}\n onClose={onClose}\n />\n );\n}\n\n/** Pure composition shared by production and deterministic approval stories. */\nexport function NewSessionDialogView({\n workspaceRoot,\n name,\n error,\n busy,\n profilePicker,\n onName,\n onCreate,\n onClose,\n}: {\n workspaceRoot?: string;\n name: string;\n error: string;\n busy: boolean;\n /** Absent when the target has no profile list, such as a workspace-free session. */\n profilePicker?: {\n profiles: readonly ProfilePickerProfile[];\n status: ProfilePickerStatus;\n value: ProfileChoice;\n onChange: (choice: ProfileChoice) => void;\n };\n onName: (name: string) => void;\n onCreate: () => void;\n onClose: () => void;\n}) {\n return (\n <Dialog open onOpenChange={(next) => !next && !busy && onClose()}>\n <DialogContent width=\"md\" data-testid=\"new-session-dialog\" aria-describedby={undefined}>\n <DialogHeader>\n <DialogTitle>New session</DialogTitle>\n </DialogHeader>\n <DialogBody>\n {workspaceRoot === undefined ? null : (\n <p className=\"truncate text-sm text-po-dim\" title={workspaceRoot}>\n {workspaceRoot}\n </p>\n )}\n <label htmlFor=\"new-session-name\" className=\"flex flex-col gap-1\">\n <span className=\"text-base font-medium text-po-text\">Name (optional)</span>\n <Input\n id=\"new-session-name\"\n data-testid=\"new-session-name\"\n value={name}\n autoFocus\n disabled={busy}\n onChange={(event) => onName(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !busy) onCreate();\n }}\n placeholder=\"Session name\"\n />\n </label>\n {profilePicker === undefined ? null : <ProfilePicker {...profilePicker} disabled={busy} />}\n {error ? (\n <p role=\"alert\" data-testid=\"new-session-error\" className=\"text-sm text-po-red\">\n {error}\n </p>\n ) : null}\n <DialogFooter>\n <Button variant=\"outline\" data-testid=\"new-session-cancel\" onClick={onClose} disabled={busy}>\n Cancel\n </Button>\n <Button variant=\"primary\" data-testid=\"new-session-create\" onClick={onCreate} disabled={busy}>\n {busy ? 'Creating…' : 'Create'}\n </Button>\n </DialogFooter>\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;AA2BA,SAAgB,iBAAiB,EAC/B,aACA,eACA,QACA,WAMC;CACD,MAAM,EAAE,aAAa,iBAAiB,qBAAqB,eAAe,MAAM,SAAS,MAAM;CAC/F,MAAM,MAAM,eAAe,uBAAuB,MAAM;CACxD,MAAM,QAAQ,SAAS,uBAAuB,UAAU,MAAM,QAAQ,uBAAuB;CAC7F,MAAM,UAAU,kBAAkB,KAAK,YAAY;CACnD,OACE,oBAAC,sBAAD;EACiB;EACf,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,eACE,YAAY,KAAA,IACR,KAAA,IACA;GACE,UAAU,QAAQ;GAClB,QAAQ,QAAQ;GAChB,OAAO,MAAM;GACb,WAAW,WAAW,qBAAqB,KAAK,MAAM;EACxD;EAEN,SAAS,SAAS,kBAAkB,KAAK,IAAI;EAC7C,gBAAgB,KAAK,YAAY,MAAM,IAAI;EAClC;CACV,CAAA;AAEL;;AAGA,SAAgB,qBAAqB,EACnC,eACA,MACA,OACA,MACA,eACA,QACA,UACA,WAgBC;CACD,OACE,oBAAC,QAAD;EAAQ,MAAA;EAAK,eAAe,SAAS,CAAC,QAAQ,CAAC,QAAQ,QAAQ;EAC7D,UAAA,qBAAC,eAAD;GAAe,OAAM;GAAK,eAAY;GAAqB,oBAAkB,KAAA;G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