@hachej/boring-workspace 0.1.70 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FileTree-B_fRS4Om.js → FileTree-C8JPlZtS.js} +1 -1
- package/dist/{MarkdownEditor-C55gVDyW.js → MarkdownEditor-B9wN6tGH.js} +14 -14
- package/dist/{WorkspaceLoadingState-D3i4X-eH.js → WorkspaceLoadingState-TgOWTNJC.js} +350 -203
- package/dist/{WorkspaceProvider-Ddx7GByq.js → WorkspaceProvider-DcOiZU24.js} +9 -9
- package/dist/app-front.d.ts +2 -883
- package/dist/app-front.js +1049 -1033
- package/dist/app-server.d.ts +4 -4
- package/dist/bridge-client.d.ts +2 -2
- package/dist/charts.d.ts +2 -119
- package/dist/plugin.d.ts +3 -3
- package/dist/{runtimeEnv-CU-c4kaV.d.ts → runtimeEnv-DKtVLBXo.d.ts} +2 -2
- package/dist/server.d.ts +6 -6
- package/dist/shared.d.ts +3 -3
- package/dist/src/__tests__/WorkspaceProvider.test.d.ts +1 -0
- package/dist/src/__tests__/exploration.property.test.d.ts +1 -0
- package/dist/src/__tests__/plugin-integration.test.d.ts +1 -0
- package/dist/src/__tests__/public-api.test.d.ts +1 -0
- package/dist/src/__tests__/publicFileStateApi.test.d.ts +1 -0
- package/dist/src/__tests__/theme-system.test.d.ts +1 -0
- package/dist/src/app/front/CloseLeftPaneOnAttention.d.ts +10 -0
- package/dist/src/app/front/PluginAppLeftHost.d.ts +18 -0
- package/dist/src/app/front/WorkspaceAgentFront.d.ts +174 -0
- package/dist/src/app/front/WorkspaceAgentStatusStates.d.ts +5 -0
- package/dist/src/app/front/WorkspaceBackgroundBoot.d.ts +10 -0
- package/dist/src/app/front/WorkspaceBootGate.d.ts +12 -0
- package/dist/src/app/front/WorkspaceFullPagePanel.d.ts +5 -0
- package/dist/src/app/front/WorkspaceShellCapabilitiesHost.d.ts +20 -0
- package/dist/src/app/front/WorkspaceUiStateSync.d.ts +9 -0
- package/dist/src/app/front/__tests__/WorkspaceAgentFront.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceBackgroundBoot.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceBootGate.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/WorkspaceFullPagePanel.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/chatPaneState.property.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/useWorkspaceShellCapabilitiesController.test.d.ts +1 -0
- package/dist/src/app/front/__tests__/workspacePreload.test.d.ts +1 -0
- package/dist/src/app/front/chatPaneState.d.ts +8 -0
- package/dist/src/app/front/fullPageRoute.d.ts +10 -0
- package/dist/src/app/front/fullPageRouteErrors.d.ts +7 -0
- package/dist/src/app/front/index.d.ts +8 -0
- package/dist/src/app/front/localStorageSessions.d.ts +18 -0
- package/dist/src/app/front/useWorkspaceShellCapabilitiesController.d.ts +8 -0
- package/dist/src/app/front/workspaceBuiltinPlugins.d.ts +6 -0
- package/dist/src/app/front/workspacePreload.d.ts +64 -0
- package/dist/src/bridge-client/__tests__/client.test.d.ts +1 -0
- package/dist/src/bridge-client/index.d.ts +65 -0
- package/dist/src/front/agentPlugins/__tests__/registerAgentPlugin.test.d.ts +1 -0
- package/dist/src/front/agentPlugins/registerAgentPlugin.d.ts +26 -0
- package/dist/src/front/agentPlugins/reloadEvent.d.ts +7 -0
- package/dist/src/front/attention/WorkspaceAttentionProvider.d.ts +71 -0
- package/dist/src/front/attention/__tests__/WorkspaceAttentionProvider.test.d.ts +1 -0
- package/dist/src/front/attention/index.d.ts +2 -0
- package/dist/src/front/bridge/WorkspaceLink.d.ts +35 -0
- package/dist/src/front/bridge/__tests__/WorkspaceLink.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/bridge.property.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/bridge.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/client.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/uiCommandDispatcher.test.d.ts +1 -0
- package/dist/src/front/bridge/__tests__/uiCommandStream.test.d.ts +1 -0
- package/dist/src/front/bridge/client.d.ts +33 -0
- package/dist/src/front/bridge/createBridge.d.ts +8 -0
- package/dist/src/front/bridge/index.d.ts +12 -0
- package/dist/src/front/bridge/types.d.ts +92 -0
- package/dist/src/front/bridge/uiCommandBus.d.ts +3 -0
- package/dist/src/front/bridge/uiCommandDispatcher.d.ts +44 -0
- package/dist/src/front/bridge/uiCommandStream.d.ts +41 -0
- package/dist/src/front/bridge/validation.d.ts +66 -0
- package/dist/src/front/charts/__tests__/charts.test.d.ts +1 -0
- package/dist/src/front/charts/index.d.ts +92 -0
- package/dist/src/front/chrome/artifact-surface/ArtifactSurfacePane.d.ts +18 -0
- package/dist/src/front/chrome/artifact-surface/SurfaceShell.d.ts +84 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/ArtifactSurfacePane.persistence.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/ArtifactSurfacePane.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/SurfaceShell.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/__tests__/resolvePanelForPath.test.d.ts +1 -0
- package/dist/src/front/chrome/artifact-surface/definition.d.ts +12 -0
- package/dist/src/front/chrome/artifact-surface/surfaceShellHelpers.d.ts +10 -0
- package/dist/src/front/chrome/chat/ChatPanelHost.d.ts +16 -0
- package/dist/src/front/chrome/chat/DetachedChatPopover.d.ts +11 -0
- package/dist/src/front/chrome/chat/__tests__/ChatPanelHost.test.d.ts +1 -0
- package/dist/src/front/chrome/chat/composerStop.d.ts +19 -0
- package/dist/src/front/chrome/chat/definition.d.ts +16 -0
- package/dist/src/front/chrome/chat/types.d.ts +30 -0
- package/dist/src/front/chrome/empty-pane/EmptyPane.d.ts +5 -0
- package/dist/src/front/chrome/empty-pane/__tests__/EmptyPane.test.d.ts +1 -0
- package/dist/src/front/chrome/management/ManagementOverlaySurface.d.ts +16 -0
- package/dist/src/front/chrome/plugins/PluginsOverlay.d.ts +16 -0
- package/dist/src/front/chrome/session-list/SessionBrowser.d.ts +20 -0
- package/dist/src/front/chrome/session-list/__tests__/SessionBrowser.test.d.ts +1 -0
- package/dist/src/front/chrome/session-list/definition.d.ts +28 -0
- package/dist/src/front/chrome/skills/SkillsPage.d.ts +11 -0
- package/dist/src/front/chrome/skills/definition.d.ts +3 -0
- package/dist/src/front/chrome/workbench-left/WorkbenchLeftPane.d.ts +28 -0
- package/dist/src/front/chrome/workbench-left/__tests__/WorkbenchLeftPane.test.d.ts +1 -0
- package/dist/src/front/chrome/workbench-left/definition.d.ts +12 -0
- package/dist/src/front/chrome/workbench-left/useWorkspaceLeftPaneActions.d.ts +48 -0
- package/dist/src/front/components/CommandPalette.d.ts +21 -0
- package/dist/src/front/components/ControlTooltip.d.ts +12 -0
- package/dist/src/front/components/ErrorChip.d.ts +6 -0
- package/dist/src/front/components/PanelErrorBoundary.d.ts +22 -0
- package/dist/src/front/components/SessionList.d.ts +15 -0
- package/dist/src/front/components/WorkspaceLoadingState.d.ts +8 -0
- package/dist/src/front/components/__tests__/CommandPalette.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/PanelErrorBoundary.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/SessionList.test.d.ts +1 -0
- package/dist/src/front/components/__tests__/WorkspaceLoadingState.test.d.ts +1 -0
- package/dist/src/front/components/commandPaletteHelpers.d.ts +16 -0
- package/dist/src/front/components/recent/__tests__/migrate.test.d.ts +1 -0
- package/dist/src/front/components/recent/__tests__/recentStore.test.d.ts +1 -0
- package/dist/src/front/components/recent/index.d.ts +2 -0
- package/dist/src/front/components/recent/recentStore.d.ts +9 -0
- package/dist/src/front/components/recent/types.d.ts +23 -0
- package/dist/src/front/components/useCommandPaletteCatalogSearch.d.ts +7 -0
- package/dist/src/front/components/useCommandPaletteChrome.d.ts +14 -0
- package/dist/src/front/components/useCommandPaletteSelection.d.ts +15 -0
- package/dist/src/front/detached/DetachedPanelPopover.d.ts +2 -0
- package/dist/src/front/detached/detachedPanelTypes.d.ts +21 -0
- package/dist/src/front/detached/useDetachedPanelPosition.d.ts +10 -0
- package/dist/src/front/dock/DockviewShell.d.ts +6 -0
- package/dist/src/front/dock/PanelChrome.d.ts +16 -0
- package/dist/src/front/dock/ShadcnTab.d.ts +2 -0
- package/dist/src/front/dock/__tests__/dock.test.d.ts +1 -0
- package/dist/src/front/dock/index.d.ts +3 -0
- package/dist/src/front/dock/types.d.ts +69 -0
- package/dist/src/front/events/__tests__/agentBridge.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/bus.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/types.test.d.ts +1 -0
- package/dist/src/front/events/__tests__/useEvent.test.d.ts +1 -0
- package/dist/src/front/events/agentBridge.d.ts +1 -0
- package/dist/src/front/events/bus.d.ts +21 -0
- package/dist/src/front/events/index.d.ts +7 -0
- package/dist/src/front/events/types.d.ts +137 -0
- package/dist/src/front/events/useEvent.d.ts +7 -0
- package/dist/src/front/fullPage.d.ts +24 -0
- package/dist/src/front/hooks/__tests__/useArtifactPanels.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useArtifactRouting.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useEditorLifecycle.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useKeyboardShortcuts.test.d.ts +1 -0
- package/dist/src/front/hooks/__tests__/useViewportBreakpoint.test.d.ts +1 -0
- package/dist/src/front/hooks/index.d.ts +6 -0
- package/dist/src/front/hooks/useArtifactPanels.d.ts +14 -0
- package/dist/src/front/hooks/useArtifactRouting.d.ts +12 -0
- package/dist/src/front/hooks/useEditorLifecycle.d.ts +27 -0
- package/dist/src/front/hooks/useKeyboardShortcuts.d.ts +13 -0
- package/dist/src/front/hooks/useResponsiveSidebarCollapse.d.ts +6 -0
- package/dist/src/front/hooks/useViewportBreakpoint.d.ts +1 -0
- package/dist/src/front/layout/ChatLayout.d.ts +4 -0
- package/dist/src/front/layout/ChatPaneStage.d.ts +59 -0
- package/dist/src/front/layout/ChatPaneStageDock.d.ts +5 -0
- package/dist/src/front/layout/IdeLayout.d.ts +4 -0
- package/dist/src/front/layout/ResponsiveDockviewShell.d.ts +6 -0
- package/dist/src/front/layout/ThemeToggle.d.ts +10 -0
- package/dist/src/front/layout/TopBar.d.ts +17 -0
- package/dist/src/front/layout/__tests__/ChatPaneStageDock.test.d.ts +1 -0
- package/dist/src/front/layout/__tests__/TopBar.test.d.ts +1 -0
- package/dist/src/front/layout/__tests__/presets.test.d.ts +1 -0
- package/dist/src/front/layout/cornerChrome.d.ts +10 -0
- package/dist/src/front/layout/index.d.ts +9 -0
- package/dist/src/front/layout/mobileShell.d.ts +18 -0
- package/dist/src/front/layout/paneCollapseButton.d.ts +15 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftOverlayChromeContext.d.ts +1 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPane.d.ts +75 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneActions.d.ts +13 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneHeader.d.ts +7 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneProjects.d.ts +18 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneSections.d.ts +6 -0
- package/dist/src/front/layout/plugin-tabs/AppLeftPaneSessionRow.d.ts +18 -0
- package/dist/src/front/layout/plugin-tabs/PluginTabsWorkspaceShell.d.ts +15 -0
- package/dist/src/front/layout/plugin-tabs/__tests__/AppLeftPane.test.d.ts +1 -0
- package/dist/src/front/layout/types.d.ts +40 -0
- package/dist/src/front/layout/useViewportWidth.d.ts +1 -0
- package/dist/src/front/lib/utils.d.ts +2 -0
- package/dist/src/front/lib/utils.test.d.ts +1 -0
- package/dist/src/front/lib/validation.d.ts +189 -0
- package/dist/src/front/plugin/PluginErrorBoundary.d.ts +21 -0
- package/dist/src/front/plugin/PluginErrorContext.d.ts +19 -0
- package/dist/src/front/plugin/PluginInspector.d.ts +8 -0
- package/dist/src/front/plugin/__tests__/CatalogRegistry.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/PluginErrorBoundary.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/PluginInspector.test.d.ts +1 -0
- package/dist/src/front/plugin/__tests__/useWorkspacePluginClient.test.d.ts +1 -0
- package/dist/src/front/plugin/index.d.ts +10 -0
- package/dist/src/front/plugin/useActivePanels.d.ts +2 -0
- package/dist/src/front/plugin/useCatalogs.d.ts +2 -0
- package/dist/src/front/plugin/useCommands.d.ts +2 -0
- package/dist/src/front/plugin/useWorkspacePluginClient.d.ts +29 -0
- package/dist/src/front/provider/WorkspaceProvider.d.ts +84 -0
- package/dist/src/front/provider/index.d.ts +9 -0
- package/dist/src/front/provider/workspaceTitle.d.ts +5 -0
- package/dist/src/front/registry/PanelRegistry.d.ts +39 -0
- package/dist/src/front/registry/PanelRenderStatusBoundary.d.ts +38 -0
- package/dist/src/front/registry/RegistryProvider.d.ts +21 -0
- package/dist/src/front/registry/WorkspaceSourceRegistry.d.ts +25 -0
- package/dist/src/front/registry/__tests__/registry.test.d.ts +1 -0
- package/dist/src/front/registry/__tests__/replaceByPluginId.test.d.ts +1 -0
- package/dist/src/front/registry/__tests__/subscribe.test.d.ts +1 -0
- package/dist/src/front/registry/coreRegistrations.d.ts +2 -0
- package/dist/src/front/registry/getFileIcon.d.ts +2 -0
- package/dist/src/front/registry/index.d.ts +7 -0
- package/dist/src/front/registry/types.d.ts +2 -0
- package/dist/src/front/shell/WorkspaceShellCapabilitiesContext.d.ts +1 -0
- package/dist/src/front/store/__tests__/store.property.test.d.ts +1 -0
- package/dist/src/front/store/__tests__/store.test.d.ts +1 -0
- package/dist/src/front/store/index.d.ts +35 -0
- package/dist/src/front/store/localStorageValues.d.ts +4 -0
- package/dist/src/front/store/selectors.d.ts +21 -0
- package/dist/src/front/store/types.d.ts +53 -0
- package/dist/src/front/testing/TestWorkspaceProvider.d.ts +13 -0
- package/dist/src/front/testing/__tests__/testing.test.d.ts +1 -0
- package/dist/src/front/testing/createLocalStorageSessions.d.ts +16 -0
- package/dist/src/front/testing/createMockBridge.d.ts +20 -0
- package/dist/src/front/testing/createMockPaneProps.d.ts +11 -0
- package/dist/src/front/testing/createMockRegistry.d.ts +7 -0
- package/dist/src/front/testing/createMockSessions.d.ts +24 -0
- package/dist/src/front/testing/e2e.d.ts +61 -0
- package/dist/src/front/testing/index.d.ts +17 -0
- package/dist/src/front/testing/mockApi.d.ts +9 -0
- package/dist/src/front/testing/renderPane.d.ts +20 -0
- package/dist/src/front/theme/codemirror-theme.d.ts +4 -0
- package/dist/src/front/theme/index.d.ts +1 -0
- package/dist/src/front/toast/__tests__/toast.test.d.ts +1 -0
- package/dist/src/front/toast/index.d.ts +1 -0
- package/dist/src/index.d.ts +90 -0
- package/dist/src/plugin.d.ts +19 -0
- package/dist/src/plugins/filesystemPlugin/front/ConflictBanner.d.ts +14 -0
- package/dist/src/plugins/filesystemPlugin/front/FilePaneShell.d.ts +73 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/agentFileBridge.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/filePanelBinding.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/filesystemPlugin.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/search.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/__tests__/useFilePane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/agentFileBridge.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/front/catalogs.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/CodeEditor.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/CodeEditorPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/__tests__/CodeEditor.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/code-editor/__tests__/CodeEditorPane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/DataProvider.d.ts +16 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fetchClient.integration.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fetchClient.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/fileRecords.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/hooks.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileEventInvalidation.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileEventStream.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/__tests__/useFileUpload.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/data/fetchClient.d.ts +63 -0
- package/dist/src/plugins/filesystemPlugin/front/data/fileRecords.d.ts +34 -0
- package/dist/src/plugins/filesystemPlugin/front/data/filesystemErrorRedaction.d.ts +2 -0
- package/dist/src/plugins/filesystemPlugin/front/data/hooks.d.ts +48 -0
- package/dist/src/plugins/filesystemPlugin/front/data/index.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/data/treePreloadCache.d.ts +3 -0
- package/dist/src/plugins/filesystemPlugin/front/data/types.d.ts +37 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileEventInvalidation.d.ts +28 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileEventStream.d.ts +27 -0
- package/dist/src/plugins/filesystemPlugin/front/data/useFileUpload.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/front/empty-file-panel/EmptyFilePanel.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/empty-file-panel/definition.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/events.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/FileTree.d.ts +59 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/FileTreeView.d.ts +83 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/FileTree.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/FileTreePane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/__tests__/copyToClipboard.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/clipboard.d.ts +6 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/dndManager.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/file-tree/treeModel.d.ts +20 -0
- package/dist/src/plugins/filesystemPlugin/front/filePanelBinding.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewer.d.ts +18 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewer.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/html-viewer/HtmlViewerPane.d.ts +7 -0
- package/dist/src/plugins/filesystemPlugin/front/index.d.ts +11 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/MarkdownEditor.d.ts +44 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/MarkdownEditorPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/ResizableImage.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/__tests__/MarkdownEditor.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/markdown-editor/__tests__/MarkdownEditorPane.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewer.d.ts +9 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewer.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/MediaViewerPane.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/useMediaViewerReload.d.ts +8 -0
- package/dist/src/plugins/filesystemPlugin/front/media-viewer/useMediaViewerReload.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/search.d.ts +5 -0
- package/dist/src/plugins/filesystemPlugin/front/search.test.d.ts +1 -0
- package/dist/src/plugins/filesystemPlugin/front/surfaceResolver.d.ts +10 -0
- package/dist/src/plugins/filesystemPlugin/front/useFilePane.d.ts +61 -0
- package/dist/src/plugins/filesystemPlugin/shared/constants.d.ts +12 -0
- package/dist/src/plugins/filesystemPlugin/shared/events.d.ts +39 -0
- package/dist/src/shared/__tests__/filesystem.test.d.ts +1 -0
- package/dist/src/shared/__tests__/telemetry.test.d.ts +1 -0
- package/dist/src/shared/__tests__/workspaceBridgeRpc.test.d.ts +1 -0
- package/dist/src/shared/index.d.ts +25 -0
- package/dist/src/shared/plugins/CatalogRegistry.d.ts +28 -0
- package/dist/src/shared/plugins/CommandRegistry.d.ts +23 -0
- package/dist/src/shared/plugins/SurfaceResolverRegistry.d.ts +24 -0
- package/dist/src/shared/plugins/__tests__/bootstrap.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/frontFactory.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/manifest.test.d.ts +1 -0
- package/dist/src/shared/plugins/__tests__/uiBridgeRegistry.test.d.ts +1 -0
- package/dist/src/shared/plugins/appLeftOverlayChrome.d.ts +10 -0
- package/dist/src/shared/plugins/bootstrap.d.ts +41 -0
- package/dist/src/shared/plugins/errors.d.ts +5 -0
- package/dist/src/shared/plugins/frontFactory.d.ts +166 -0
- package/dist/src/shared/plugins/index.d.ts +5 -0
- package/dist/src/shared/plugins/manifest.d.ts +58 -0
- package/dist/src/shared/plugins/runtimePluginTypes.d.ts +51 -0
- package/dist/src/shared/plugins/types.d.ts +84 -0
- package/dist/src/shared/plugins/uiBridgeRegistry.d.ts +44 -0
- package/dist/src/shared/plugins/workspaceShellCapabilities.d.ts +44 -0
- package/dist/src/shared/telemetry.d.ts +11 -0
- package/dist/src/shared/types/agent-tool.d.ts +30 -0
- package/dist/src/shared/types/boring-core-front.d.ts +2 -0
- package/dist/src/shared/types/filesystem.d.ts +15 -0
- package/dist/src/shared/types/panel.d.ts +123 -0
- package/dist/src/shared/types/surface.d.ts +42 -0
- package/dist/src/shared/ui-bridge.d.ts +77 -0
- package/dist/src/shared/workspace-bridge-rpc.d.ts +122 -0
- package/dist/{surface-aLQ_Hryw.d.ts → surface-h6IgrsK5.d.ts} +1 -1
- package/dist/testing-e2e.d.ts +2 -73
- package/dist/testing.d.ts +2 -433
- package/dist/testing.js +11 -11
- package/dist/{ui-bridge-D2eO3epD.d.ts → ui-bridge-C4CyIrQA.d.ts} +1 -1
- package/dist/{workspace-bridge-rpc-A98RA5o6.d.ts → workspace-bridge-rpc-BHsOJMlW.d.ts} +1 -1
- package/dist/workspace.css +21 -0
- package/dist/workspace.d.ts +2 -2649
- package/dist/workspace.js +40 -40
- package/package.json +5 -5
package/dist/app-front.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
4
|
-
import { createElement as Te, useCallback as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { ChevronRight as Oe, Clock3 as ke, ExternalLink as Ae, FileText as je, Maximize2 as Me, MessageSquare as Ne, MessageSquarePlus as
|
|
7
|
-
import { DropdownMenu as Je, DropdownMenuContent as Ye, DropdownMenuItem as Xe, DropdownMenuSeparator as
|
|
8
|
-
import { PiChatPanel as
|
|
1
|
+
import { B as e, C as t, E as n, F as r, G as i, H as a, I as o, Kt as s, L as c, Lt as l, M as u, N as d, P as f, Q as p, R as m, Rt as h, S as g, Sn as _, T as ee, V as v, an as y, c as te, cn as ne, g as re, hn as ie, j as ae, kt as oe, m as se, mn as ce, n as le, on as ue, r as de, x as fe, xn as pe, z as me } from "./WorkspaceProvider-DcOiZU24.js";
|
|
2
|
+
import { t as b } from "./utils-BRcxFdrz.js";
|
|
3
|
+
import { a as he, c as ge, f as _e, l as ve, n as ye, o as be, r as xe, s as Se, t as Ce, u as we } from "./WorkspaceLoadingState-TgOWTNJC.js";
|
|
4
|
+
import { createElement as Te, useCallback as x, useEffect as S, useLayoutEffect as Ee, useMemo as C, useRef as w, useState as T, useSyncExternalStore as De } from "react";
|
|
5
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronRight as Oe, Clock3 as ke, ExternalLink as Ae, FileText as je, Maximize2 as Me, MessageSquare as Ne, MessageSquarePlus as k, Moon as Pe, MoreHorizontal as Fe, PanelLeftClose as Ie, PanelLeftOpen as Le, Pin as Re, PinOff as ze, Plug as Be, Plus as Ve, RefreshCw as He, Search as Ue, Settings as We, Sparkles as Ge, Sun as Ke, X as qe } from "lucide-react";
|
|
7
|
+
import { DropdownMenu as Je, DropdownMenuContent as Ye, DropdownMenuItem as Xe, DropdownMenuSeparator as A, DropdownMenuTrigger as j, ErrorState as Ze, IconButton as Qe } from "@hachej/boring-ui-kit";
|
|
8
|
+
import { PiChatPanel as $e, searchPiSessions as et, usePiSessions as tt } from "@hachej/boring-agent/front";
|
|
9
9
|
//#region src/front/layout/ThemeToggle.tsx
|
|
10
|
-
function
|
|
11
|
-
let { theme: e, toggleTheme: t } =
|
|
12
|
-
return
|
|
10
|
+
function nt() {
|
|
11
|
+
let { theme: e, toggleTheme: t } = de(), n = e === "dark";
|
|
12
|
+
return S(() => {
|
|
13
13
|
typeof document > "u" || document.documentElement.classList.toggle("dark", n);
|
|
14
|
-
}, [n]), /* @__PURE__ */
|
|
14
|
+
}, [n]), /* @__PURE__ */ D(Qe, {
|
|
15
15
|
type: "button",
|
|
16
16
|
variant: "ghost",
|
|
17
17
|
size: "icon-sm",
|
|
18
18
|
onClick: t,
|
|
19
19
|
"aria-label": "Toggle theme",
|
|
20
20
|
title: n ? "Switch to light theme" : "Switch to dark theme",
|
|
21
|
-
children:
|
|
21
|
+
children: D(n ? Ke : Pe, { className: "h-4 w-4" })
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/front/chrome/management/ManagementOverlaySurface.tsx
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
function rt({ part: e, icon: t, title: n, description: r, actions: i, headerInsetStart: a = !1, headerInsetEnd: o = !1, children: s }) {
|
|
27
|
+
return /* @__PURE__ */ O("div", {
|
|
28
28
|
"data-boring-workspace-part": e,
|
|
29
29
|
className: "flex h-full min-h-0 flex-col bg-background",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
className:
|
|
32
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ O("header", {
|
|
31
|
+
className: b("flex h-12 shrink-0 items-center justify-between border-b border-border/60", a ? "pl-12" : "pl-4", o ? "pr-16" : "pr-4"),
|
|
32
|
+
children: [/* @__PURE__ */ O("div", {
|
|
33
33
|
className: "flex min-w-0 items-center gap-2",
|
|
34
|
-
children: [t, /* @__PURE__ */
|
|
34
|
+
children: [t, /* @__PURE__ */ O("div", {
|
|
35
35
|
className: "min-w-0",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
37
37
|
className: "truncate text-sm font-semibold tracking-tight text-foreground",
|
|
38
38
|
children: n
|
|
39
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ D("p", {
|
|
40
40
|
className: "truncate text-xs text-muted-foreground",
|
|
41
41
|
children: r
|
|
42
42
|
})]
|
|
43
43
|
})]
|
|
44
|
-
}), i ? /* @__PURE__ */
|
|
44
|
+
}), i ? /* @__PURE__ */ D("div", {
|
|
45
45
|
className: "flex shrink-0 items-center gap-0.5",
|
|
46
46
|
children: i
|
|
47
47
|
}) : null]
|
|
@@ -50,19 +50,19 @@ function it({ part: e, icon: t, title: n, description: r, actions: i, headerInse
|
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/front/chrome/skills/SkillsPage.tsx
|
|
53
|
-
function
|
|
54
|
-
let r =
|
|
53
|
+
function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
54
|
+
let r = y(), [i, a] = T({
|
|
55
55
|
status: "loading",
|
|
56
56
|
skills: []
|
|
57
|
-
}), o =
|
|
58
|
-
e.filePath &&
|
|
57
|
+
}), o = x((e) => {
|
|
58
|
+
e.filePath && h({
|
|
59
59
|
kind: "openFile",
|
|
60
60
|
params: {
|
|
61
61
|
path: e.filePath,
|
|
62
62
|
mode: "view"
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
}, []),
|
|
65
|
+
}, []), s = x(async (e = !1) => {
|
|
66
66
|
a((e) => ({
|
|
67
67
|
status: "loading",
|
|
68
68
|
skills: e.skills
|
|
@@ -81,38 +81,38 @@ function at({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
83
83
|
}, [r]);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
let
|
|
88
|
-
return /* @__PURE__ */
|
|
84
|
+
S(() => {
|
|
85
|
+
s(!1);
|
|
86
|
+
}, [s]);
|
|
87
|
+
let c = C(() => [...i.skills].sort((e, t) => e.name.localeCompare(t.name)), [i.skills]);
|
|
88
|
+
return /* @__PURE__ */ D(rt, {
|
|
89
89
|
part: "skills-page",
|
|
90
90
|
title: "Skills",
|
|
91
91
|
description: "Workspace skills available to slash commands",
|
|
92
92
|
headerInsetStart: t,
|
|
93
93
|
headerInsetEnd: n,
|
|
94
|
-
icon: /* @__PURE__ */
|
|
94
|
+
icon: /* @__PURE__ */ D("span", {
|
|
95
95
|
className: "grid size-7 place-items-center rounded-lg bg-[color:oklch(from_var(--accent)_l_c_h/0.12)] text-[color:var(--accent)]",
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ D(Ge, {
|
|
97
97
|
className: "h-4 w-4",
|
|
98
98
|
strokeWidth: 1.75,
|
|
99
99
|
"aria-hidden": "true"
|
|
100
100
|
})
|
|
101
101
|
}),
|
|
102
|
-
actions: /* @__PURE__ */
|
|
102
|
+
actions: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(Qe, {
|
|
103
103
|
type: "button",
|
|
104
104
|
variant: "ghost",
|
|
105
105
|
size: "icon-xs",
|
|
106
|
-
onClick: () => void
|
|
106
|
+
onClick: () => void s(!0),
|
|
107
107
|
disabled: i.status === "loading",
|
|
108
108
|
"aria-label": "Refresh skills",
|
|
109
109
|
title: "Refresh skills",
|
|
110
110
|
className: "text-muted-foreground hover:text-foreground",
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
className:
|
|
111
|
+
children: /* @__PURE__ */ D(He, {
|
|
112
|
+
className: b("size-3", i.status === "loading" && "animate-spin"),
|
|
113
113
|
strokeWidth: 1.75
|
|
114
114
|
})
|
|
115
|
-
}), e ? /* @__PURE__ */
|
|
115
|
+
}), e ? /* @__PURE__ */ D(Qe, {
|
|
116
116
|
type: "button",
|
|
117
117
|
variant: "ghost",
|
|
118
118
|
size: "icon-xs",
|
|
@@ -120,52 +120,52 @@ function at({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
120
120
|
"aria-label": "Close skills",
|
|
121
121
|
title: "Close",
|
|
122
122
|
className: "text-muted-foreground hover:text-foreground",
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ D(qe, {
|
|
124
124
|
className: "size-3",
|
|
125
125
|
strokeWidth: 1.75
|
|
126
126
|
})
|
|
127
127
|
}) : null] }),
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ O("div", {
|
|
129
129
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto p-4",
|
|
130
130
|
"aria-live": "polite",
|
|
131
|
-
children: [i.status === "error" ? /* @__PURE__ */
|
|
131
|
+
children: [i.status === "error" ? /* @__PURE__ */ D("div", {
|
|
132
132
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/8 px-3 py-2 text-sm text-destructive",
|
|
133
133
|
children: i.error
|
|
134
|
-
}) : null, i.status === "loading" &&
|
|
134
|
+
}) : null, i.status === "loading" && c.length === 0 ? /* @__PURE__ */ D("div", {
|
|
135
135
|
className: "flex h-full min-h-[180px] items-center justify-center text-sm text-muted-foreground",
|
|
136
136
|
children: "Loading skills…"
|
|
137
|
-
}) :
|
|
137
|
+
}) : c.length === 0 ? /* @__PURE__ */ D("div", {
|
|
138
138
|
className: "flex h-full min-h-[180px] items-center justify-center text-center text-sm text-muted-foreground",
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("div", {
|
|
140
140
|
className: "font-medium text-foreground/80",
|
|
141
141
|
children: "No skills found"
|
|
142
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ D("p", {
|
|
143
143
|
className: "mt-1 max-w-xs",
|
|
144
144
|
children: "Reload plugins or add workspace skills to make them available in chat."
|
|
145
145
|
})] })
|
|
146
|
-
}) : /* @__PURE__ */
|
|
146
|
+
}) : /* @__PURE__ */ D("ul", {
|
|
147
147
|
role: "list",
|
|
148
148
|
className: "grid gap-2",
|
|
149
|
-
children:
|
|
149
|
+
children: c.map((e) => /* @__PURE__ */ D("li", {
|
|
150
150
|
className: "rounded-xl border border-border/60 bg-card/70 px-3 py-2.5 cursor-pointer transition-colors hover:border-border hover:bg-muted/60",
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ D("button", {
|
|
152
152
|
type: "button",
|
|
153
153
|
onClick: () => o(e),
|
|
154
154
|
title: "Open skill",
|
|
155
155
|
"aria-label": `Open skill ${e.name} in workspace`,
|
|
156
156
|
className: "block w-full text-left",
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ O("div", {
|
|
158
158
|
className: "flex items-start justify-between gap-3",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ O("div", {
|
|
160
160
|
className: "min-w-0",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ O("div", {
|
|
162
162
|
className: "truncate text-sm font-medium text-foreground",
|
|
163
163
|
children: ["/", e.name]
|
|
164
|
-
}), e.description ? /* @__PURE__ */
|
|
164
|
+
}), e.description ? /* @__PURE__ */ D("p", {
|
|
165
165
|
className: "mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
166
166
|
children: e.description
|
|
167
167
|
}) : null]
|
|
168
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ D(je, {
|
|
169
169
|
className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground",
|
|
170
170
|
strokeWidth: 1.75,
|
|
171
171
|
"aria-hidden": "true"
|
|
@@ -179,48 +179,48 @@ function at({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/front/detached/useDetachedPanelPosition.ts
|
|
182
|
-
var
|
|
182
|
+
var at = {
|
|
183
183
|
width: 520,
|
|
184
184
|
height: 720
|
|
185
|
-
},
|
|
186
|
-
function
|
|
185
|
+
}, ot = 16;
|
|
186
|
+
function st(e, t, n) {
|
|
187
187
|
return Math.max(t, Math.min(n, e));
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function ct(e, t) {
|
|
190
190
|
if (typeof window > "u") return e;
|
|
191
|
-
let n = Math.max(
|
|
191
|
+
let n = Math.max(ot, window.innerWidth - t.width - ot), r = Math.max(ot, window.innerHeight - t.height - ot);
|
|
192
192
|
return {
|
|
193
|
-
left:
|
|
194
|
-
top:
|
|
193
|
+
left: st(e.left, ot, n),
|
|
194
|
+
top: st(e.top, ot, r)
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function lt(e, t = {}) {
|
|
198
198
|
let n = {
|
|
199
|
-
...
|
|
199
|
+
...at,
|
|
200
200
|
...t
|
|
201
|
-
}, [r, i] =
|
|
201
|
+
}, [r, i] = T(() => ct(e, n)), a = w(null), o = x(() => {
|
|
202
202
|
a.current && (a.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
203
|
-
}, []), s =
|
|
203
|
+
}, []), s = x((e) => {
|
|
204
204
|
let t = a.current;
|
|
205
205
|
if (!t) return;
|
|
206
206
|
let r = e.clientX - t.x, o = e.clientY - t.y;
|
|
207
207
|
a.current = {
|
|
208
208
|
x: e.clientX,
|
|
209
209
|
y: e.clientY
|
|
210
|
-
}, i((e) =>
|
|
210
|
+
}, i((e) => ct({
|
|
211
211
|
left: e.left + r,
|
|
212
212
|
top: e.top + o
|
|
213
213
|
}, n));
|
|
214
|
-
}, [n.height, n.width]), c =
|
|
214
|
+
}, [n.height, n.width]), c = x((e) => {
|
|
215
215
|
e.target?.closest("button,a,input,textarea,select") || (a.current = {
|
|
216
216
|
x: e.clientX,
|
|
217
217
|
y: e.clientY
|
|
218
218
|
}, document.body.style.cursor = "grabbing", document.body.style.userSelect = "none");
|
|
219
219
|
}, []);
|
|
220
|
-
return
|
|
220
|
+
return S(() => (window.addEventListener("pointermove", s), window.addEventListener("pointerup", o), () => {
|
|
221
221
|
window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", o), o();
|
|
222
|
-
}), [s, o]),
|
|
223
|
-
i((e) =>
|
|
222
|
+
}), [s, o]), S(() => {
|
|
223
|
+
i((e) => ct(e, n));
|
|
224
224
|
}, [n.height, n.width]), {
|
|
225
225
|
position: r,
|
|
226
226
|
size: n,
|
|
@@ -229,9 +229,9 @@ function ut(e, t = {}) {
|
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/front/detached/DetachedPanelPopover.tsx
|
|
232
|
-
function
|
|
233
|
-
let { position: u, size: d, startDrag: f } =
|
|
234
|
-
return /* @__PURE__ */
|
|
232
|
+
function ut({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaLabel: a, onClose: o, onDock: s, children: c, footer: l }) {
|
|
233
|
+
let { position: u, size: d, startDrag: f } = lt(r, i);
|
|
234
|
+
return /* @__PURE__ */ O("div", {
|
|
235
235
|
"data-boring-workspace-part": "detached-panel-popover",
|
|
236
236
|
className: "absolute z-[90] flex max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-2xl border border-border/70 bg-background shadow-2xl",
|
|
237
237
|
style: {
|
|
@@ -243,54 +243,54 @@ function dt({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaL
|
|
|
243
243
|
role: "dialog",
|
|
244
244
|
"aria-label": a,
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ O("div", {
|
|
247
247
|
className: "flex h-11 shrink-0 cursor-grab items-center justify-between border-b border-border/60 bg-[color:oklch(from_var(--background)_calc(l-0.01)_c_h)] px-3 active:cursor-grabbing",
|
|
248
248
|
onPointerDown: f,
|
|
249
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ O("div", {
|
|
250
250
|
className: "flex min-w-0 items-center gap-2",
|
|
251
|
-
children: [n ? /* @__PURE__ */
|
|
251
|
+
children: [n ? /* @__PURE__ */ D("span", {
|
|
252
252
|
className: "grid size-7 place-items-center rounded-lg bg-[color:oklch(from_var(--accent)_l_c_h/0.14)] text-[color:var(--accent)]",
|
|
253
253
|
children: n
|
|
254
|
-
}) : null, /* @__PURE__ */
|
|
254
|
+
}) : null, /* @__PURE__ */ O("div", {
|
|
255
255
|
className: "min-w-0",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ D("div", {
|
|
257
257
|
className: "truncate text-sm font-semibold tracking-tight text-foreground",
|
|
258
258
|
children: e
|
|
259
|
-
}), t ? /* @__PURE__ */
|
|
259
|
+
}), t ? /* @__PURE__ */ D("div", {
|
|
260
260
|
className: "truncate text-[11px] text-muted-foreground",
|
|
261
261
|
children: t
|
|
262
262
|
}) : null]
|
|
263
263
|
})]
|
|
264
|
-
}), /* @__PURE__ */
|
|
264
|
+
}), /* @__PURE__ */ O("div", {
|
|
265
265
|
className: "flex shrink-0 items-center gap-1",
|
|
266
|
-
children: [s ? /* @__PURE__ */
|
|
266
|
+
children: [s ? /* @__PURE__ */ D("button", {
|
|
267
267
|
type: "button",
|
|
268
268
|
"aria-label": "Dock panel",
|
|
269
269
|
title: "Dock",
|
|
270
|
-
className:
|
|
270
|
+
className: b("grid size-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"),
|
|
271
271
|
onClick: s,
|
|
272
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ D(Me, {
|
|
273
273
|
className: "size-3.5",
|
|
274
274
|
strokeWidth: 1.75
|
|
275
275
|
})
|
|
276
|
-
}) : null, /* @__PURE__ */
|
|
276
|
+
}) : null, /* @__PURE__ */ D("button", {
|
|
277
277
|
type: "button",
|
|
278
278
|
"aria-label": "Close panel",
|
|
279
279
|
title: "Close",
|
|
280
280
|
className: "grid size-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
281
281
|
onClick: o,
|
|
282
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ D(qe, {
|
|
283
283
|
className: "size-3.5",
|
|
284
284
|
strokeWidth: 1.75
|
|
285
285
|
})
|
|
286
286
|
})]
|
|
287
287
|
})]
|
|
288
288
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ D("div", {
|
|
290
290
|
className: "min-h-0 flex-1",
|
|
291
291
|
children: c
|
|
292
292
|
}),
|
|
293
|
-
l ? /* @__PURE__ */
|
|
293
|
+
l ? /* @__PURE__ */ D("div", {
|
|
294
294
|
className: "shrink-0 border-t border-border/60",
|
|
295
295
|
children: l
|
|
296
296
|
}) : null
|
|
@@ -299,7 +299,7 @@ function dt({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaL
|
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/front/chrome/chat/DetachedChatPopover.tsx
|
|
302
|
-
var
|
|
302
|
+
var dt = {
|
|
303
303
|
id: "detached-chat-read-only",
|
|
304
304
|
reason: "detached-chat.read-only",
|
|
305
305
|
label: "Dock this chat to reply.",
|
|
@@ -310,56 +310,56 @@ var ft = {
|
|
|
310
310
|
priority: -10
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
function
|
|
314
|
-
let
|
|
315
|
-
...
|
|
316
|
-
composerBlockers: [
|
|
313
|
+
function ft({ sessionId: e, title: n, chatParams: r, initialPosition: i, onClose: a, onDock: o, composingEnabled: s = !1 }) {
|
|
314
|
+
let c = s ? r : {
|
|
315
|
+
...r,
|
|
316
|
+
composerBlockers: [dt, ...r.composerBlockers ?? []]
|
|
317
317
|
};
|
|
318
|
-
return /* @__PURE__ */
|
|
319
|
-
title:
|
|
320
|
-
subtitle:
|
|
321
|
-
icon: /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ D(ut, {
|
|
319
|
+
title: n,
|
|
320
|
+
subtitle: s ? "Detached chat" : "Detached chat · dock to reply",
|
|
321
|
+
icon: /* @__PURE__ */ D(Ne, {
|
|
322
322
|
className: "size-4",
|
|
323
323
|
strokeWidth: 1.75,
|
|
324
324
|
"aria-hidden": "true"
|
|
325
325
|
}),
|
|
326
|
-
ariaLabel: `Chat session ${
|
|
327
|
-
initialPosition:
|
|
326
|
+
ariaLabel: `Chat session ${n || e}`,
|
|
327
|
+
initialPosition: i,
|
|
328
328
|
size: {
|
|
329
329
|
width: 520,
|
|
330
330
|
height: 720
|
|
331
331
|
},
|
|
332
|
-
onClose:
|
|
333
|
-
onDock:
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
...
|
|
332
|
+
onClose: a,
|
|
333
|
+
onDock: o,
|
|
334
|
+
children: /* @__PURE__ */ D(t, {
|
|
335
|
+
...c,
|
|
336
336
|
sessionId: e
|
|
337
337
|
}, e)
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region src/app/front/useWorkspaceShellCapabilitiesController.ts
|
|
342
|
-
function
|
|
342
|
+
function pt(e, t) {
|
|
343
343
|
return `${e}.${t.replace(/[^A-Za-z0-9_.:-]/g, "_").slice(0, 96) || "item"}`;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
return
|
|
347
|
-
openArtifact: (e,
|
|
345
|
+
function mt({ setFloatingChatSessionId: e, openChatPane: t, surfaceDispatch: n }) {
|
|
346
|
+
return C(() => ({
|
|
347
|
+
openArtifact: (e, r) => e ? e.type === "panel" ? (s({
|
|
348
348
|
kind: "openPanel",
|
|
349
349
|
params: {
|
|
350
|
-
id:
|
|
350
|
+
id: pt(e.panelComponentId, r?.instanceId ?? e.panelComponentId),
|
|
351
351
|
component: e.panelComponentId,
|
|
352
|
-
title:
|
|
352
|
+
title: r?.title ?? e.panelComponentId,
|
|
353
353
|
params: e.params
|
|
354
354
|
}
|
|
355
|
-
}, n), { success: !0 }) : e.target ? (
|
|
355
|
+
}, n), { success: !0 }) : e.target ? (r?.sessionId && t(r.sessionId), s({
|
|
356
356
|
kind: "openSurface",
|
|
357
357
|
params: {
|
|
358
358
|
kind: e.surfaceKind,
|
|
359
359
|
target: e.target,
|
|
360
360
|
meta: {
|
|
361
361
|
...e.params ?? {},
|
|
362
|
-
...
|
|
362
|
+
...r?.sessionId ? { sessionId: r.sessionId } : {}
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}, n), { success: !0 }) : {
|
|
@@ -384,18 +384,18 @@ function ht({ setFloatingChatSessionId: e, openChatPane: t, surfaceDispatch: n }
|
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
386
|
//#region src/app/front/WorkspaceShellCapabilitiesHost.tsx
|
|
387
|
-
function
|
|
388
|
-
let [l, u] =
|
|
389
|
-
|
|
387
|
+
function ht({ appLeftPaneCollapsed: e, workspaceId: t, effectiveAppLeftPaneWidth: n, sessionTitleById: r, defaultSessionTitle: i, makeCenterParams: a, openChatPane: o, surfaceDispatch: s, onDockOverlay: c }) {
|
|
388
|
+
let [l, u] = T(null);
|
|
389
|
+
S(() => {
|
|
390
390
|
u(null);
|
|
391
391
|
}, [t]);
|
|
392
|
-
let d =
|
|
392
|
+
let d = mt({
|
|
393
393
|
setFloatingChatSessionId: u,
|
|
394
394
|
openChatPane: o,
|
|
395
395
|
surfaceDispatch: s
|
|
396
396
|
}), f = l ? r.get(l) ?? (l === "default" ? i : l) : null, p = l ? a(l, { bridgeEnabled: !1 }) : null;
|
|
397
397
|
return {
|
|
398
|
-
floatingChatNode: l && p ? /* @__PURE__ */
|
|
398
|
+
floatingChatNode: l && p ? /* @__PURE__ */ D(ft, {
|
|
399
399
|
sessionId: l,
|
|
400
400
|
title: f ?? l,
|
|
401
401
|
chatParams: p,
|
|
@@ -414,24 +414,24 @@ function gt({ appLeftPaneCollapsed: e, workspaceId: t, effectiveAppLeftPaneWidth
|
|
|
414
414
|
}
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/front/chrome/plugins/PluginsOverlay.tsx
|
|
417
|
-
function
|
|
417
|
+
function gt(e) {
|
|
418
418
|
return e.boring?.label || e.boring?.id || e.id;
|
|
419
419
|
}
|
|
420
420
|
function _t(e, t) {
|
|
421
421
|
let n = e.filter((e) => e.id !== t.id);
|
|
422
|
-
return n.push(t), n.sort((e, t) =>
|
|
422
|
+
return n.push(t), n.sort((e, t) => gt(e).localeCompare(gt(t)));
|
|
423
423
|
}
|
|
424
424
|
function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1, headerInsetEnd: r = !1 }) {
|
|
425
|
-
let i =
|
|
425
|
+
let i = y(), [a, o] = T({
|
|
426
426
|
status: "loading",
|
|
427
427
|
plugins: []
|
|
428
|
-
}), [s, c] =
|
|
428
|
+
}), [s, c] = T(() => /* @__PURE__ */ new Set()), [l, u] = T(!1), [d, f] = T(null), p = x(async () => {
|
|
429
429
|
o((e) => ({
|
|
430
430
|
status: "loading",
|
|
431
431
|
plugins: e.plugins
|
|
432
432
|
}));
|
|
433
433
|
try {
|
|
434
|
-
let e = await i.getJson("/api/v1/agent-plugins?external=1", { missingMessage: "Failed to load external plugins." }), t = Array.isArray(e) ? [...e].sort((e, t) =>
|
|
434
|
+
let e = await i.getJson("/api/v1/agent-plugins?external=1", { missingMessage: "Failed to load external plugins." }), t = Array.isArray(e) ? [...e].sort((e, t) => gt(e).localeCompare(gt(t))) : [];
|
|
435
435
|
o({
|
|
436
436
|
status: "ready",
|
|
437
437
|
plugins: t
|
|
@@ -452,9 +452,9 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
452
452
|
}));
|
|
453
453
|
}
|
|
454
454
|
}, [i]);
|
|
455
|
-
|
|
455
|
+
S(() => {
|
|
456
456
|
p();
|
|
457
|
-
}, [p]),
|
|
457
|
+
}, [p]), S(() => {
|
|
458
458
|
let e = (e) => {
|
|
459
459
|
let t = e.detail;
|
|
460
460
|
if (!(!t || typeof t != "object")) switch (t.type) {
|
|
@@ -497,9 +497,9 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
497
497
|
break;
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
|
-
return window.addEventListener(
|
|
500
|
+
return window.addEventListener(te, e), () => window.removeEventListener(te, e);
|
|
501
501
|
}, [p]);
|
|
502
|
-
let m =
|
|
502
|
+
let m = C(() => [...a.plugins].sort((e, t) => gt(e).localeCompare(gt(t))), [a.plugins]), h = x(async () => {
|
|
503
503
|
u(!0), f(null);
|
|
504
504
|
try {
|
|
505
505
|
let e = t ? await t() : void 0;
|
|
@@ -510,21 +510,21 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
510
510
|
u(!1);
|
|
511
511
|
}
|
|
512
512
|
}, [p, t]);
|
|
513
|
-
return /* @__PURE__ */
|
|
513
|
+
return /* @__PURE__ */ D(rt, {
|
|
514
514
|
part: "plugins-overlay",
|
|
515
515
|
title: "Plugins",
|
|
516
516
|
description: "External plugins loaded for this workspace",
|
|
517
517
|
headerInsetStart: n,
|
|
518
518
|
headerInsetEnd: r,
|
|
519
|
-
icon: /* @__PURE__ */
|
|
519
|
+
icon: /* @__PURE__ */ D("span", {
|
|
520
520
|
className: "grid size-7 place-items-center rounded-lg bg-foreground/[0.06] text-muted-foreground",
|
|
521
|
-
children: /* @__PURE__ */
|
|
521
|
+
children: /* @__PURE__ */ D(Be, {
|
|
522
522
|
className: "h-4 w-4",
|
|
523
523
|
strokeWidth: 1.75,
|
|
524
524
|
"aria-hidden": "true"
|
|
525
525
|
})
|
|
526
526
|
}),
|
|
527
|
-
actions: /* @__PURE__ */
|
|
527
|
+
actions: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(Qe, {
|
|
528
528
|
type: "button",
|
|
529
529
|
variant: "ghost",
|
|
530
530
|
size: "icon-xs",
|
|
@@ -533,11 +533,11 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
533
533
|
"aria-label": "Reload plugins",
|
|
534
534
|
title: "Reload plugins",
|
|
535
535
|
className: "text-muted-foreground hover:text-foreground",
|
|
536
|
-
children: /* @__PURE__ */
|
|
537
|
-
className:
|
|
536
|
+
children: /* @__PURE__ */ D(He, {
|
|
537
|
+
className: b("size-3", (l || a.status === "loading") && "animate-spin"),
|
|
538
538
|
strokeWidth: 1.75
|
|
539
539
|
})
|
|
540
|
-
}), /* @__PURE__ */
|
|
540
|
+
}), /* @__PURE__ */ D(Qe, {
|
|
541
541
|
type: "button",
|
|
542
542
|
variant: "ghost",
|
|
543
543
|
size: "icon-xs",
|
|
@@ -545,71 +545,71 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
545
545
|
"aria-label": "Close plugins",
|
|
546
546
|
title: "Close",
|
|
547
547
|
className: "text-muted-foreground hover:text-foreground",
|
|
548
|
-
children: /* @__PURE__ */
|
|
548
|
+
children: /* @__PURE__ */ D(qe, {
|
|
549
549
|
className: "size-3",
|
|
550
550
|
strokeWidth: 1.75
|
|
551
551
|
})
|
|
552
552
|
})] }),
|
|
553
|
-
children: /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ O("div", {
|
|
554
554
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto p-4",
|
|
555
555
|
"aria-live": "polite",
|
|
556
556
|
children: [
|
|
557
|
-
a.status === "error" ? /* @__PURE__ */
|
|
557
|
+
a.status === "error" ? /* @__PURE__ */ D("div", {
|
|
558
558
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/8 px-3 py-2 text-sm text-destructive",
|
|
559
559
|
children: a.error
|
|
560
560
|
}) : null,
|
|
561
|
-
d ? /* @__PURE__ */
|
|
561
|
+
d ? /* @__PURE__ */ D("div", {
|
|
562
562
|
className: "mb-4 rounded-lg border border-border/70 bg-muted/40 px-3 py-2 text-xs text-muted-foreground",
|
|
563
563
|
children: d
|
|
564
564
|
}) : null,
|
|
565
|
-
a.status === "loading" && m.length === 0 ? /* @__PURE__ */
|
|
565
|
+
a.status === "loading" && m.length === 0 ? /* @__PURE__ */ D("div", {
|
|
566
566
|
className: "flex h-full min-h-[180px] items-center justify-center text-sm text-muted-foreground",
|
|
567
567
|
children: "Loading external plugins…"
|
|
568
|
-
}) : m.length === 0 ? /* @__PURE__ */
|
|
568
|
+
}) : m.length === 0 ? /* @__PURE__ */ D("div", {
|
|
569
569
|
className: "flex h-full min-h-[180px] items-center justify-center text-center text-sm text-muted-foreground",
|
|
570
|
-
children: /* @__PURE__ */
|
|
570
|
+
children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("div", {
|
|
571
571
|
className: "font-medium text-foreground/80",
|
|
572
572
|
children: "No external plugins loaded"
|
|
573
|
-
}), /* @__PURE__ */
|
|
573
|
+
}), /* @__PURE__ */ D("p", {
|
|
574
574
|
className: "mt-1 max-w-xs",
|
|
575
575
|
children: "Create or install an external plugin, then reload external plugins."
|
|
576
576
|
})] })
|
|
577
|
-
}) : /* @__PURE__ */
|
|
577
|
+
}) : /* @__PURE__ */ D("ul", {
|
|
578
578
|
role: "list",
|
|
579
579
|
className: "grid gap-2",
|
|
580
580
|
children: m.map((e) => {
|
|
581
581
|
let t = s.has(e.id);
|
|
582
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ O("li", {
|
|
583
583
|
className: "rounded-xl border border-border/60 bg-card/70 px-3 py-2.5",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
584
|
+
children: [/* @__PURE__ */ O("div", {
|
|
585
585
|
className: "flex items-start justify-between gap-3",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ O("div", {
|
|
587
587
|
className: "min-w-0",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
588
|
+
children: [/* @__PURE__ */ D("div", {
|
|
589
589
|
className: "truncate text-sm font-medium text-foreground",
|
|
590
|
-
children:
|
|
591
|
-
}), /* @__PURE__ */
|
|
590
|
+
children: gt(e)
|
|
591
|
+
}), /* @__PURE__ */ D("div", {
|
|
592
592
|
className: "mt-0.5 truncate text-[11px] text-muted-foreground/80",
|
|
593
593
|
children: e.id
|
|
594
594
|
})]
|
|
595
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ O("div", {
|
|
596
596
|
className: "flex shrink-0 items-center gap-1",
|
|
597
597
|
children: [
|
|
598
|
-
t ? /* @__PURE__ */
|
|
598
|
+
t ? /* @__PURE__ */ D("span", {
|
|
599
599
|
className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
600
600
|
children: "loading"
|
|
601
601
|
}) : null,
|
|
602
|
-
e.frontTarget ? /* @__PURE__ */
|
|
602
|
+
e.frontTarget ? /* @__PURE__ */ D("span", {
|
|
603
603
|
className: "rounded bg-foreground/[0.06] px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
604
604
|
children: "front"
|
|
605
605
|
}) : null,
|
|
606
|
-
typeof e.revision == "number" ? /* @__PURE__ */
|
|
606
|
+
typeof e.revision == "number" ? /* @__PURE__ */ O("span", {
|
|
607
607
|
className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
608
608
|
children: ["r", e.revision]
|
|
609
609
|
}) : null
|
|
610
610
|
]
|
|
611
611
|
})]
|
|
612
|
-
}), e.version ? /* @__PURE__ */
|
|
612
|
+
}), e.version ? /* @__PURE__ */ O("div", {
|
|
613
613
|
className: "mt-2 text-xs text-muted-foreground",
|
|
614
614
|
children: ["Version ", e.version]
|
|
615
615
|
}) : null]
|
|
@@ -622,31 +622,31 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
622
622
|
}
|
|
623
623
|
//#endregion
|
|
624
624
|
//#region src/front/layout/plugin-tabs/AppLeftPaneHeader.tsx
|
|
625
|
-
function
|
|
625
|
+
function yt({ appTitle: e, workspaceLabel: t, topSlot: n, showBrand: r = !0 }) {
|
|
626
626
|
let i = e || "Boring UI";
|
|
627
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ O("div", {
|
|
628
628
|
className: "shrink-0 px-2 pb-2 pt-2",
|
|
629
|
-
children: [r ? /* @__PURE__ */
|
|
629
|
+
children: [r ? /* @__PURE__ */ O("div", {
|
|
630
630
|
className: "flex h-8 min-w-0 items-center gap-2 pr-1",
|
|
631
631
|
style: { paddingLeft: "2.5rem" },
|
|
632
|
-
children: [/* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ D("span", {
|
|
633
633
|
"aria-hidden": "true",
|
|
634
634
|
className: "grid size-7 shrink-0 place-items-center rounded-lg bg-foreground text-[12px] font-semibold text-background",
|
|
635
635
|
children: (i[0] ?? "B").toUpperCase()
|
|
636
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ D("span", {
|
|
637
637
|
className: "truncate text-[15px] font-semibold tracking-tight text-foreground",
|
|
638
638
|
"data-boring-workspace-part": "app-left-pane-brand",
|
|
639
639
|
children: i
|
|
640
640
|
})]
|
|
641
|
-
}) : null, n ? /* @__PURE__ */
|
|
641
|
+
}) : null, n ? /* @__PURE__ */ D("div", {
|
|
642
642
|
className: r ? "mt-1 min-w-0" : "min-w-0 pr-1",
|
|
643
643
|
style: r ? void 0 : { paddingLeft: "2.5rem" },
|
|
644
644
|
"data-boring-workspace-part": "app-left-pane-workspace",
|
|
645
645
|
children: n
|
|
646
|
-
}) : t ? /* @__PURE__ */
|
|
646
|
+
}) : t ? /* @__PURE__ */ D("div", {
|
|
647
647
|
className: "mt-0.5 flex min-h-8 items-center gap-2 rounded-md px-2 text-[13px] text-foreground/72",
|
|
648
648
|
"data-boring-workspace-part": "app-left-pane-workspace",
|
|
649
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ D("span", {
|
|
650
650
|
className: "truncate",
|
|
651
651
|
children: t
|
|
652
652
|
})
|
|
@@ -655,30 +655,30 @@ function j({ appTitle: e, workspaceLabel: t, topSlot: n, showBrand: r = !0 }) {
|
|
|
655
655
|
}
|
|
656
656
|
//#endregion
|
|
657
657
|
//#region src/front/layout/plugin-tabs/AppLeftPaneActions.tsx
|
|
658
|
-
function
|
|
659
|
-
return /* @__PURE__ */
|
|
658
|
+
function bt({ icon: e, label: t, onClick: n, emphasis: r = !1, active: i = !1, trailing: a }) {
|
|
659
|
+
return /* @__PURE__ */ O("button", {
|
|
660
660
|
type: "button",
|
|
661
661
|
onClick: n,
|
|
662
|
-
className:
|
|
662
|
+
className: b("flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40", i ? "bg-foreground/[0.08] text-foreground shadow-sm ring-1 ring-border/60" : r ? "bg-foreground/[0.06] text-foreground hover:bg-foreground/[0.1]" : "text-foreground/82 hover:bg-foreground/[0.055] hover:text-foreground"),
|
|
663
663
|
children: [
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
className:
|
|
664
|
+
/* @__PURE__ */ D("span", {
|
|
665
|
+
className: b("grid size-5 shrink-0 place-items-center", i || r ? "text-foreground/90" : "text-muted-foreground"),
|
|
666
666
|
"aria-hidden": "true",
|
|
667
667
|
children: e
|
|
668
668
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ D("span", {
|
|
670
670
|
className: "min-w-0 flex-1 truncate",
|
|
671
671
|
children: t
|
|
672
672
|
}),
|
|
673
|
-
a ? /* @__PURE__ */
|
|
673
|
+
a ? /* @__PURE__ */ D("span", {
|
|
674
674
|
className: "shrink-0",
|
|
675
675
|
children: a
|
|
676
676
|
}) : null
|
|
677
677
|
]
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return /* @__PURE__ */
|
|
680
|
+
function xt({ keys: e }) {
|
|
681
|
+
return /* @__PURE__ */ D("kbd", {
|
|
682
682
|
"aria-hidden": "true",
|
|
683
683
|
className: "rounded border border-border/60 bg-foreground/[0.08] px-1.5 py-px text-[10px] font-medium leading-[1.4] tracking-wide text-muted-foreground",
|
|
684
684
|
children: e
|
|
@@ -686,7 +686,7 @@ function M({ keys: e }) {
|
|
|
686
686
|
}
|
|
687
687
|
//#endregion
|
|
688
688
|
//#region src/front/layout/plugin-tabs/AppLeftPaneSessionRow.tsx
|
|
689
|
-
function
|
|
689
|
+
function M(e) {
|
|
690
690
|
switch (e) {
|
|
691
691
|
case "danger": return "bg-destructive/12 text-destructive";
|
|
692
692
|
case "warning": return "bg-amber-500/12 text-amber-700 dark:text-amber-300";
|
|
@@ -694,7 +694,7 @@ function N(e) {
|
|
|
694
694
|
default: return "bg-[color:var(--accent)]/12 text-[color:var(--accent)]";
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function St(e) {
|
|
698
698
|
switch (e) {
|
|
699
699
|
case "danger": return "bg-destructive";
|
|
700
700
|
case "warning": return "bg-amber-500";
|
|
@@ -702,11 +702,11 @@ function bt(e) {
|
|
|
702
702
|
default: return "bg-[color:var(--accent)]";
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0, working: a = !1, attentionBadge: o, onSwitch: s, onOpenAsPane: c, onTogglePinned: l, onDelete: u }) {
|
|
706
706
|
let d = e.title || "Untitled", f = () => {
|
|
707
707
|
t !== "active" && s(e.id);
|
|
708
708
|
};
|
|
709
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ O("div", {
|
|
710
710
|
"data-boring-workspace-part": "app-session-row",
|
|
711
711
|
"data-boring-session-state": t,
|
|
712
712
|
draggable: r,
|
|
@@ -714,14 +714,14 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
714
714
|
t.dataTransfer.setData(re, e.id), t.dataTransfer.setData("text/plain", d), t.dataTransfer.effectAllowed = "copyMove";
|
|
715
715
|
} : void 0,
|
|
716
716
|
onClick: f,
|
|
717
|
-
className:
|
|
717
|
+
className: b("group flex min-h-8 w-full items-center gap-2 rounded-md border px-2.5 py-1 text-left transition-colors", t === "active" ? "border-transparent bg-[color:oklch(from_var(--accent)_l_c_h/0.14)] text-foreground" : t === "open" ? "cursor-pointer border-transparent bg-foreground/[0.05] text-foreground/90 hover:bg-foreground/[0.07]" : "cursor-pointer border-transparent text-foreground/78 hover:bg-foreground/[0.055] hover:text-foreground"),
|
|
718
718
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
className:
|
|
719
|
+
/* @__PURE__ */ D(ke, {
|
|
720
|
+
className: b("h-3.5 w-3.5 shrink-0", t === "active" ? "text-[color:var(--accent)]" : "text-muted-foreground/65"),
|
|
721
721
|
strokeWidth: 1.75,
|
|
722
722
|
"aria-hidden": "true"
|
|
723
723
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ D("button", {
|
|
725
725
|
type: "button",
|
|
726
726
|
onClick: (e) => {
|
|
727
727
|
e.stopPropagation(), f();
|
|
@@ -731,27 +731,27 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
731
731
|
title: d,
|
|
732
732
|
children: d
|
|
733
733
|
}),
|
|
734
|
-
o ? /* @__PURE__ */
|
|
734
|
+
o ? /* @__PURE__ */ O("span", {
|
|
735
735
|
"data-boring-workspace-part": "app-session-badge",
|
|
736
736
|
"data-boring-badge": o.kind,
|
|
737
|
-
className:
|
|
738
|
-
children: [/* @__PURE__ */
|
|
737
|
+
className: b("pointer-events-none inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium leading-none", M(o.tone)),
|
|
738
|
+
children: [/* @__PURE__ */ D("span", {
|
|
739
739
|
"aria-hidden": "true",
|
|
740
|
-
className:
|
|
740
|
+
className: b("h-1.5 w-1.5 animate-pulse rounded-full", St(o.tone))
|
|
741
741
|
}), o.label]
|
|
742
|
-
}) : a ? /* @__PURE__ */
|
|
742
|
+
}) : a ? /* @__PURE__ */ O("span", {
|
|
743
743
|
"data-boring-workspace-part": "app-session-badge",
|
|
744
744
|
"data-boring-badge": "working",
|
|
745
745
|
className: "pointer-events-none inline-flex shrink-0 items-center gap-1 rounded-full bg-foreground/[0.07] px-1.5 py-0.5 text-[10px] font-medium leading-none text-muted-foreground",
|
|
746
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ D("span", {
|
|
747
747
|
"aria-hidden": "true",
|
|
748
748
|
className: "h-1.5 w-1.5 animate-pulse rounded-full bg-[color:var(--accent)]"
|
|
749
749
|
}), "working"]
|
|
750
750
|
}) : null,
|
|
751
|
-
i ? /* @__PURE__ */
|
|
751
|
+
i ? /* @__PURE__ */ D("span", {
|
|
752
752
|
"data-boring-workspace-part": "app-session-pin-action",
|
|
753
|
-
className:
|
|
754
|
-
children: /* @__PURE__ */
|
|
753
|
+
className: b("flex w-0 shrink-0 items-center overflow-hidden opacity-0 transition-[width,opacity,margin] group-hover:ml-1 group-hover:w-auto group-hover:opacity-100 group-focus-within:ml-1 group-focus-within:w-auto group-focus-within:opacity-100", n && "ml-1 w-auto opacity-100"),
|
|
754
|
+
children: /* @__PURE__ */ D("button", {
|
|
755
755
|
type: "button",
|
|
756
756
|
"aria-label": n ? `Unpin ${d}` : `Pin ${d}`,
|
|
757
757
|
title: n ? "Unpin" : "Pin",
|
|
@@ -759,17 +759,17 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
759
759
|
onClick: (t) => {
|
|
760
760
|
t.stopPropagation(), l(e.id);
|
|
761
761
|
},
|
|
762
|
-
className:
|
|
763
|
-
children: /* @__PURE__ */
|
|
764
|
-
className:
|
|
762
|
+
className: b("grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40", n && "text-[color:var(--accent)]"),
|
|
763
|
+
children: /* @__PURE__ */ D(Re, {
|
|
764
|
+
className: b("h-3.5 w-3.5", n && "fill-current"),
|
|
765
765
|
strokeWidth: 1.75
|
|
766
766
|
})
|
|
767
767
|
})
|
|
768
768
|
}) : null,
|
|
769
|
-
t === "normal" && r || u ? /* @__PURE__ */
|
|
769
|
+
t === "normal" && r || u ? /* @__PURE__ */ O("span", {
|
|
770
770
|
"data-boring-workspace-part": "app-session-actions",
|
|
771
771
|
className: "flex w-0 shrink-0 items-center gap-0.5 overflow-hidden opacity-0 transition-[width,opacity,margin] group-hover:ml-1 group-hover:w-auto group-hover:opacity-100 group-focus-within:ml-1 group-focus-within:w-auto group-focus-within:opacity-100",
|
|
772
|
-
children: [t === "normal" && r ? /* @__PURE__ */
|
|
772
|
+
children: [t === "normal" && r ? /* @__PURE__ */ D("button", {
|
|
773
773
|
type: "button",
|
|
774
774
|
"aria-label": `Open ${d} in new chat pane`,
|
|
775
775
|
title: "Open in new chat pane",
|
|
@@ -777,11 +777,11 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
777
777
|
t.stopPropagation(), c(e.id);
|
|
778
778
|
},
|
|
779
779
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
780
|
-
children: /* @__PURE__ */
|
|
780
|
+
children: /* @__PURE__ */ D(k, {
|
|
781
781
|
className: "h-3.5 w-3.5",
|
|
782
782
|
strokeWidth: 1.75
|
|
783
783
|
})
|
|
784
|
-
}) : null, u ? /* @__PURE__ */
|
|
784
|
+
}) : null, u ? /* @__PURE__ */ D("button", {
|
|
785
785
|
type: "button",
|
|
786
786
|
"aria-label": `Delete ${d}`,
|
|
787
787
|
title: "Delete",
|
|
@@ -789,7 +789,7 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
789
789
|
t.stopPropagation(), u(e.id);
|
|
790
790
|
},
|
|
791
791
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
792
|
-
children: /* @__PURE__ */
|
|
792
|
+
children: /* @__PURE__ */ D(qe, {
|
|
793
793
|
className: "h-3.5 w-3.5",
|
|
794
794
|
strokeWidth: 1.75
|
|
795
795
|
})
|
|
@@ -800,10 +800,10 @@ function xt({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
800
800
|
}
|
|
801
801
|
//#endregion
|
|
802
802
|
//#region src/front/layout/plugin-tabs/AppLeftPaneProjects.tsx
|
|
803
|
-
var
|
|
803
|
+
var P = "boring-workspace:pinned-projects";
|
|
804
804
|
function Ct() {
|
|
805
805
|
try {
|
|
806
|
-
let e = globalThis.localStorage?.getItem(
|
|
806
|
+
let e = globalThis.localStorage?.getItem(P);
|
|
807
807
|
if (!e) return [];
|
|
808
808
|
let t = JSON.parse(e);
|
|
809
809
|
return Array.isArray(t?.ids) ? t.ids.filter((e) => typeof e == "string") : [];
|
|
@@ -813,11 +813,11 @@ function Ct() {
|
|
|
813
813
|
}
|
|
814
814
|
function wt(e) {
|
|
815
815
|
try {
|
|
816
|
-
globalThis.localStorage?.setItem(
|
|
816
|
+
globalThis.localStorage?.setItem(P, JSON.stringify({ ids: e }));
|
|
817
817
|
} catch {}
|
|
818
818
|
}
|
|
819
819
|
function Tt() {
|
|
820
|
-
let [e, t] =
|
|
820
|
+
let [e, t] = T(() => Ct());
|
|
821
821
|
return [e, (e) => t((t) => {
|
|
822
822
|
let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
823
823
|
return wt(n), n;
|
|
@@ -825,9 +825,9 @@ function Tt() {
|
|
|
825
825
|
}
|
|
826
826
|
function Et({ projects: e, activeProjectId: t, fallbackName: n, expandedIds: r, onToggleExpanded: i, pinnedProjectIds: a, onTogglePinnedProject: o, onOpenProjectSession: s, onShowMoreProjectSessions: c, onCreateProjectSession: l, onOpenProjectSettings: u, onOpenProjectInNewTab: d, renderProjectSession: f }) {
|
|
827
827
|
let p = t ?? e[0]?.id ?? null;
|
|
828
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ D("div", {
|
|
829
829
|
className: "space-y-0.5",
|
|
830
|
-
children: e.map((e) => /* @__PURE__ */
|
|
830
|
+
children: e.map((e) => /* @__PURE__ */ D(Dt, {
|
|
831
831
|
project: e,
|
|
832
832
|
fallbackName: n,
|
|
833
833
|
active: e.id === p,
|
|
@@ -846,46 +846,46 @@ function Et({ projects: e, activeProjectId: t, fallbackName: n, expandedIds: r,
|
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, onTogglePinned: a, onToggleExpanded: o, onActivate: s, onOpenSession: c, onShowMore: l, onCreateSession: u, onOpenSettings: d, onOpenInNewTab: f, renderProjectSession: p }) {
|
|
849
|
-
let [m, h] =
|
|
850
|
-
return /* @__PURE__ */
|
|
849
|
+
let [m, h] = T(!1), g = e.sessions ?? [], _ = e.blockedCount ?? 0, ee = e.available === !1, v = e.name || t;
|
|
850
|
+
return /* @__PURE__ */ O("div", {
|
|
851
851
|
className: "space-y-0.5",
|
|
852
|
-
children: [/* @__PURE__ */
|
|
853
|
-
className:
|
|
852
|
+
children: [/* @__PURE__ */ O("div", {
|
|
853
|
+
className: b("group relative flex min-h-8 w-full items-center gap-2 rounded-md py-1 pl-2 pr-2 transition-colors", n ? "bg-foreground/[0.07] text-foreground" : ee ? "text-muted-foreground/45" : "text-foreground/82 hover:bg-foreground/[0.05] hover:text-foreground"),
|
|
854
854
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ D("button", {
|
|
856
856
|
type: "button",
|
|
857
857
|
"aria-label": r ? `Collapse ${v}` : `Expand ${v}`,
|
|
858
858
|
"aria-expanded": r,
|
|
859
859
|
onClick: o,
|
|
860
860
|
className: "grid size-5 shrink-0 place-items-center rounded text-muted-foreground/55 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
861
|
-
children: /* @__PURE__ */
|
|
862
|
-
className:
|
|
861
|
+
children: /* @__PURE__ */ D(Oe, {
|
|
862
|
+
className: b("h-3.5 w-3.5 transition-transform duration-150", r && "rotate-90"),
|
|
863
863
|
strokeWidth: 2,
|
|
864
864
|
"aria-hidden": "true"
|
|
865
865
|
})
|
|
866
866
|
}),
|
|
867
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ D("button", {
|
|
868
868
|
type: "button",
|
|
869
869
|
"aria-current": n ? "page" : void 0,
|
|
870
|
-
disabled:
|
|
870
|
+
disabled: ee,
|
|
871
871
|
onClick: () => {
|
|
872
|
-
|
|
872
|
+
ee || s();
|
|
873
873
|
},
|
|
874
874
|
className: "min-w-0 flex-1 truncate rounded text-left text-[13px] font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-default",
|
|
875
875
|
children: v
|
|
876
876
|
}),
|
|
877
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ O("span", {
|
|
878
878
|
className: "relative flex h-6 w-[3.25rem] shrink-0 items-center justify-end",
|
|
879
|
-
children: [
|
|
880
|
-
className:
|
|
881
|
-
children: /* @__PURE__ */
|
|
882
|
-
title: `${
|
|
879
|
+
children: [_ > 0 ? /* @__PURE__ */ D("span", {
|
|
880
|
+
className: b("pointer-events-none absolute inset-0 flex items-center justify-end transition-opacity", "group-hover:opacity-0 group-focus-within:opacity-0", m && "opacity-0"),
|
|
881
|
+
children: /* @__PURE__ */ D("span", {
|
|
882
|
+
title: `${_} session${_ === 1 ? "" : "s"} waiting`,
|
|
883
883
|
className: "grid min-w-5 place-items-center rounded-full bg-[color:oklch(from_var(--accent)_l_c_h/0.18)] px-1.5 py-0.5 text-[11px] font-semibold text-[color:var(--accent)]",
|
|
884
|
-
children:
|
|
884
|
+
children: _ > 99 ? "99+" : _
|
|
885
885
|
})
|
|
886
|
-
}) : null, /* @__PURE__ */
|
|
887
|
-
className:
|
|
888
|
-
children: [u ? /* @__PURE__ */
|
|
886
|
+
}) : null, /* @__PURE__ */ O("span", {
|
|
887
|
+
className: b("flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100", m && "opacity-100"),
|
|
888
|
+
children: [u ? /* @__PURE__ */ D("button", {
|
|
889
889
|
type: "button",
|
|
890
890
|
"aria-label": `New chat in ${v}`,
|
|
891
891
|
title: "New chat",
|
|
@@ -893,59 +893,59 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
893
893
|
t.stopPropagation(), u(e.id);
|
|
894
894
|
},
|
|
895
895
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
896
|
-
children: /* @__PURE__ */
|
|
896
|
+
children: /* @__PURE__ */ D(Ve, {
|
|
897
897
|
className: "h-3.5 w-3.5",
|
|
898
898
|
strokeWidth: 2
|
|
899
899
|
})
|
|
900
|
-
}) : null, /* @__PURE__ */
|
|
900
|
+
}) : null, /* @__PURE__ */ O(Je, {
|
|
901
901
|
open: m,
|
|
902
902
|
onOpenChange: h,
|
|
903
|
-
children: [/* @__PURE__ */
|
|
903
|
+
children: [/* @__PURE__ */ D(j, {
|
|
904
904
|
asChild: !0,
|
|
905
|
-
children: /* @__PURE__ */
|
|
905
|
+
children: /* @__PURE__ */ D("button", {
|
|
906
906
|
type: "button",
|
|
907
907
|
"aria-label": `${v} options`,
|
|
908
908
|
title: "More",
|
|
909
909
|
onClick: (e) => e.stopPropagation(),
|
|
910
910
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
911
|
-
children: /* @__PURE__ */
|
|
911
|
+
children: /* @__PURE__ */ D(Fe, {
|
|
912
912
|
className: "h-3.5 w-3.5",
|
|
913
913
|
strokeWidth: 2
|
|
914
914
|
})
|
|
915
915
|
})
|
|
916
|
-
}), /* @__PURE__ */
|
|
916
|
+
}), /* @__PURE__ */ O(Ye, {
|
|
917
917
|
align: "end",
|
|
918
918
|
sideOffset: 6,
|
|
919
919
|
className: "w-48 border-border/50 shadow-[0_12px_28px_-6px_rgba(0,0,0,0.55)]",
|
|
920
920
|
children: [
|
|
921
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ O(Xe, {
|
|
922
922
|
onSelect: a,
|
|
923
923
|
className: "gap-2 text-[13px]",
|
|
924
|
-
children: [
|
|
924
|
+
children: [D(i ? ze : Re, {
|
|
925
925
|
className: "h-3.5 w-3.5",
|
|
926
926
|
"aria-hidden": "true"
|
|
927
927
|
}), i ? "Unpin project" : "Pin project"]
|
|
928
928
|
}),
|
|
929
|
-
u ? /* @__PURE__ */
|
|
929
|
+
u ? /* @__PURE__ */ O(Xe, {
|
|
930
930
|
onSelect: () => u(e.id),
|
|
931
931
|
className: "gap-2 text-[13px]",
|
|
932
|
-
children: [/* @__PURE__ */
|
|
932
|
+
children: [/* @__PURE__ */ D(k, {
|
|
933
933
|
className: "h-3.5 w-3.5",
|
|
934
934
|
"aria-hidden": "true"
|
|
935
935
|
}), "New chat"]
|
|
936
936
|
}) : null,
|
|
937
|
-
d ? /* @__PURE__ */
|
|
937
|
+
d ? /* @__PURE__ */ O(Xe, {
|
|
938
938
|
onSelect: () => d(e.id),
|
|
939
939
|
className: "gap-2 text-[13px]",
|
|
940
|
-
children: [/* @__PURE__ */
|
|
940
|
+
children: [/* @__PURE__ */ D(We, {
|
|
941
941
|
className: "h-3.5 w-3.5",
|
|
942
942
|
"aria-hidden": "true"
|
|
943
943
|
}), "Workspace settings"]
|
|
944
944
|
}) : null,
|
|
945
|
-
f ? /* @__PURE__ */
|
|
945
|
+
f ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(A, {}), /* @__PURE__ */ O(Xe, {
|
|
946
946
|
onSelect: () => f(e.id),
|
|
947
947
|
className: "gap-2 text-[13px]",
|
|
948
|
-
children: [/* @__PURE__ */
|
|
948
|
+
children: [/* @__PURE__ */ D(Ae, {
|
|
949
949
|
className: "h-3.5 w-3.5",
|
|
950
950
|
"aria-hidden": "true"
|
|
951
951
|
}), "Open in new tab"]
|
|
@@ -956,22 +956,22 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
956
956
|
})]
|
|
957
957
|
})
|
|
958
958
|
]
|
|
959
|
-
}), r ? /* @__PURE__ */
|
|
959
|
+
}), r ? /* @__PURE__ */ O("div", {
|
|
960
960
|
className: "space-y-0.5 pl-6",
|
|
961
|
-
children: [e.loadingSessions &&
|
|
961
|
+
children: [e.loadingSessions && g.length === 0 ? /* @__PURE__ */ D("div", {
|
|
962
962
|
className: "px-1 py-1.5 text-xs text-muted-foreground",
|
|
963
963
|
children: "Loading chats…"
|
|
964
|
-
}) :
|
|
964
|
+
}) : g.length === 0 ? /* @__PURE__ */ D("div", {
|
|
965
965
|
className: "px-1 py-1.5 text-xs text-muted-foreground",
|
|
966
966
|
children: "No chats yet."
|
|
967
|
-
}) :
|
|
967
|
+
}) : g.map((t) => /* @__PURE__ */ D("div", { children: p ? p(e, t) : /* @__PURE__ */ D(N, {
|
|
968
968
|
session: t,
|
|
969
969
|
state: "normal",
|
|
970
970
|
pinned: !1,
|
|
971
971
|
onSwitch: () => c?.(e.id, t.id),
|
|
972
972
|
onOpenAsPane: () => c?.(e.id, t.id),
|
|
973
973
|
onTogglePinned: () => void 0
|
|
974
|
-
}) }, t.id)), e.hasMoreSessions ? /* @__PURE__ */
|
|
974
|
+
}) }, t.id)), e.hasMoreSessions ? /* @__PURE__ */ D("button", {
|
|
975
975
|
type: "button",
|
|
976
976
|
onClick: () => l?.(e.id),
|
|
977
977
|
className: "rounded-md px-1 py-1 text-left text-[13px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
@@ -984,14 +984,14 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
984
984
|
//#region src/front/layout/plugin-tabs/AppLeftPaneSections.tsx
|
|
985
985
|
function Ot({ title: e, empty: t, children: n }) {
|
|
986
986
|
let r = Array.isArray(n) ? n.length > 0 : !!n;
|
|
987
|
-
return !r && !t ? null : /* @__PURE__ */
|
|
987
|
+
return !r && !t ? null : /* @__PURE__ */ O("div", {
|
|
988
988
|
className: "space-y-1",
|
|
989
|
-
children: [/* @__PURE__ */
|
|
989
|
+
children: [/* @__PURE__ */ D("div", {
|
|
990
990
|
className: "px-2 pb-0.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/65",
|
|
991
991
|
children: e
|
|
992
|
-
}), /* @__PURE__ */
|
|
992
|
+
}), /* @__PURE__ */ D("div", {
|
|
993
993
|
className: "space-y-0.5",
|
|
994
|
-
children: r ? n : /* @__PURE__ */
|
|
994
|
+
children: r ? n : /* @__PURE__ */ D("div", {
|
|
995
995
|
className: "px-2 py-1.5 text-xs text-muted-foreground/60",
|
|
996
996
|
children: t
|
|
997
997
|
})
|
|
@@ -1002,8 +1002,8 @@ function Ot({ title: e, empty: t, children: n }) {
|
|
|
1002
1002
|
//#region src/front/layout/plugin-tabs/AppLeftPane.tsx
|
|
1003
1003
|
var kt = "boring:chat-session-status";
|
|
1004
1004
|
function At() {
|
|
1005
|
-
let [e, t] =
|
|
1006
|
-
return
|
|
1005
|
+
let [e, t] = T(() => /* @__PURE__ */ new Set());
|
|
1006
|
+
return S(() => {
|
|
1007
1007
|
let e = (e) => {
|
|
1008
1008
|
let n = e.detail;
|
|
1009
1009
|
if (typeof n?.sessionId != "string") return;
|
|
@@ -1017,64 +1017,64 @@ function At() {
|
|
|
1017
1017
|
return window.addEventListener(kt, e), () => window.removeEventListener(kt, e);
|
|
1018
1018
|
}, []), e;
|
|
1019
1019
|
}
|
|
1020
|
-
function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTitle: r = "Workspaces", projects: i, activeProjectId: a, onOpenProjectSession: o, onShowMoreProjectSessions: s, onCreateProject: c, onCreateProjectSession: l, onOpenProjectSettings: u, onOpenProjectInNewTab: d, topSlot: f, bottomSlot: p, headerMode: m = "full", sessions: h, activeSessionId:
|
|
1021
|
-
let
|
|
1020
|
+
function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTitle: r = "Workspaces", projects: i, activeProjectId: a, onOpenProjectSession: o, onShowMoreProjectSessions: s, onCreateProject: c, onCreateProjectSession: l, onOpenProjectSettings: u, onOpenProjectInNewTab: d, topSlot: f, bottomSlot: p, headerMode: m = "full", sessions: h, activeSessionId: _, openSessionIds: ee, pinnedSessionIds: v, onCreateSession: y, onOpenCommandPalette: te, onSwitchSession: ne, onOpenSessionAsPane: re, onToggleSessionPinned: ie, onDeleteSession: ae, actions: oe = [], layoutMode: se = "single-project" }) {
|
|
1021
|
+
let ce = C(() => new Set(ee), [ee]), le = C(() => new Set(v), [v]), ue = At(), { blockers: de } = fe(), pe = C(() => {
|
|
1022
1022
|
let e = /* @__PURE__ */ new Map();
|
|
1023
|
-
for (let t of
|
|
1023
|
+
for (let t of de) {
|
|
1024
1024
|
if (!t.sessionId) continue;
|
|
1025
|
-
let n =
|
|
1025
|
+
let n = g(t);
|
|
1026
1026
|
if (!n) continue;
|
|
1027
1027
|
let r = e.get(t.sessionId);
|
|
1028
1028
|
(!r || (n.priority ?? 0) > (r.priority ?? 0)) && e.set(t.sessionId, n);
|
|
1029
1029
|
}
|
|
1030
1030
|
return e;
|
|
1031
|
-
}, [
|
|
1031
|
+
}, [de]), me = C(() => v.map((e) => h.find((t) => t.id === e)).filter((e) => !!e), [v, h]), b = C(() => h.filter((e) => !le.has(e.id)), [le, h]), he = C(() => {
|
|
1032
1032
|
let e = i ?? [];
|
|
1033
|
-
return
|
|
1033
|
+
return se === "multi-project" ? e.map((e) => e.id === a ? {
|
|
1034
1034
|
...e,
|
|
1035
|
-
sessions: e.sessions ??
|
|
1035
|
+
sessions: e.sessions ?? b.map((e) => ({
|
|
1036
1036
|
id: e.id,
|
|
1037
1037
|
title: e.title,
|
|
1038
1038
|
updatedAt: e.updatedAt
|
|
1039
1039
|
})),
|
|
1040
|
-
sessionCount: e.sessionCount ??
|
|
1040
|
+
sessionCount: e.sessionCount ?? b.length
|
|
1041
1041
|
} : e) : e;
|
|
1042
1042
|
}, [
|
|
1043
1043
|
a,
|
|
1044
|
-
|
|
1044
|
+
se,
|
|
1045
1045
|
i,
|
|
1046
|
-
|
|
1047
|
-
]), [
|
|
1046
|
+
b
|
|
1047
|
+
]), [ge, _e] = T(() => {
|
|
1048
1048
|
let e = a ?? i?.[0]?.id;
|
|
1049
1049
|
return new Set(e ? [e] : []);
|
|
1050
|
-
}),
|
|
1050
|
+
}), ve = (e) => _e((t) => {
|
|
1051
1051
|
let n = new Set(t);
|
|
1052
1052
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1053
|
-
}), [
|
|
1053
|
+
}), [ye, be] = Tt(), xe = C(() => new Set(ye), [ye]), Se = C(() => ye.map((e) => he.find((t) => t.id === e)).filter((e) => !!e), [ye, he]), Ce = C(() => he.filter((e) => !xe.has(e.id)), [he, xe]), we = m !== "hidden" && (se !== "multi-project" || m === "workspace"), Te = m === "full" && se !== "multi-project", x = (e, t, n = a ?? void 0) => {
|
|
1054
1054
|
let r = !n || n === a;
|
|
1055
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ D(N, {
|
|
1056
1056
|
session: e,
|
|
1057
|
-
state: r && e.id ===
|
|
1057
|
+
state: r && e.id === _ ? "active" : r && ce.has(e.id) ? "open" : "normal",
|
|
1058
1058
|
pinned: t,
|
|
1059
1059
|
canSplit: r,
|
|
1060
1060
|
canPin: r,
|
|
1061
|
-
working: r &&
|
|
1062
|
-
attentionBadge: r ?
|
|
1063
|
-
onSwitch: r ?
|
|
1064
|
-
onOpenAsPane: r ?
|
|
1065
|
-
onTogglePinned:
|
|
1066
|
-
onDelete: r ?
|
|
1061
|
+
working: r && ue.has(e.id),
|
|
1062
|
+
attentionBadge: r ? pe.get(e.id) : void 0,
|
|
1063
|
+
onSwitch: r ? ne : () => o?.(n, e.id),
|
|
1064
|
+
onOpenAsPane: r ? re : () => o?.(n, e.id),
|
|
1065
|
+
onTogglePinned: ie,
|
|
1066
|
+
onDelete: r ? ae : void 0
|
|
1067
1067
|
}, e.id);
|
|
1068
|
-
},
|
|
1068
|
+
}, S = (e) => /* @__PURE__ */ D(Et, {
|
|
1069
1069
|
projects: e,
|
|
1070
1070
|
activeProjectId: a,
|
|
1071
1071
|
fallbackName: n || t || "Boring UI",
|
|
1072
|
-
expandedIds:
|
|
1073
|
-
onToggleExpanded:
|
|
1074
|
-
pinnedProjectIds:
|
|
1075
|
-
onTogglePinnedProject:
|
|
1072
|
+
expandedIds: ge,
|
|
1073
|
+
onToggleExpanded: ve,
|
|
1074
|
+
pinnedProjectIds: xe,
|
|
1075
|
+
onTogglePinnedProject: be,
|
|
1076
1076
|
onOpenProjectSession: (e, t) => {
|
|
1077
|
-
e === a ?
|
|
1077
|
+
e === a ? ne(t) : o?.(e, t);
|
|
1078
1078
|
},
|
|
1079
1079
|
onShowMoreProjectSessions: s,
|
|
1080
1080
|
onCreateProjectSession: l,
|
|
@@ -1084,9 +1084,9 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1084
1084
|
id: t.id,
|
|
1085
1085
|
title: t.title,
|
|
1086
1086
|
updatedAt: t.updatedAt
|
|
1087
|
-
},
|
|
1087
|
+
}, le.has(t.id), e.id)
|
|
1088
1088
|
});
|
|
1089
|
-
return /* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ O("aside", {
|
|
1090
1090
|
"data-boring-workspace-part": "app-left-pane",
|
|
1091
1091
|
className: "flex h-full min-h-0 shrink-0 flex-col border-r border-border bg-[color:oklch(from_var(--background)_calc(l-0.012)_c_h)] text-sm",
|
|
1092
1092
|
style: {
|
|
@@ -1096,38 +1096,38 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1096
1096
|
},
|
|
1097
1097
|
"aria-label": "App navigation",
|
|
1098
1098
|
children: [
|
|
1099
|
-
|
|
1099
|
+
we ? /* @__PURE__ */ D(yt, {
|
|
1100
1100
|
appTitle: t,
|
|
1101
1101
|
workspaceLabel: n,
|
|
1102
1102
|
topSlot: f,
|
|
1103
|
-
showBrand:
|
|
1104
|
-
}) : /* @__PURE__ */
|
|
1103
|
+
showBrand: Te
|
|
1104
|
+
}) : /* @__PURE__ */ D("div", {
|
|
1105
1105
|
className: "h-12 shrink-0",
|
|
1106
1106
|
"aria-hidden": "true"
|
|
1107
1107
|
}),
|
|
1108
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ O("nav", {
|
|
1109
1109
|
className: "shrink-0 space-y-0.5 px-2 pb-1 pt-1",
|
|
1110
1110
|
"aria-label": "Primary workspace actions",
|
|
1111
1111
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
icon: /* @__PURE__ */
|
|
1112
|
+
/* @__PURE__ */ D(bt, {
|
|
1113
|
+
icon: /* @__PURE__ */ D(Ve, {
|
|
1114
1114
|
className: "h-4 w-4",
|
|
1115
1115
|
strokeWidth: 2
|
|
1116
1116
|
}),
|
|
1117
1117
|
label: "New chat",
|
|
1118
|
-
onClick:
|
|
1118
|
+
onClick: y,
|
|
1119
1119
|
emphasis: !0
|
|
1120
1120
|
}),
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
icon: /* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ D(bt, {
|
|
1122
|
+
icon: /* @__PURE__ */ D(Ue, {
|
|
1123
1123
|
className: "h-4 w-4",
|
|
1124
1124
|
strokeWidth: 1.75
|
|
1125
1125
|
}),
|
|
1126
1126
|
label: "Search",
|
|
1127
|
-
onClick:
|
|
1128
|
-
trailing: /* @__PURE__ */
|
|
1127
|
+
onClick: te,
|
|
1128
|
+
trailing: /* @__PURE__ */ D(xt, { keys: "⌘K" })
|
|
1129
1129
|
}),
|
|
1130
|
-
|
|
1130
|
+
oe.map((e) => /* @__PURE__ */ D(bt, {
|
|
1131
1131
|
icon: e.icon,
|
|
1132
1132
|
label: e.label,
|
|
1133
1133
|
onClick: e.onClick,
|
|
@@ -1137,48 +1137,48 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1137
1137
|
}, e.id))
|
|
1138
1138
|
]
|
|
1139
1139
|
}),
|
|
1140
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ D("div", {
|
|
1141
1141
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto px-2 py-2",
|
|
1142
|
-
children:
|
|
1142
|
+
children: se === "multi-project" ? /* @__PURE__ */ O("div", {
|
|
1143
1143
|
className: "space-y-3 py-1",
|
|
1144
|
-
children: [
|
|
1144
|
+
children: [me.length > 0 || Se.length > 0 ? /* @__PURE__ */ O(Ot, {
|
|
1145
1145
|
title: "Pinned",
|
|
1146
|
-
children: [
|
|
1147
|
-
}) : null, /* @__PURE__ */
|
|
1146
|
+
children: [me.map((e) => x(e, !0)), Se.length > 0 ? S(Se) : null]
|
|
1147
|
+
}) : null, /* @__PURE__ */ O("section", {
|
|
1148
1148
|
"data-boring-workspace-part": "app-left-pane-section",
|
|
1149
1149
|
className: "space-y-1",
|
|
1150
|
-
children: [/* @__PURE__ */
|
|
1150
|
+
children: [/* @__PURE__ */ O("div", {
|
|
1151
1151
|
className: "flex items-center justify-between gap-1 px-2 pb-0.5",
|
|
1152
|
-
children: [/* @__PURE__ */
|
|
1152
|
+
children: [/* @__PURE__ */ D("span", {
|
|
1153
1153
|
className: "text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/65",
|
|
1154
1154
|
children: r
|
|
1155
|
-
}), c ? /* @__PURE__ */
|
|
1155
|
+
}), c ? /* @__PURE__ */ D("button", {
|
|
1156
1156
|
type: "button",
|
|
1157
1157
|
"aria-label": "New project",
|
|
1158
1158
|
title: "New project",
|
|
1159
1159
|
onClick: c,
|
|
1160
1160
|
className: "grid size-6 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.055] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1161
|
+
children: /* @__PURE__ */ D(Ve, {
|
|
1162
1162
|
className: "h-3.5 w-3.5",
|
|
1163
1163
|
strokeWidth: 2,
|
|
1164
1164
|
"aria-hidden": "true"
|
|
1165
1165
|
})
|
|
1166
1166
|
}) : null]
|
|
1167
|
-
}),
|
|
1167
|
+
}), S(Ce)]
|
|
1168
1168
|
})]
|
|
1169
|
-
}) : /* @__PURE__ */
|
|
1169
|
+
}) : /* @__PURE__ */ O("div", {
|
|
1170
1170
|
className: "space-y-4 py-1",
|
|
1171
|
-
children: [
|
|
1171
|
+
children: [me.length > 0 ? /* @__PURE__ */ D(Ot, {
|
|
1172
1172
|
title: "Pinned",
|
|
1173
|
-
children:
|
|
1174
|
-
}) : null, /* @__PURE__ */
|
|
1173
|
+
children: me.map((e) => x(e, !0))
|
|
1174
|
+
}) : null, /* @__PURE__ */ D(Ot, {
|
|
1175
1175
|
title: "Chats",
|
|
1176
1176
|
empty: "No chats yet.",
|
|
1177
|
-
children:
|
|
1177
|
+
children: b.map((e) => x(e, !1))
|
|
1178
1178
|
})]
|
|
1179
1179
|
})
|
|
1180
1180
|
}),
|
|
1181
|
-
p ? /* @__PURE__ */
|
|
1181
|
+
p ? /* @__PURE__ */ D("footer", {
|
|
1182
1182
|
className: "shrink-0 border-t border-border/40 p-2",
|
|
1183
1183
|
children: p
|
|
1184
1184
|
}) : null
|
|
@@ -1188,16 +1188,16 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1188
1188
|
//#endregion
|
|
1189
1189
|
//#region src/front/layout/plugin-tabs/PluginTabsWorkspaceShell.tsx
|
|
1190
1190
|
function Mt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
1191
|
-
let i =
|
|
1191
|
+
let i = w(null), a = x((e) => {
|
|
1192
1192
|
if (i.current == null) return;
|
|
1193
1193
|
let t = e.clientX - i.current;
|
|
1194
1194
|
i.current = e.clientX, t !== 0 && r(t);
|
|
1195
|
-
}, [r]), o =
|
|
1195
|
+
}, [r]), o = x(() => {
|
|
1196
1196
|
i.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
|
|
1197
|
-
}, [a]), s =
|
|
1197
|
+
}, [a]), s = x((e) => {
|
|
1198
1198
|
e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), i.current = e.clientX, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
|
|
1199
1199
|
}, [a, o]);
|
|
1200
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ D("div", {
|
|
1201
1201
|
role: "separator",
|
|
1202
1202
|
"aria-label": "Resize app navigation",
|
|
1203
1203
|
"aria-orientation": "vertical",
|
|
@@ -1205,7 +1205,7 @@ function Mt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
|
1205
1205
|
"aria-valuemax": n,
|
|
1206
1206
|
"aria-valuenow": e,
|
|
1207
1207
|
tabIndex: 0,
|
|
1208
|
-
onKeyDown:
|
|
1208
|
+
onKeyDown: x((i) => {
|
|
1209
1209
|
i.key === "ArrowLeft" ? (i.preventDefault(), r(i.shiftKey ? -48 : -16)) : i.key === "ArrowRight" ? (i.preventDefault(), r(i.shiftKey ? 48 : 16)) : i.key === "Home" ? (i.preventDefault(), r(t - e)) : i.key === "End" && (i.preventDefault(), r(n - e));
|
|
1210
1210
|
}, [
|
|
1211
1211
|
n,
|
|
@@ -1215,46 +1215,60 @@ function Mt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
|
1215
1215
|
]),
|
|
1216
1216
|
onPointerDown: s,
|
|
1217
1217
|
className: "group relative z-20 -ml-px w-1 shrink-0 cursor-col-resize touch-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
1218
|
-
children: /* @__PURE__ */
|
|
1218
|
+
children: /* @__PURE__ */ D("span", { className: "absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors group-hover:bg-foreground/30 group-active:bg-foreground/45" })
|
|
1219
1219
|
});
|
|
1220
1220
|
}
|
|
1221
|
-
function Nt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i, onResizeLeftPane: a, leftPaneWidth: o, minLeftPaneWidth: s = 220, maxLeftPaneWidth: c = 420, className: l }) {
|
|
1222
|
-
let [
|
|
1223
|
-
return /* @__PURE__ */
|
|
1221
|
+
function Nt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i, onResizeLeftPane: a, leftPaneWidth: o, minLeftPaneWidth: s = 220, maxLeftPaneWidth: c = 420, className: l, mobileShellEnabled: u }) {
|
|
1222
|
+
let [d, f] = T(!1), [p, m] = T(!1), h = he(), g = u === !0 && h < 640, _ = g ? !p : e;
|
|
1223
|
+
return /* @__PURE__ */ O("div", {
|
|
1224
1224
|
"data-boring-workspace-part": "plugin-tabs-shell",
|
|
1225
|
-
"data-boring-state":
|
|
1226
|
-
|
|
1225
|
+
"data-boring-state": _ ? "collapsed" : "expanded",
|
|
1226
|
+
"data-mobile-shell": g ? "true" : "false",
|
|
1227
|
+
className: b("relative flex h-full min-h-0 w-full overflow-hidden bg-background", l),
|
|
1227
1228
|
children: [
|
|
1228
|
-
e ? null : t,
|
|
1229
|
-
!e && a && o != null ? /* @__PURE__ */
|
|
1229
|
+
g || e ? null : t,
|
|
1230
|
+
!g && !e && a && o != null ? /* @__PURE__ */ D(Mt, {
|
|
1230
1231
|
width: o,
|
|
1231
1232
|
minWidth: s,
|
|
1232
1233
|
maxWidth: c,
|
|
1233
1234
|
onResize: a
|
|
1234
1235
|
}) : null,
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ D("div", {
|
|
1236
1237
|
className: "relative min-w-0 flex-1",
|
|
1237
1238
|
children: n
|
|
1238
1239
|
}),
|
|
1239
|
-
|
|
1240
|
+
g ? p ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
|
|
1241
|
+
"aria-hidden": "true",
|
|
1242
|
+
"data-boring-workspace-part": "app-left-mobile-scrim",
|
|
1243
|
+
className: "absolute inset-0 z-[64] bg-foreground/30",
|
|
1244
|
+
onClick: () => m(!1)
|
|
1245
|
+
}), /* @__PURE__ */ D("div", {
|
|
1246
|
+
"data-boring-workspace-part": "app-left-mobile-overlay",
|
|
1247
|
+
"data-boring-state": "open",
|
|
1248
|
+
onClick: (e) => {
|
|
1249
|
+
e.target?.closest("button") && m(!1);
|
|
1250
|
+
},
|
|
1251
|
+
className: "absolute inset-y-0 left-0 z-[65] flex w-[min(86vw,360px)] max-w-[360px] shadow-2xl",
|
|
1252
|
+
children: t
|
|
1253
|
+
})] }) : null : e ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
|
|
1240
1254
|
"data-boring-workspace-part": "app-left-peek-trigger",
|
|
1241
1255
|
className: "absolute inset-y-0 left-0 z-[60] w-3",
|
|
1242
|
-
onMouseEnter: () =>
|
|
1256
|
+
onMouseEnter: () => f(!0),
|
|
1243
1257
|
"aria-hidden": "true"
|
|
1244
|
-
}),
|
|
1258
|
+
}), d ? /* @__PURE__ */ D("div", {
|
|
1245
1259
|
"data-boring-workspace-part": "app-left-peek",
|
|
1246
1260
|
"data-boring-state": "open",
|
|
1247
|
-
onMouseLeave: () =>
|
|
1261
|
+
onMouseLeave: () => f(!1),
|
|
1248
1262
|
className: "absolute inset-y-0 left-0 z-[65] flex shadow-2xl",
|
|
1249
1263
|
children: t
|
|
1250
1264
|
}) : null] }) : null,
|
|
1251
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ D("div", {
|
|
1252
1266
|
className: "pointer-events-none absolute left-1.5 top-2 z-[70]",
|
|
1253
|
-
children: /* @__PURE__ */
|
|
1254
|
-
label:
|
|
1267
|
+
children: /* @__PURE__ */ D(se, {
|
|
1268
|
+
label: _ ? "Open app navigation" : "Hide app navigation",
|
|
1255
1269
|
side: "right",
|
|
1256
|
-
onClick: e ? r : i,
|
|
1257
|
-
children:
|
|
1270
|
+
onClick: g ? () => m((e) => !e) : e ? r : i,
|
|
1271
|
+
children: D(_ ? Le : Ie, {
|
|
1258
1272
|
className: "h-4 w-4",
|
|
1259
1273
|
strokeWidth: 1.75
|
|
1260
1274
|
})
|
|
@@ -1267,12 +1281,12 @@ function Nt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i
|
|
|
1267
1281
|
//#region src/app/front/workspaceBuiltinPlugins.ts
|
|
1268
1282
|
var Pt = /* @__PURE__ */ new Set(["plugins", "skills"]);
|
|
1269
1283
|
function Ft({ plugins: e, excludeDefaults: t }) {
|
|
1270
|
-
let n = (t ?? []).includes(
|
|
1284
|
+
let n = (t ?? []).includes(p.pluginId) ? [] : [p], r = pe({
|
|
1271
1285
|
plugins: e ?? [],
|
|
1272
1286
|
defaults: n,
|
|
1273
1287
|
excludeDefaults: t
|
|
1274
1288
|
});
|
|
1275
|
-
for (let e of r) for (let t of e.registrations.appLeftActions) if (Pt.has(t.id)) throw new
|
|
1289
|
+
for (let e of r) for (let t of e.registrations.appLeftActions) if (Pt.has(t.id)) throw new _("duplicate-id", `app-left action "${t.id}" from plugin "${e.id}" collides with a reserved workspace app-left action`);
|
|
1276
1290
|
return r;
|
|
1277
1291
|
}
|
|
1278
1292
|
//#endregion
|
|
@@ -1349,8 +1363,8 @@ function Bt(e) {
|
|
|
1349
1363
|
}
|
|
1350
1364
|
//#endregion
|
|
1351
1365
|
//#region src/app/front/WorkspaceBackgroundBoot.tsx
|
|
1352
|
-
var Vt = 500,
|
|
1353
|
-
function
|
|
1366
|
+
var Vt = 500, Ht = 1e4;
|
|
1367
|
+
function Ut(e) {
|
|
1354
1368
|
return new Promise((t, n) => {
|
|
1355
1369
|
let r, i = () => {
|
|
1356
1370
|
r && globalThis.clearTimeout(r), e.removeEventListener("abort", a);
|
|
@@ -1366,46 +1380,46 @@ function F(e) {
|
|
|
1366
1380
|
}, Vt), e.addEventListener("abort", a, { once: !0 });
|
|
1367
1381
|
});
|
|
1368
1382
|
}
|
|
1369
|
-
async function
|
|
1383
|
+
async function Wt(e) {
|
|
1370
1384
|
let t = e.body;
|
|
1371
|
-
if (!t) return
|
|
1372
|
-
let n = t.getReader(), r = new TextDecoder(),
|
|
1385
|
+
if (!t) return f(await c(e));
|
|
1386
|
+
let n = t.getReader(), r = new TextDecoder(), i = "";
|
|
1373
1387
|
try {
|
|
1374
1388
|
for (;;) {
|
|
1375
1389
|
let { done: e, value: t } = await n.read();
|
|
1376
1390
|
if (t) {
|
|
1377
|
-
|
|
1378
|
-
let n =
|
|
1391
|
+
i += r.decode(t, { stream: !e });
|
|
1392
|
+
let n = f(i);
|
|
1379
1393
|
if (n) return n;
|
|
1380
1394
|
}
|
|
1381
|
-
if (e) return
|
|
1395
|
+
if (e) return i += r.decode(), f(i);
|
|
1382
1396
|
}
|
|
1383
1397
|
} finally {
|
|
1384
1398
|
await n.cancel().catch(() => void 0);
|
|
1385
1399
|
}
|
|
1386
1400
|
}
|
|
1387
|
-
function
|
|
1401
|
+
function F(e) {
|
|
1388
1402
|
if (!(e?.runtimeDependenciesState !== "preparing" && e?.runtimeDependenciesState !== "ready" && e?.runtimeDependenciesState !== "failed")) return {
|
|
1389
1403
|
state: e.runtimeDependenciesState,
|
|
1390
1404
|
...e.runtimeDependenciesMessage ? { message: e.runtimeDependenciesMessage } : {},
|
|
1391
1405
|
...e.runtimeDependenciesRequirement ? { requirement: e.runtimeDependenciesRequirement } : {}
|
|
1392
1406
|
};
|
|
1393
1407
|
}
|
|
1394
|
-
async function
|
|
1408
|
+
async function Gt(e) {
|
|
1395
1409
|
if (!e.ok) {
|
|
1396
|
-
let t = await
|
|
1397
|
-
if (
|
|
1398
|
-
throw Error(
|
|
1410
|
+
let t = await c(e);
|
|
1411
|
+
if (r(t)) return { status: "preparing" };
|
|
1412
|
+
throw Error(u(t) ?? `/api/v1/ready-status failed with ${e.status}`);
|
|
1399
1413
|
}
|
|
1400
|
-
let t = await
|
|
1414
|
+
let t = await Wt(e), n = F(t), i = m(t);
|
|
1401
1415
|
if (t?.state === "degraded" || t?.state === "failed") {
|
|
1402
|
-
if (
|
|
1416
|
+
if (i && n?.state === "failed") return {
|
|
1403
1417
|
status: "ready",
|
|
1404
1418
|
runtimeDependencies: n
|
|
1405
1419
|
};
|
|
1406
1420
|
throw Error(t.message ?? "Workspace failed to prepare");
|
|
1407
1421
|
}
|
|
1408
|
-
return
|
|
1422
|
+
return i ? {
|
|
1409
1423
|
status: "ready",
|
|
1410
1424
|
...n ? { runtimeDependencies: n } : {}
|
|
1411
1425
|
} : {
|
|
@@ -1413,121 +1427,121 @@ async function Wt(e) {
|
|
|
1413
1427
|
...n ? { runtimeDependencies: n } : {}
|
|
1414
1428
|
};
|
|
1415
1429
|
}
|
|
1416
|
-
async function
|
|
1417
|
-
let
|
|
1418
|
-
a.aborted &&
|
|
1430
|
+
async function Kt({ apiBaseUrl: t, path: n, headers: i, signal: a, workspaceId: s }) {
|
|
1431
|
+
let l = new AbortController(), f = globalThis.setTimeout(() => l.abort(new DOMException("Warmup attempt timed out", "TimeoutError")), Ht), p = () => l.abort(a.reason);
|
|
1432
|
+
a.aborted && p(), a.addEventListener("abort", p, { once: !0 });
|
|
1419
1433
|
try {
|
|
1420
|
-
let a = await fetch(
|
|
1421
|
-
headers:
|
|
1422
|
-
signal:
|
|
1434
|
+
let a = await fetch(o(t, n), {
|
|
1435
|
+
headers: i,
|
|
1436
|
+
signal: l.signal
|
|
1423
1437
|
});
|
|
1424
|
-
if (
|
|
1425
|
-
let
|
|
1438
|
+
if (d(n)) return await Gt(a);
|
|
1439
|
+
let f = await c(a);
|
|
1426
1440
|
if (!a.ok) {
|
|
1427
|
-
let e =
|
|
1441
|
+
let e = r(f);
|
|
1428
1442
|
if (e) return {
|
|
1429
1443
|
status: "preparing",
|
|
1430
1444
|
...e
|
|
1431
1445
|
};
|
|
1432
|
-
throw Error(
|
|
1446
|
+
throw Error(u(f) ?? `${n} failed with ${a.status}`);
|
|
1433
1447
|
}
|
|
1434
|
-
return
|
|
1448
|
+
return f && typeof f == "object" && e(t, i["x-boring-workspace-id"] ?? s, n, f), { status: "ready" };
|
|
1435
1449
|
} catch (e) {
|
|
1436
1450
|
if (a.aborted) throw e;
|
|
1437
|
-
if (
|
|
1451
|
+
if (l.signal.aborted || e instanceof TypeError) return { status: "preparing" };
|
|
1438
1452
|
throw e;
|
|
1439
1453
|
} finally {
|
|
1440
|
-
globalThis.clearTimeout(
|
|
1454
|
+
globalThis.clearTimeout(f), a.removeEventListener("abort", p);
|
|
1441
1455
|
}
|
|
1442
1456
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return
|
|
1445
|
-
let
|
|
1446
|
-
async function
|
|
1457
|
+
function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r = ae, provisionWorkspace: i = !0, onStatusChange: o }) {
|
|
1458
|
+
return S(() => {
|
|
1459
|
+
let s = !1, c = new AbortController(), l = a(e, t);
|
|
1460
|
+
async function u() {
|
|
1447
1461
|
o?.({ status: "preparing" });
|
|
1448
1462
|
try {
|
|
1449
|
-
let
|
|
1450
|
-
apiBaseUrl:
|
|
1451
|
-
path:
|
|
1452
|
-
headers:
|
|
1453
|
-
signal:
|
|
1454
|
-
workspaceId:
|
|
1455
|
-
}), u = await Promise.all(
|
|
1463
|
+
let t = me(r, i), a = (t) => Kt({
|
|
1464
|
+
apiBaseUrl: n,
|
|
1465
|
+
path: t,
|
|
1466
|
+
headers: l,
|
|
1467
|
+
signal: c.signal,
|
|
1468
|
+
workspaceId: e
|
|
1469
|
+
}), u = await Promise.all(t.map(async (e) => ({
|
|
1456
1470
|
path: e,
|
|
1457
|
-
result: await
|
|
1471
|
+
result: await a(e)
|
|
1458
1472
|
})));
|
|
1459
|
-
if (
|
|
1460
|
-
let d = u.find((e) => e.result.runtimeDependencies)?.result.runtimeDependencies,
|
|
1461
|
-
for (;
|
|
1462
|
-
let
|
|
1463
|
-
for (let
|
|
1464
|
-
|
|
1473
|
+
if (s || c.signal.aborted) return;
|
|
1474
|
+
let d = u.find((e) => e.result.runtimeDependencies)?.result.runtimeDependencies, f = u.filter((e) => e.result.status === "preparing");
|
|
1475
|
+
for (; f.length > 0;) {
|
|
1476
|
+
let e;
|
|
1477
|
+
for (let t of f) if (t.result.status === "preparing" && t.result.requirement) {
|
|
1478
|
+
e = t.result.requirement;
|
|
1465
1479
|
break;
|
|
1466
1480
|
}
|
|
1467
1481
|
if (o?.({
|
|
1468
1482
|
status: "preparing",
|
|
1469
1483
|
message: "Workspace is still preparing",
|
|
1470
|
-
...
|
|
1471
|
-
}), await
|
|
1484
|
+
...e ? { requirement: e } : {}
|
|
1485
|
+
}), await Ut(c.signal), s || c.signal.aborted || (u = await Promise.all(f.map(async (e) => ({
|
|
1472
1486
|
path: e.path,
|
|
1473
|
-
result: await
|
|
1474
|
-
}))),
|
|
1475
|
-
d = u.find((e) => e.result.runtimeDependencies)?.result.runtimeDependencies ?? d,
|
|
1487
|
+
result: await a(e.path)
|
|
1488
|
+
}))), s || c.signal.aborted)) return;
|
|
1489
|
+
d = u.find((e) => e.result.runtimeDependencies)?.result.runtimeDependencies ?? d, f = u.filter((e) => e.result.status === "preparing");
|
|
1476
1490
|
}
|
|
1477
1491
|
for (o?.({
|
|
1478
1492
|
status: "ready",
|
|
1479
1493
|
...d ? { runtimeDependencies: d } : {}
|
|
1480
1494
|
}); d?.state === "preparing";) {
|
|
1481
|
-
if (await
|
|
1482
|
-
let
|
|
1483
|
-
if (
|
|
1484
|
-
d =
|
|
1495
|
+
if (await Ut(c.signal), s || c.signal.aborted) return;
|
|
1496
|
+
let e = await a("/api/v1/ready-status");
|
|
1497
|
+
if (s || c.signal.aborted) return;
|
|
1498
|
+
d = e.runtimeDependencies, d && o?.({
|
|
1485
1499
|
status: "ready",
|
|
1486
1500
|
runtimeDependencies: d
|
|
1487
1501
|
});
|
|
1488
1502
|
}
|
|
1489
|
-
} catch (
|
|
1490
|
-
if (
|
|
1503
|
+
} catch (e) {
|
|
1504
|
+
if (s || c.signal.aborted) return;
|
|
1491
1505
|
o?.({
|
|
1492
1506
|
status: "failed",
|
|
1493
|
-
message:
|
|
1507
|
+
message: e instanceof Error ? e.message : "Workspace failed to prepare"
|
|
1494
1508
|
});
|
|
1495
1509
|
}
|
|
1496
1510
|
}
|
|
1497
|
-
return
|
|
1498
|
-
|
|
1511
|
+
return u(), () => {
|
|
1512
|
+
s = !0, c.abort();
|
|
1499
1513
|
};
|
|
1500
1514
|
}, [
|
|
1501
|
-
|
|
1515
|
+
n,
|
|
1502
1516
|
o,
|
|
1517
|
+
r,
|
|
1503
1518
|
i,
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
t
|
|
1519
|
+
t,
|
|
1520
|
+
e
|
|
1507
1521
|
]), null;
|
|
1508
1522
|
}
|
|
1509
1523
|
//#endregion
|
|
1510
1524
|
//#region src/app/front/WorkspaceAgentStatusStates.tsx
|
|
1511
|
-
function
|
|
1525
|
+
function Jt({ status: e }) {
|
|
1512
1526
|
let t = e.status === "ready" ? void 0 : e.requirement, n = e.status !== "failed", r = n ? t === "workspace-fs" ? "Preparing files…" : t === "sandbox-exec" ? "Preparing secure runtime…" : t === "ui-bridge" ? "Connecting workspace…" : "Preparing workspace…" : "Workspace workbench failed", i = e.status === "failed" ? e.message : "Chat is ready while files, tools, and workspace panels finish warming up.";
|
|
1513
|
-
return /* @__PURE__ */
|
|
1527
|
+
return /* @__PURE__ */ D("div", {
|
|
1514
1528
|
className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center",
|
|
1515
|
-
children: /* @__PURE__ */
|
|
1529
|
+
children: /* @__PURE__ */ O("div", {
|
|
1516
1530
|
className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm",
|
|
1517
1531
|
children: [
|
|
1518
|
-
n ? /* @__PURE__ */
|
|
1532
|
+
n ? /* @__PURE__ */ D("div", {
|
|
1519
1533
|
className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin",
|
|
1520
1534
|
"aria-hidden": "true"
|
|
1521
1535
|
}) : null,
|
|
1522
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ D("div", {
|
|
1523
1537
|
className: "text-sm font-semibold text-foreground",
|
|
1524
1538
|
children: r
|
|
1525
1539
|
}),
|
|
1526
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ D("p", {
|
|
1527
1541
|
className: "mt-2 text-sm text-muted-foreground",
|
|
1528
1542
|
children: i
|
|
1529
1543
|
}),
|
|
1530
|
-
e.status === "failed" ? /* @__PURE__ */
|
|
1544
|
+
e.status === "failed" ? /* @__PURE__ */ D("p", {
|
|
1531
1545
|
className: "mt-3 text-xs text-muted-foreground",
|
|
1532
1546
|
children: "Reload the workspace to retry."
|
|
1533
1547
|
}) : null
|
|
@@ -1535,21 +1549,21 @@ function qt({ status: e }) {
|
|
|
1535
1549
|
})
|
|
1536
1550
|
});
|
|
1537
1551
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return /* @__PURE__ */
|
|
1552
|
+
function Yt() {
|
|
1553
|
+
return /* @__PURE__ */ D("div", {
|
|
1540
1554
|
className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center",
|
|
1541
|
-
children: /* @__PURE__ */
|
|
1555
|
+
children: /* @__PURE__ */ O("div", {
|
|
1542
1556
|
className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm",
|
|
1543
1557
|
children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ D("div", {
|
|
1545
1559
|
className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin",
|
|
1546
1560
|
"aria-hidden": "true"
|
|
1547
1561
|
}),
|
|
1548
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ D("div", {
|
|
1549
1563
|
className: "text-sm font-semibold text-foreground",
|
|
1550
1564
|
children: "Loading sessions…"
|
|
1551
1565
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ D("p", {
|
|
1553
1567
|
className: "mt-2 text-sm text-muted-foreground",
|
|
1554
1568
|
children: "Finding this workspace’s saved chats."
|
|
1555
1569
|
})
|
|
@@ -1559,39 +1573,39 @@ function Jt() {
|
|
|
1559
1573
|
}
|
|
1560
1574
|
//#endregion
|
|
1561
1575
|
//#region src/app/front/WorkspaceUiStateSync.tsx
|
|
1562
|
-
function
|
|
1576
|
+
function Xt(e) {
|
|
1563
1577
|
if (!e) return "/api/v1/ui";
|
|
1564
1578
|
let t = e.replace(/\/$/, ""), n = "/api/v1/ui";
|
|
1565
1579
|
return t.endsWith(n) ? t : `${t}${n}`;
|
|
1566
1580
|
}
|
|
1567
|
-
function Xt(e) {
|
|
1568
|
-
return `${Yt(e)}/state`;
|
|
1569
|
-
}
|
|
1570
1581
|
function Zt(e) {
|
|
1582
|
+
return `${Xt(e)}/state`;
|
|
1583
|
+
}
|
|
1584
|
+
function Qt(e) {
|
|
1571
1585
|
let t = e.openTabs.find((t) => t.id === e.activeTab)?.params?.path;
|
|
1572
1586
|
return typeof t == "string" ? t : null;
|
|
1573
1587
|
}
|
|
1574
|
-
function
|
|
1575
|
-
let o =
|
|
1576
|
-
return
|
|
1588
|
+
function $t({ bridgeEndpoint: e, requestHeaders: t, navOpen: n, surfaceOpen: r, surfaceReady: i, snapshot: a }) {
|
|
1589
|
+
let o = ce(), s = ie(), c = De(o.subscribe, o.getSnapshot, o.getSnapshot), l = De(s.subscribe, s.getSnapshot, s.getSnapshot), u = w(null);
|
|
1590
|
+
return S(() => {
|
|
1577
1591
|
if (e === null || r && !i) return;
|
|
1578
|
-
|
|
1592
|
+
u.current?.abort();
|
|
1579
1593
|
let o = new AbortController();
|
|
1580
|
-
|
|
1594
|
+
u.current = o;
|
|
1581
1595
|
let s = {
|
|
1582
1596
|
v: 1,
|
|
1583
1597
|
drawerOpen: n,
|
|
1584
1598
|
workbenchOpen: r,
|
|
1585
1599
|
openTabs: a.openTabs,
|
|
1586
1600
|
activeTab: a.activeTab,
|
|
1587
|
-
activeFile:
|
|
1601
|
+
activeFile: Qt(a),
|
|
1588
1602
|
availablePanels: c.map((e) => e.id),
|
|
1589
1603
|
availableSurfaces: l.flatMap((e) => {
|
|
1590
|
-
let t =
|
|
1604
|
+
let t = oe(e);
|
|
1591
1605
|
return t ? [t] : [];
|
|
1592
1606
|
})
|
|
1593
1607
|
};
|
|
1594
|
-
return fetch(
|
|
1608
|
+
return fetch(Zt(e), {
|
|
1595
1609
|
method: "PUT",
|
|
1596
1610
|
headers: {
|
|
1597
1611
|
...t,
|
|
@@ -1618,10 +1632,10 @@ function Qt({ bridgeEndpoint: e, requestHeaders: t, navOpen: n, surfaceOpen: r,
|
|
|
1618
1632
|
}
|
|
1619
1633
|
//#endregion
|
|
1620
1634
|
//#region src/app/front/PluginAppLeftHost.tsx
|
|
1621
|
-
function
|
|
1635
|
+
function en(e) {
|
|
1622
1636
|
return new Set(e.flatMap((e) => e.registrations.appLeftActions.map((e) => e.id)));
|
|
1623
1637
|
}
|
|
1624
|
-
function
|
|
1638
|
+
function tn(e) {
|
|
1625
1639
|
let t = /* @__PURE__ */ new Map();
|
|
1626
1640
|
for (let n of e) {
|
|
1627
1641
|
let e = t.get(n.id);
|
|
@@ -1629,8 +1643,8 @@ function en(e) {
|
|
|
1629
1643
|
t.set(n.id, n.label);
|
|
1630
1644
|
}
|
|
1631
1645
|
}
|
|
1632
|
-
function
|
|
1633
|
-
return
|
|
1646
|
+
function nn({ plugins: e, activeOverlay: t, setActiveOverlay: n }) {
|
|
1647
|
+
return C(() => e.flatMap((e) => e.registrations.appLeftActions.map((t) => ({
|
|
1634
1648
|
plugin: e,
|
|
1635
1649
|
action: t
|
|
1636
1650
|
}))).sort((e, t) => (e.action.order ?? 0) - (t.action.order ?? 0) || (e.plugin.label ?? e.plugin.id).localeCompare(t.plugin.label ?? t.plugin.id) || e.action.label.localeCompare(t.action.label) || e.action.id.localeCompare(t.action.id)).map(({ plugin: e, action: r }) => {
|
|
@@ -1638,12 +1652,12 @@ function tn({ plugins: e, activeOverlay: t, setActiveOverlay: n }) {
|
|
|
1638
1652
|
return {
|
|
1639
1653
|
id: r.id,
|
|
1640
1654
|
label: r.label,
|
|
1641
|
-
icon: i ? Te(
|
|
1655
|
+
icon: i ? Te(ue, {
|
|
1642
1656
|
pluginId: e.id,
|
|
1643
1657
|
contributionKind: "app-left-action",
|
|
1644
1658
|
contributionId: `${r.id}:icon`
|
|
1645
1659
|
}, Te(i, { className: "h-4 w-4" })) : null,
|
|
1646
|
-
trailing: a ? Te(
|
|
1660
|
+
trailing: a ? Te(ue, {
|
|
1647
1661
|
pluginId: e.id,
|
|
1648
1662
|
contributionKind: "app-left-action",
|
|
1649
1663
|
contributionId: `${r.id}:trailing`
|
|
@@ -1656,16 +1670,16 @@ function tn({ plugins: e, activeOverlay: t, setActiveOverlay: n }) {
|
|
|
1656
1670
|
};
|
|
1657
1671
|
}), [e, n]);
|
|
1658
1672
|
}
|
|
1659
|
-
function
|
|
1673
|
+
function rn({ plugins: e, activeOverlay: t, onClose: n, headerInsetStart: r, headerInsetEnd: i }) {
|
|
1660
1674
|
if (!t) return null;
|
|
1661
1675
|
let a = e.flatMap((e) => e.registrations.appLeftActions.map((t) => ({
|
|
1662
1676
|
plugin: e,
|
|
1663
1677
|
action: t
|
|
1664
1678
|
}))).find(({ action: e }) => e.id === t);
|
|
1665
|
-
return a?.action.overlay ? Te(
|
|
1679
|
+
return a?.action.overlay ? Te(_e, { value: {
|
|
1666
1680
|
headerInsetStart: !!r,
|
|
1667
1681
|
headerInsetEnd: !!i
|
|
1668
|
-
} }, Te(
|
|
1682
|
+
} }, Te(ue, {
|
|
1669
1683
|
pluginId: a.plugin.id,
|
|
1670
1684
|
contributionKind: "app-left-action",
|
|
1671
1685
|
contributionId: a.action.id
|
|
@@ -1673,18 +1687,18 @@ function nn({ plugins: e, activeOverlay: t, onClose: n, headerInsetStart: r, hea
|
|
|
1673
1687
|
}
|
|
1674
1688
|
//#endregion
|
|
1675
1689
|
//#region src/app/front/CloseLeftPaneOnAttention.tsx
|
|
1676
|
-
function
|
|
1677
|
-
let { blockers: n } =
|
|
1678
|
-
return
|
|
1690
|
+
function an({ activeSessionId: e, onAttentionOpen: t }) {
|
|
1691
|
+
let { blockers: n } = fe(), r = n.some((t) => t.sessionId && e && t.sessionId !== e ? !1 : t.focus?.closeWorkbenchLeftPane === !0), i = w(!1);
|
|
1692
|
+
return S(() => {
|
|
1679
1693
|
r && !i.current && t(), i.current = r;
|
|
1680
1694
|
}, [r, t]), null;
|
|
1681
1695
|
}
|
|
1682
1696
|
//#endregion
|
|
1683
1697
|
//#region src/app/front/chatPaneState.ts
|
|
1684
|
-
function
|
|
1698
|
+
function on(e) {
|
|
1685
1699
|
return typeof e?.id == "string" ? e.id : null;
|
|
1686
1700
|
}
|
|
1687
|
-
function
|
|
1701
|
+
function sn(e, t, n) {
|
|
1688
1702
|
if (e.includes(n)) return e;
|
|
1689
1703
|
let r = t ? e.indexOf(t) : -1, i = r >= 0 ? r + 1 : e.length;
|
|
1690
1704
|
return [
|
|
@@ -1693,7 +1707,7 @@ function on(e, t, n) {
|
|
|
1693
1707
|
...e.slice(i)
|
|
1694
1708
|
];
|
|
1695
1709
|
}
|
|
1696
|
-
function
|
|
1710
|
+
function cn(e, t, n) {
|
|
1697
1711
|
if (e.includes(n)) return e;
|
|
1698
1712
|
if (e.length === 0) return [n];
|
|
1699
1713
|
let r = t ? e.indexOf(t) : -1, i = r >= 0 ? r : 0;
|
|
@@ -1701,46 +1715,46 @@ function sn(e, t, n) {
|
|
|
1701
1715
|
}
|
|
1702
1716
|
//#endregion
|
|
1703
1717
|
//#region src/app/front/WorkspaceAgentFront.tsx
|
|
1704
|
-
function
|
|
1718
|
+
function ln(e, t) {
|
|
1705
1719
|
return e.endsWith(":surface") ? e.slice(0, -8) : t;
|
|
1706
1720
|
}
|
|
1707
|
-
function
|
|
1708
|
-
let [r, i] =
|
|
1709
|
-
return
|
|
1710
|
-
i(
|
|
1721
|
+
function un(e, t, n) {
|
|
1722
|
+
let [r, i] = T(() => Se(e, t, n));
|
|
1723
|
+
return S(() => {
|
|
1724
|
+
i(Se(e, t, n));
|
|
1711
1725
|
}, [
|
|
1712
1726
|
e,
|
|
1713
1727
|
t,
|
|
1714
1728
|
n
|
|
1715
|
-
]), [r,
|
|
1729
|
+
]), [r, x((t) => {
|
|
1716
1730
|
i((r) => {
|
|
1717
1731
|
let i = typeof t == "function" ? t(r) : t;
|
|
1718
|
-
return
|
|
1732
|
+
return ve(e, i, n), i;
|
|
1719
1733
|
});
|
|
1720
1734
|
}, [n, e])];
|
|
1721
1735
|
}
|
|
1722
|
-
function
|
|
1723
|
-
let [r, i] =
|
|
1724
|
-
return
|
|
1725
|
-
i(
|
|
1736
|
+
function dn(e, t, n) {
|
|
1737
|
+
let [r, i] = T(() => be(e, t, n));
|
|
1738
|
+
return S(() => {
|
|
1739
|
+
i(be(e, t, n));
|
|
1726
1740
|
}, [
|
|
1727
1741
|
e,
|
|
1728
1742
|
t,
|
|
1729
1743
|
n
|
|
1730
|
-
]), [r,
|
|
1731
|
-
i(t),
|
|
1744
|
+
]), [r, x((t) => {
|
|
1745
|
+
i(t), ge(e, t, n);
|
|
1732
1746
|
}, [n, e])];
|
|
1733
1747
|
}
|
|
1734
|
-
var
|
|
1735
|
-
function
|
|
1748
|
+
var fn = {}, pn = [], mn = { status: "preparing" };
|
|
1749
|
+
function hn(e, t, n) {
|
|
1736
1750
|
return Math.min(n, Math.max(t, e));
|
|
1737
1751
|
}
|
|
1738
|
-
var
|
|
1752
|
+
var gn = {
|
|
1739
1753
|
openTabs: [],
|
|
1740
1754
|
activeTab: null
|
|
1741
1755
|
};
|
|
1742
|
-
function
|
|
1743
|
-
let t = e.workspaceId ??
|
|
1756
|
+
function _n(e) {
|
|
1757
|
+
let t = e.workspaceId ?? vn(e.requestHeaders) ?? e.storageKey, n = tt({
|
|
1744
1758
|
apiBaseUrl: e.apiBaseUrl,
|
|
1745
1759
|
workspaceId: t,
|
|
1746
1760
|
storageScope: t,
|
|
@@ -1754,21 +1768,21 @@ function gn(e) {
|
|
|
1754
1768
|
workspaceId: n.dataStorageScope
|
|
1755
1769
|
};
|
|
1756
1770
|
}
|
|
1757
|
-
function
|
|
1771
|
+
function vn(e) {
|
|
1758
1772
|
return e?.["x-boring-workspace-id"] ?? e?.["X-Boring-Workspace-Id"] ?? null;
|
|
1759
1773
|
}
|
|
1760
|
-
function
|
|
1774
|
+
function yn(e) {
|
|
1761
1775
|
let t = e.reloaded ? "Extensions reloaded." : "Extensions will reload on the next message.", n = Array.isArray(e.diagnostics) ? e.diagnostics.map((e) => e.message).filter((e) => !!e) : [];
|
|
1762
1776
|
return n.length > 0 ? `${t}\n\nWarnings:\n${n.join("\n")}` : t;
|
|
1763
1777
|
}
|
|
1764
|
-
function
|
|
1778
|
+
function bn(e) {
|
|
1765
1779
|
try {
|
|
1766
1780
|
return globalThis.localStorage?.getItem(e) ?? null;
|
|
1767
1781
|
} catch {
|
|
1768
1782
|
return null;
|
|
1769
1783
|
}
|
|
1770
1784
|
}
|
|
1771
|
-
function
|
|
1785
|
+
function xn(e, t) {
|
|
1772
1786
|
try {
|
|
1773
1787
|
let n = globalThis.localStorage?.getItem(e);
|
|
1774
1788
|
if (!n) return null;
|
|
@@ -1782,7 +1796,7 @@ function bn(e, t) {
|
|
|
1782
1796
|
return null;
|
|
1783
1797
|
}
|
|
1784
1798
|
}
|
|
1785
|
-
function
|
|
1799
|
+
function Sn(e, t) {
|
|
1786
1800
|
try {
|
|
1787
1801
|
if (t.ids.length === 0) {
|
|
1788
1802
|
globalThis.localStorage?.removeItem(e);
|
|
@@ -1794,7 +1808,7 @@ function xn(e, t) {
|
|
|
1794
1808
|
}));
|
|
1795
1809
|
} catch {}
|
|
1796
1810
|
}
|
|
1797
|
-
function
|
|
1811
|
+
function Cn(e, t) {
|
|
1798
1812
|
try {
|
|
1799
1813
|
let n = globalThis.localStorage?.getItem(e);
|
|
1800
1814
|
if (!n) return null;
|
|
@@ -1807,7 +1821,7 @@ function Sn(e, t) {
|
|
|
1807
1821
|
return null;
|
|
1808
1822
|
}
|
|
1809
1823
|
}
|
|
1810
|
-
function
|
|
1824
|
+
function wn(e, t) {
|
|
1811
1825
|
try {
|
|
1812
1826
|
if (t.length === 0) {
|
|
1813
1827
|
globalThis.localStorage?.removeItem(e);
|
|
@@ -1816,94 +1830,94 @@ function Cn(e, t) {
|
|
|
1816
1830
|
globalThis.localStorage?.setItem(e, JSON.stringify({ ids: t }));
|
|
1817
1831
|
} catch {}
|
|
1818
1832
|
}
|
|
1819
|
-
function
|
|
1820
|
-
let mt =
|
|
1821
|
-
...i ??
|
|
1822
|
-
...
|
|
1833
|
+
function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, sessionStorageKey: o, providerStorageKey: c, surfaceStorageKey: u, beforeShell: d, afterShell: f, panels: p, commands: m, catalogs: h, plugins: g, excludeDefaults: _, capabilities: v, apiBaseUrl: y, authHeaders: ne, apiTimeout: re, defaultTheme: ie, onThemeChange: ae, persistenceEnabled: oe, debug: se, bridgeEndpoint: ce, fullPageBasePath: ue, onAuthError: de, sessions: fe, activeSessionId: pe, onSwitchSession: me, onCreateSession: b, onDeleteSession: ge, onActiveSessionIdChange: _e, appTitle: ve = "Boring UI", workspaceLabel: be, workspaceSectionTitle: Se = "Workspaces", appLeftLayoutMode: Ce = "single-project", appLeftHeaderMode: Te = "full", appLeftProjects: Ee, appLeftActiveProjectId: De, onSwitchAppLeftProject: Oe, onOpenAppLeftProjectSession: ke, onShowMoreAppLeftProjectSessions: Ae, onCreateAppLeftProject: je, onOpenAppLeftProjectSettings: Me, onOpenAppLeftProjectInNewTab: Ne, defaultSessionTitle: k = "New session", workspaceLayout: Pe = "classic", navEnabled: Fe = !0, defaultNavOpen: Ie = !1, defaultAppLeftPaneCollapsed: Le, defaultSurfaceOpen: Re, defaultWorkbenchLeftTab: ze, defaultWorkbenchLeftOpen: Ve, surfaceInitialPanels: He, topBarLeft: Ue, topBarRight: We, showThemeToggle: Ke = !0, defaultLeftOverlay: qe = null, showSkills: Je = !0, showPlugins: Ye = !0, appLeftActions: Xe, appLeftOverlayActions: A, chatParams: j, externalPlugins: Ze, hotReloadEnabled: Qe, frontPluginHotReload: tt, extraPanels: rt, extraCommands: at, provisionWorkspace: ot, bootPreloadPaths: st, onWorkspaceWarmupStatusChange: ct, onOpenNav: lt, onOpenSurface: ut, surfaceButtonBottomOffset: dt, mobileShellEnabled: ft = !0, className: pt }) {
|
|
1834
|
+
let mt = he(), gt = ft && mt < 640, _t = Ze !== !1, yt = _t ? tt : !1, bt = _t ? Qe : !1, xt = c ?? `boring-ui-v2:layout:${e}`, M = u ?? `${xt}:surface`, St = ln(M, xt), N = oe !== !1, P = Pe === "plugin-tabs", Ct = Je !== !1, wt = Ye !== !1, Tt = p, Et = o ?? `boring-workspace:sessions:${e}`, Dt = C(() => a(e, i ?? fn), [i, e]), Ot = C(() => a(e, {
|
|
1835
|
+
...i ?? fn,
|
|
1836
|
+
...ne ?? fn
|
|
1823
1837
|
}), [
|
|
1824
|
-
|
|
1838
|
+
ne,
|
|
1825
1839
|
i,
|
|
1826
1840
|
e
|
|
1827
|
-
]),
|
|
1841
|
+
]), kt = C(() => zt({ storageKey: Et }), [Et]), At = Bt(kt), [Mt, Pt] = T(() => ({
|
|
1828
1842
|
workspaceId: e,
|
|
1829
|
-
status:
|
|
1830
|
-
})), [
|
|
1843
|
+
status: mn
|
|
1844
|
+
})), [It, Lt] = T(() => ({
|
|
1831
1845
|
workspaceId: e,
|
|
1832
1846
|
expired: !1
|
|
1833
|
-
})), [
|
|
1847
|
+
})), [Rt, Vt] = T(() => ({
|
|
1834
1848
|
workspaceId: e,
|
|
1835
1849
|
creating: !1
|
|
1836
|
-
})), [
|
|
1850
|
+
})), [Ht, Ut] = T(() => ({
|
|
1837
1851
|
workspaceId: e,
|
|
1838
1852
|
failed: !1
|
|
1839
|
-
})),
|
|
1853
|
+
})), Wt = `boring-workspace:chat-panes:${e}`, [F, Gt] = T(() => (N ? xn(Wt, e) : null) ?? {
|
|
1840
1854
|
workspaceId: e,
|
|
1841
1855
|
ids: [],
|
|
1842
1856
|
activeId: null
|
|
1843
|
-
}), [
|
|
1844
|
-
|
|
1845
|
-
if (!
|
|
1846
|
-
let e = setTimeout(() =>
|
|
1857
|
+
}), [Kt, Xt] = T(null);
|
|
1858
|
+
S(() => {
|
|
1859
|
+
if (!Kt) return;
|
|
1860
|
+
let e = setTimeout(() => Xt(null), 700);
|
|
1847
1861
|
return () => clearTimeout(e);
|
|
1848
|
-
}, [
|
|
1849
|
-
let
|
|
1862
|
+
}, [Kt]);
|
|
1863
|
+
let Zt = `boring-workspace:pinned-sessions:${e}`, [Qt, vn] = T(() => (N ? Cn(Zt, e) : null) ?? {
|
|
1850
1864
|
workspaceId: e,
|
|
1851
1865
|
ids: []
|
|
1852
|
-
}),
|
|
1853
|
-
|
|
1854
|
-
|
|
1866
|
+
}), Tn = Qt.workspaceId === e ? Qt.ids : pn;
|
|
1867
|
+
S(() => {
|
|
1868
|
+
vn((t) => t.workspaceId === e ? t : (N ? Cn(Zt, e) : null) ?? {
|
|
1855
1869
|
workspaceId: e,
|
|
1856
1870
|
ids: []
|
|
1857
1871
|
});
|
|
1858
1872
|
}, [
|
|
1859
|
-
|
|
1860
|
-
|
|
1873
|
+
Zt,
|
|
1874
|
+
N,
|
|
1861
1875
|
e
|
|
1862
1876
|
]);
|
|
1863
|
-
let
|
|
1864
|
-
|
|
1877
|
+
let En = x((t) => {
|
|
1878
|
+
vn((n) => {
|
|
1865
1879
|
let r = n.workspaceId === e ? n.ids : [], i = r.includes(t) ? r.filter((e) => e !== t) : [t, ...r];
|
|
1866
|
-
return
|
|
1880
|
+
return N && wn(Zt, i), {
|
|
1867
1881
|
workspaceId: e,
|
|
1868
1882
|
ids: i
|
|
1869
1883
|
};
|
|
1870
1884
|
});
|
|
1871
1885
|
}, [
|
|
1872
|
-
|
|
1873
|
-
|
|
1886
|
+
Zt,
|
|
1887
|
+
N,
|
|
1874
1888
|
e
|
|
1875
1889
|
]);
|
|
1876
|
-
|
|
1877
|
-
|
|
1890
|
+
S(() => {
|
|
1891
|
+
N && F.workspaceId === e && Sn(Wt, F);
|
|
1878
1892
|
}, [
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1893
|
+
F,
|
|
1894
|
+
Wt,
|
|
1895
|
+
N,
|
|
1882
1896
|
e
|
|
1883
|
-
]),
|
|
1884
|
-
|
|
1897
|
+
]), S(() => {
|
|
1898
|
+
Gt((t) => t.workspaceId === e ? t : (N ? xn(Wt, e) : null) ?? {
|
|
1885
1899
|
workspaceId: e,
|
|
1886
1900
|
ids: [],
|
|
1887
1901
|
activeId: null
|
|
1888
1902
|
});
|
|
1889
1903
|
}, [
|
|
1890
|
-
|
|
1891
|
-
|
|
1904
|
+
Wt,
|
|
1905
|
+
N,
|
|
1892
1906
|
e
|
|
1893
1907
|
]);
|
|
1894
|
-
let
|
|
1895
|
-
requestHeaders:
|
|
1896
|
-
storageKey:
|
|
1908
|
+
let Dn = Mt.workspaceId === e ? Mt.status : mn, On = t ?? $e, kn = r ?? _n, An = !t || !!r, jn = An && ot !== !1, Mn = () => void 0, I = kn({
|
|
1909
|
+
requestHeaders: Dt,
|
|
1910
|
+
storageKey: Et,
|
|
1897
1911
|
workspaceId: e,
|
|
1898
|
-
apiBaseUrl:
|
|
1899
|
-
enabled:
|
|
1900
|
-
}), [
|
|
1912
|
+
apiBaseUrl: y,
|
|
1913
|
+
enabled: jn
|
|
1914
|
+
}), [Nn, L] = T(() => ({
|
|
1901
1915
|
workspaceId: e,
|
|
1902
1916
|
sessions: [],
|
|
1903
1917
|
activeSessionId: null
|
|
1904
|
-
})),
|
|
1905
|
-
|
|
1906
|
-
|
|
1918
|
+
})), Pn = jn && I.workspaceId != null && I.workspaceId !== e, R = jn && !I.loading && !I.error && !Pn, z = jn && !R;
|
|
1919
|
+
S(() => {
|
|
1920
|
+
R && L((t) => {
|
|
1907
1921
|
let n = t.workspaceId === e, r = t.activeSessionId === I.activeSessionId, i = t.sessions.length === I.sessions.length && t.sessions.every((e, t) => e.id === I.sessions[t]?.id);
|
|
1908
1922
|
return n && r && i ? t : {
|
|
1909
1923
|
workspaceId: e,
|
|
@@ -1914,151 +1928,151 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
1914
1928
|
}, [
|
|
1915
1929
|
I.activeSessionId,
|
|
1916
1930
|
I.sessions,
|
|
1917
|
-
|
|
1931
|
+
R,
|
|
1918
1932
|
e
|
|
1919
1933
|
]);
|
|
1920
|
-
let
|
|
1921
|
-
|
|
1922
|
-
if (!
|
|
1923
|
-
|
|
1934
|
+
let Fn = z && Nn.workspaceId === e && Nn.sessions.length > 0, In = z ? bn(Et) : null, Ln = z && !Pn ? I.activeSessionId ?? null : null, B = R ? I.sessions : Fn ? Nn.sessions : [], Rn = R ? I.activeSessionId : Fn ? Nn.activeSessionId : null, V = An && (R || Fn) ? I : void 0, zn = fe !== void 0 || pe !== void 0 || me !== void 0 || b !== void 0 || ge !== void 0, Bn = It.workspaceId === e && It.expired, Vn = w(!1), Hn = !!(R && V && !zn && B.length === 0 && !Bn), Un = Rt.workspaceId === e && Rt.creating, Wn = Ht.workspaceId === e && Ht.failed, Gn = !!(R && V && !zn && B.length === 0 && Bn && !Vn.current && !Wn), Kn = !!(z && I.loading && !I.error && An && !zn && !Fn && !In && !Ln) || Hn || Un || Gn;
|
|
1935
|
+
S(() => {
|
|
1936
|
+
if (!Hn) {
|
|
1937
|
+
It.workspaceId !== e && Lt({
|
|
1924
1938
|
workspaceId: e,
|
|
1925
1939
|
expired: !1
|
|
1926
1940
|
});
|
|
1927
1941
|
return;
|
|
1928
1942
|
}
|
|
1929
|
-
|
|
1943
|
+
Lt({
|
|
1930
1944
|
workspaceId: e,
|
|
1931
1945
|
expired: !1
|
|
1932
1946
|
});
|
|
1933
1947
|
let t = globalThis.setTimeout(() => {
|
|
1934
|
-
|
|
1948
|
+
Lt({
|
|
1935
1949
|
workspaceId: e,
|
|
1936
1950
|
expired: !0
|
|
1937
1951
|
});
|
|
1938
1952
|
}, 2e3);
|
|
1939
1953
|
return () => globalThis.clearTimeout(t);
|
|
1940
1954
|
}, [
|
|
1941
|
-
|
|
1942
|
-
|
|
1955
|
+
It.workspaceId,
|
|
1956
|
+
Hn,
|
|
1943
1957
|
e
|
|
1944
1958
|
]);
|
|
1945
|
-
let
|
|
1959
|
+
let qn = V ? B.map((e) => ({
|
|
1946
1960
|
...e,
|
|
1947
1961
|
title: e.title ?? "New session"
|
|
1948
|
-
})) : void 0,
|
|
1949
|
-
id:
|
|
1962
|
+
})) : void 0, Jn = In ? [{
|
|
1963
|
+
id: In,
|
|
1950
1964
|
title: "Loading sessions…",
|
|
1951
1965
|
createdAt: (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
1952
1966
|
updatedAt: (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
1953
1967
|
turnCount: 0
|
|
1954
|
-
}] : [], H = V ?
|
|
1955
|
-
|
|
1956
|
-
if (
|
|
1957
|
-
|
|
1968
|
+
}] : [], H = V ? qn ?? [] : z ? Jn : zn ? fe ?? [] : At.sessions, Yn = V ? Rn ?? null : z ? In ?? Ln : zn ? pe ?? null : At.activeId, Xn = j?.autoSubmitInitialDraft === !0, Zn = Xn && An && !zn, [U, Qn] = T(() => Zn ? null : void 0), $n = w(e), er = w(!1);
|
|
1969
|
+
S(() => {
|
|
1970
|
+
if ($n.current !== e) {
|
|
1971
|
+
$n.current = e, er.current = !1, Qn(Zn ? null : void 0);
|
|
1958
1972
|
return;
|
|
1959
1973
|
}
|
|
1960
|
-
|
|
1974
|
+
Zn && U === void 0 && (er.current = !1, Qn(null));
|
|
1961
1975
|
}, [
|
|
1962
1976
|
U,
|
|
1963
|
-
|
|
1977
|
+
Zn,
|
|
1964
1978
|
e
|
|
1965
|
-
]),
|
|
1966
|
-
!V || U !== null ||
|
|
1979
|
+
]), S(() => {
|
|
1980
|
+
!V || U !== null || er.current || (er.current = !0, Promise.resolve(V.create({ title: k })).then((e) => {
|
|
1967
1981
|
if (typeof e?.id != "string") throw Error("auto_submit_session_create_failed");
|
|
1968
|
-
|
|
1982
|
+
Qn(e.id);
|
|
1969
1983
|
}).catch(() => {
|
|
1970
|
-
|
|
1984
|
+
er.current = !1, Qn(void 0);
|
|
1971
1985
|
}));
|
|
1972
1986
|
}, [
|
|
1973
1987
|
U,
|
|
1974
|
-
|
|
1988
|
+
k,
|
|
1975
1989
|
V
|
|
1976
1990
|
]);
|
|
1977
|
-
let W = U === void 0 ?
|
|
1991
|
+
let W = U === void 0 ? Yn : U ?? null, G = z ? Mn : V?.switch ?? me ?? kt.switchTo, tr = x((e) => (W && e !== W && n({
|
|
1978
1992
|
sessionId: W,
|
|
1979
|
-
reason:
|
|
1980
|
-
}), G(e)), [W, G]),
|
|
1981
|
-
if (V &&
|
|
1982
|
-
if (V && !
|
|
1983
|
-
if (V.hasMore) return
|
|
1984
|
-
if (
|
|
1985
|
-
|
|
1993
|
+
reason: ee.sessionSwitch
|
|
1994
|
+
}), G(e)), [W, G]), nr = z ? Mn : V ? () => V.create() : b ? () => b() : () => kt.create(), rr = z ? Mn : V?.delete ?? ge ?? kt.remove, ir = x((t) => {
|
|
1995
|
+
if (V && z && B.length <= 1) return Vn.current = !0, rr(t);
|
|
1996
|
+
if (V && !z && B.length <= 1) {
|
|
1997
|
+
if (V.hasMore) return Vn.current = !0, rr(t);
|
|
1998
|
+
if (wr.current.has(t)) return Promise.resolve();
|
|
1999
|
+
wr.current.add(t), Cr.current = !0, Ut({
|
|
1986
2000
|
workspaceId: e,
|
|
1987
2001
|
failed: !1
|
|
1988
2002
|
});
|
|
1989
|
-
let n = V.create({ title:
|
|
1990
|
-
return Promise.resolve(n && typeof n.then == "function" ? Promise.resolve(n).then(() =>
|
|
1991
|
-
throw
|
|
2003
|
+
let n = V.create({ title: k });
|
|
2004
|
+
return Promise.resolve(n && typeof n.then == "function" ? Promise.resolve(n).then(() => rr(t)) : rr(t)).catch((t) => {
|
|
2005
|
+
throw Cr.current = !1, Ut({
|
|
1992
2006
|
workspaceId: e,
|
|
1993
2007
|
failed: !0
|
|
1994
2008
|
}), t;
|
|
1995
2009
|
}).finally(() => {
|
|
1996
|
-
|
|
2010
|
+
wr.current.delete(t);
|
|
1997
2011
|
});
|
|
1998
2012
|
}
|
|
1999
|
-
return
|
|
2013
|
+
return rr(t);
|
|
2000
2014
|
}, [
|
|
2001
2015
|
B.length,
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2016
|
+
k,
|
|
2017
|
+
rr,
|
|
2018
|
+
z,
|
|
2005
2019
|
V,
|
|
2006
2020
|
e
|
|
2007
|
-
]),
|
|
2008
|
-
plugins:
|
|
2009
|
-
excludeDefaults:
|
|
2010
|
-
}), [
|
|
2011
|
-
|
|
2012
|
-
let e = !!(q &&
|
|
2013
|
-
(q === "skills" && !
|
|
2021
|
+
]), ar = H.find((e) => e.id === W)?.title ?? void 0, [or, sr] = dn(`${St}:drawer`, Ie, N), [cr, lr] = dn(`${St}:appLeftPaneCollapsed`, Le ?? !1, N), [ur, dr] = un(`${St}:appLeftPaneWidth`, 268, N), fr = hn(ur, 220, 420), K = C(() => Ft({
|
|
2022
|
+
plugins: g,
|
|
2023
|
+
excludeDefaults: _
|
|
2024
|
+
}), [_, g]), [q, J] = T(qe), pr = C(() => en(K), [K]);
|
|
2025
|
+
S(() => {
|
|
2026
|
+
let e = !!(q && A?.some((e) => e.id === q));
|
|
2027
|
+
(q === "skills" && !Ct || q === "plugins" && !wt || q !== null && q !== "skills" && q !== "plugins" && !pr.has(q) && !e) && J(null);
|
|
2014
2028
|
}, [
|
|
2015
|
-
|
|
2029
|
+
A,
|
|
2016
2030
|
q,
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2031
|
+
pr,
|
|
2032
|
+
wt,
|
|
2033
|
+
Ct
|
|
2020
2034
|
]);
|
|
2021
|
-
let
|
|
2022
|
-
|
|
2023
|
-
}, [
|
|
2024
|
-
|
|
2025
|
-
let [
|
|
2026
|
-
key:
|
|
2027
|
-
snapshot:
|
|
2028
|
-
})),
|
|
2029
|
-
|
|
2030
|
-
|
|
2035
|
+
let mr = Fe && or, [Y, X] = dn(`${St}:workbenchOpen`, Re ?? !1, N), [hr, gr] = T(!1), [_r, vr] = dn(`${St}:workbenchLeftOpen`, Ve ?? !1, N), [yr, br] = T(() => Ve ?? !1), xr = Ve === !1 ? yr : _r, Sr = x(() => {
|
|
2036
|
+
vr(!1), br(!1), J(null);
|
|
2037
|
+
}, [vr]), Cr = w(!1), wr = w(/* @__PURE__ */ new Set()), Tr = w(null), Er = w(Y), Dr = w(M), Or = w(null), kr = w([]);
|
|
2038
|
+
Dr.current = M;
|
|
2039
|
+
let [Ar, jr] = T(() => ({
|
|
2040
|
+
key: M,
|
|
2041
|
+
snapshot: gn
|
|
2042
|
+
})), Mr = Ar.key === M ? Ar.snapshot : gn;
|
|
2043
|
+
S(() => {
|
|
2044
|
+
Cr.current = !1, wr.current.clear(), Vn.current = !1, Vt({
|
|
2031
2045
|
workspaceId: e,
|
|
2032
2046
|
creating: !1
|
|
2033
|
-
}),
|
|
2047
|
+
}), Ut({
|
|
2034
2048
|
workspaceId: e,
|
|
2035
2049
|
failed: !1
|
|
2036
2050
|
});
|
|
2037
|
-
}, [e]),
|
|
2038
|
-
|
|
2039
|
-
}, [
|
|
2040
|
-
if (!(!V || V.loading) && !
|
|
2051
|
+
}, [e]), S(() => {
|
|
2052
|
+
gr(!1), kr.current = [];
|
|
2053
|
+
}, [M]), S(() => {
|
|
2054
|
+
if (!(!V || V.loading) && !Hn && U === void 0) {
|
|
2041
2055
|
if (B.length > 0) {
|
|
2042
|
-
|
|
2056
|
+
Cr.current = !1, Vn.current = !1, Vt((t) => t.workspaceId === e && t.creating ? {
|
|
2043
2057
|
workspaceId: e,
|
|
2044
2058
|
creating: !1
|
|
2045
|
-
} : t),
|
|
2059
|
+
} : t), Ut((t) => t.workspaceId === e && t.failed ? {
|
|
2046
2060
|
workspaceId: e,
|
|
2047
2061
|
failed: !1
|
|
2048
2062
|
} : t);
|
|
2049
2063
|
return;
|
|
2050
2064
|
}
|
|
2051
|
-
|
|
2065
|
+
Vn.current || Cr.current || (Cr.current = !0, Vt({
|
|
2052
2066
|
workspaceId: e,
|
|
2053
2067
|
creating: !0
|
|
2054
|
-
}),
|
|
2068
|
+
}), Ut({
|
|
2055
2069
|
workspaceId: e,
|
|
2056
2070
|
failed: !1
|
|
2057
|
-
}), Promise.resolve(V.create({ title:
|
|
2058
|
-
|
|
2071
|
+
}), Promise.resolve(V.create({ title: k })).catch(() => {
|
|
2072
|
+
Cr.current = !1, Vt({
|
|
2059
2073
|
workspaceId: e,
|
|
2060
2074
|
creating: !1
|
|
2061
|
-
}),
|
|
2075
|
+
}), Ut({
|
|
2062
2076
|
workspaceId: e,
|
|
2063
2077
|
failed: !0
|
|
2064
2078
|
});
|
|
@@ -2067,102 +2081,102 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2067
2081
|
}, [
|
|
2068
2082
|
B.length,
|
|
2069
2083
|
U,
|
|
2070
|
-
|
|
2071
|
-
|
|
2084
|
+
k,
|
|
2085
|
+
Hn,
|
|
2072
2086
|
V,
|
|
2073
2087
|
e
|
|
2074
|
-
]),
|
|
2075
|
-
|
|
2088
|
+
]), S(() => {
|
|
2089
|
+
Er.current = Y;
|
|
2076
2090
|
}, [Y]);
|
|
2077
|
-
let
|
|
2078
|
-
|
|
2079
|
-
key:
|
|
2091
|
+
let Nr = x((e) => {
|
|
2092
|
+
Or.current = {
|
|
2093
|
+
key: M,
|
|
2080
2094
|
api: e
|
|
2081
|
-
},
|
|
2082
|
-
key:
|
|
2095
|
+
}, gr(!0), jr({
|
|
2096
|
+
key: M,
|
|
2083
2097
|
snapshot: e.getSnapshot()
|
|
2084
2098
|
});
|
|
2085
|
-
let t =
|
|
2099
|
+
let t = kr.current.splice(0);
|
|
2086
2100
|
for (let n of t) n(e);
|
|
2087
|
-
}, [
|
|
2088
|
-
|
|
2089
|
-
}, []),
|
|
2090
|
-
|
|
2091
|
-
key:
|
|
2101
|
+
}, [M]), Pr = x((e) => {
|
|
2102
|
+
kr.current.push(e);
|
|
2103
|
+
}, []), Fr = x((e) => {
|
|
2104
|
+
jr({
|
|
2105
|
+
key: M,
|
|
2092
2106
|
snapshot: e
|
|
2093
2107
|
});
|
|
2094
|
-
}, [
|
|
2095
|
-
let e =
|
|
2096
|
-
return e?.key ===
|
|
2097
|
-
}, []),
|
|
2098
|
-
|
|
2099
|
-
}, [X]),
|
|
2100
|
-
|
|
2101
|
-
}, [X,
|
|
2102
|
-
|
|
2103
|
-
}, [X]),
|
|
2108
|
+
}, [M]), Ir = x(() => {
|
|
2109
|
+
let e = Or.current;
|
|
2110
|
+
return e?.key === Dr.current ? e.api : null;
|
|
2111
|
+
}, []), Lr = x(() => Er.current, []), Rr = x(() => {
|
|
2112
|
+
Er.current = !0, X(!0);
|
|
2113
|
+
}, [X]), zr = x(() => {
|
|
2114
|
+
Er.current = !0, X(!0), vr(!0), br(!0);
|
|
2115
|
+
}, [X, vr]), Br = x(() => {
|
|
2116
|
+
Er.current = !1, Or.current = null, gr(!1), X(!1);
|
|
2117
|
+
}, [X]), Vr = w(/* @__PURE__ */ new Set()), Hr = w(() => void 0), Ur = x((e) => {
|
|
2104
2118
|
let t = e.meta;
|
|
2105
2119
|
if (!t || t.openOnlyWhenSessionOpen !== !0) return !0;
|
|
2106
2120
|
let n = typeof t.sessionId == "string" ? t.sessionId : null;
|
|
2107
|
-
return n ? (
|
|
2108
|
-
}, []),
|
|
2109
|
-
surface:
|
|
2110
|
-
isWorkbenchOpen:
|
|
2111
|
-
openWorkbench:
|
|
2112
|
-
openWorkbenchSources:
|
|
2113
|
-
closeWorkbench:
|
|
2114
|
-
enqueue:
|
|
2115
|
-
shouldOpenSurface:
|
|
2121
|
+
return n ? (Vr.current.has(n) || Hr.current(n), !0) : !1;
|
|
2122
|
+
}, []), Wr = C(() => ({
|
|
2123
|
+
surface: Ir,
|
|
2124
|
+
isWorkbenchOpen: Lr,
|
|
2125
|
+
openWorkbench: Rr,
|
|
2126
|
+
openWorkbenchSources: zr,
|
|
2127
|
+
closeWorkbench: Br,
|
|
2128
|
+
enqueue: Pr,
|
|
2129
|
+
shouldOpenSurface: Ur
|
|
2116
2130
|
}), [
|
|
2117
|
-
Mr,
|
|
2118
|
-
Nr,
|
|
2119
|
-
Pr,
|
|
2120
|
-
Fr,
|
|
2121
2131
|
Ir,
|
|
2122
|
-
|
|
2123
|
-
|
|
2132
|
+
Lr,
|
|
2133
|
+
Rr,
|
|
2134
|
+
zr,
|
|
2135
|
+
Br,
|
|
2136
|
+
Pr,
|
|
2137
|
+
Ur
|
|
2124
2138
|
]);
|
|
2125
|
-
|
|
2126
|
-
if (
|
|
2127
|
-
let t = (t) => t.openPanel(e), n =
|
|
2128
|
-
n ? t(n) :
|
|
2139
|
+
x((e) => {
|
|
2140
|
+
if (Er.current = !0, X(!0), ut?.(), !e) return;
|
|
2141
|
+
let t = (t) => t.openPanel(e), n = Ir();
|
|
2142
|
+
n ? t(n) : Pr(t);
|
|
2129
2143
|
}, [
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2144
|
+
Pr,
|
|
2145
|
+
Ir,
|
|
2146
|
+
ut,
|
|
2133
2147
|
X
|
|
2134
2148
|
]);
|
|
2135
|
-
let
|
|
2136
|
-
openFile: async (e, t) => (
|
|
2149
|
+
let Gr = C(() => ({
|
|
2150
|
+
openFile: async (e, t) => (s({
|
|
2137
2151
|
kind: "openFile",
|
|
2138
2152
|
params: {
|
|
2139
2153
|
path: e,
|
|
2140
2154
|
...t?.filesystem ? { filesystem: t.filesystem } : {}
|
|
2141
2155
|
}
|
|
2142
|
-
},
|
|
2156
|
+
}, Wr), {
|
|
2143
2157
|
seq: 0,
|
|
2144
2158
|
status: "ok"
|
|
2145
2159
|
}),
|
|
2146
|
-
getActiveFile: () =>
|
|
2160
|
+
getActiveFile: () => Ir()?.getSnapshot().activeTab ?? null,
|
|
2147
2161
|
select: () => () => {}
|
|
2148
|
-
}), [
|
|
2162
|
+
}), [Ir, Wr]), Kr = C(() => !P && K.some((e) => e.registrations.workspaceSources.length > 0), [K, P]), qr = C(() => K.flatMap((e) => e.registrations.panels.map((e) => e.id)), [K]), Jr = C(() => {
|
|
2149
2163
|
let e = {};
|
|
2150
2164
|
for (let t of K) for (let n of t.registrations.toolRenderers) e[n.id] = n.render;
|
|
2151
2165
|
return e;
|
|
2152
|
-
}, [K]),
|
|
2153
|
-
|
|
2154
|
-
if (
|
|
2155
|
-
let t =
|
|
2156
|
-
r && n.has(r) && (
|
|
2157
|
-
let i = Z === "default" && U !== void 0, a =
|
|
2158
|
-
|
|
2166
|
+
}, [K]), Yr = C(() => [...rt ?? [], ...qr], [rt, qr]), Z = An && !r && Nn.workspaceId !== e ? "default" : W ?? (U === void 0 ? H[0]?.id ?? "default" : "default"), Xr = !V?.hasMore && !z;
|
|
2167
|
+
S(() => {
|
|
2168
|
+
if (Kn) return;
|
|
2169
|
+
let t = Tr.current, n = new Set(H.map((e) => e.id)), r = t ? t.createdId ?? (n.has(Z) && !t.knownIds.has(Z) ? Z : H.find((e) => !t.knownIds.has(e.id))?.id ?? null) : null;
|
|
2170
|
+
r && n.has(r) && (Tr.current = null);
|
|
2171
|
+
let i = Z === "default" && U !== void 0, a = Xr && n.size > 0 && !i, o = r ?? (a && !n.has(Z) ? H[0]?.id ?? Z : Z);
|
|
2172
|
+
Gt((i) => {
|
|
2159
2173
|
let s = i.workspaceId === e ? i : {
|
|
2160
2174
|
workspaceId: e,
|
|
2161
2175
|
ids: [],
|
|
2162
2176
|
activeId: null
|
|
2163
2177
|
};
|
|
2164
|
-
if (
|
|
2165
|
-
let c = s.ids.length > 0 ? s.ids : [o], l = a ? c.filter((e) => n.has(e) || e === r) : c, u = l.length > 0 ? l : [o], d = s.activeId && u.includes(s.activeId) ? s.activeId : u[0] ?? o, f = r ?
|
|
2178
|
+
if (z && s.ids.length > 0 && !r) return s;
|
|
2179
|
+
let c = s.ids.length > 0 ? s.ids : [o], l = a ? c.filter((e) => n.has(e) || e === r) : c, u = l.length > 0 ? l : [o], d = s.activeId && u.includes(s.activeId) ? s.activeId : u[0] ?? o, f = r ? sn(u, t?.afterId, r) : o === d || u.includes(o) ? u : cn(u, d, o), p = f.includes(o) ? o : f[0] ?? o;
|
|
2166
2180
|
return i.workspaceId === e && i.activeId === p && i.ids.length === f.length && i.ids.every((e, t) => e === f[t]) ? i : {
|
|
2167
2181
|
workspaceId: e,
|
|
2168
2182
|
ids: f,
|
|
@@ -2172,53 +2186,53 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2172
2186
|
}, [
|
|
2173
2187
|
U,
|
|
2174
2188
|
Z,
|
|
2175
|
-
|
|
2176
|
-
|
|
2189
|
+
z,
|
|
2190
|
+
Kn,
|
|
2177
2191
|
H,
|
|
2178
|
-
|
|
2192
|
+
Xr,
|
|
2179
2193
|
e
|
|
2180
2194
|
]);
|
|
2181
|
-
let
|
|
2195
|
+
let Zr = C(() => {
|
|
2182
2196
|
let e = /* @__PURE__ */ new Map();
|
|
2183
2197
|
for (let t of H) e.set(t.id, t.title);
|
|
2184
2198
|
return e;
|
|
2185
|
-
}, [H]), [
|
|
2199
|
+
}, [H]), [Qr, $r] = T(() => ({
|
|
2186
2200
|
workspaceId: e,
|
|
2187
2201
|
ids: /* @__PURE__ */ new Set()
|
|
2188
|
-
})),
|
|
2202
|
+
})), ei = C(() => {
|
|
2189
2203
|
let t = /* @__PURE__ */ new Set();
|
|
2190
|
-
if (!
|
|
2191
|
-
let n =
|
|
2204
|
+
if (!R) return t;
|
|
2205
|
+
let n = Qr.workspaceId === e ? Qr.ids : /* @__PURE__ */ new Set();
|
|
2192
2206
|
for (let e of B) e.turnCount === 0 && !n.has(e.id) && t.add(e.id);
|
|
2193
2207
|
return t;
|
|
2194
2208
|
}, [
|
|
2195
2209
|
B,
|
|
2196
|
-
|
|
2197
|
-
|
|
2210
|
+
Qr,
|
|
2211
|
+
R,
|
|
2198
2212
|
e
|
|
2199
2213
|
]);
|
|
2200
|
-
|
|
2201
|
-
|
|
2214
|
+
S(() => {
|
|
2215
|
+
$r((t) => t.workspaceId === e ? t : {
|
|
2202
2216
|
workspaceId: e,
|
|
2203
2217
|
ids: /* @__PURE__ */ new Set()
|
|
2204
2218
|
});
|
|
2205
2219
|
}, [e]);
|
|
2206
|
-
let
|
|
2220
|
+
let ti = F.workspaceId === e ? F : {
|
|
2207
2221
|
workspaceId: e,
|
|
2208
2222
|
ids: [],
|
|
2209
2223
|
activeId: null
|
|
2210
|
-
}, Q =
|
|
2211
|
-
|
|
2212
|
-
|
|
2224
|
+
}, Q = ti.ids.length > 0 ? ti.ids : [Z];
|
|
2225
|
+
S(() => {
|
|
2226
|
+
Vr.current = new Set(Q);
|
|
2213
2227
|
}, [Q]);
|
|
2214
|
-
let $ =
|
|
2228
|
+
let $ = ti.activeId ?? Q[0] ?? Z, ni = x((t) => {
|
|
2215
2229
|
J(null);
|
|
2216
|
-
let n = (
|
|
2230
|
+
let n = (F.workspaceId === e ? F : {
|
|
2217
2231
|
workspaceId: e,
|
|
2218
2232
|
ids: [Z],
|
|
2219
2233
|
activeId: Z
|
|
2220
2234
|
}).ids.includes(t);
|
|
2221
|
-
return
|
|
2235
|
+
return Gt((n) => {
|
|
2222
2236
|
let r = n.workspaceId === e ? n : {
|
|
2223
2237
|
workspaceId: e,
|
|
2224
2238
|
ids: [Z],
|
|
@@ -2226,21 +2240,21 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2226
2240
|
};
|
|
2227
2241
|
return {
|
|
2228
2242
|
workspaceId: e,
|
|
2229
|
-
ids: r.ids.includes(t) ? r.ids :
|
|
2243
|
+
ids: r.ids.includes(t) ? r.ids : cn(r.ids, r.activeId, t),
|
|
2230
2244
|
activeId: t
|
|
2231
2245
|
};
|
|
2232
|
-
}), n ? G(t) :
|
|
2246
|
+
}), n ? G(t) : tr(t);
|
|
2233
2247
|
}, [
|
|
2234
|
-
|
|
2248
|
+
F,
|
|
2235
2249
|
Z,
|
|
2236
2250
|
G,
|
|
2237
|
-
|
|
2251
|
+
tr,
|
|
2238
2252
|
e
|
|
2239
2253
|
]);
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
}, [
|
|
2243
|
-
let
|
|
2254
|
+
S(() => {
|
|
2255
|
+
Hr.current = ni;
|
|
2256
|
+
}, [ni]);
|
|
2257
|
+
let ri = x((t) => (Gt((n) => {
|
|
2244
2258
|
let r = n.workspaceId === e ? n : {
|
|
2245
2259
|
workspaceId: e,
|
|
2246
2260
|
ids: [Z],
|
|
@@ -2248,21 +2262,21 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2248
2262
|
};
|
|
2249
2263
|
return {
|
|
2250
2264
|
workspaceId: e,
|
|
2251
|
-
ids: r.ids.includes(t) ? r.ids :
|
|
2265
|
+
ids: r.ids.includes(t) ? r.ids : sn(r.ids, r.activeId, t),
|
|
2252
2266
|
activeId: t
|
|
2253
2267
|
};
|
|
2254
2268
|
}), G(t)), [
|
|
2255
2269
|
Z,
|
|
2256
2270
|
G,
|
|
2257
2271
|
e
|
|
2258
|
-
]),
|
|
2272
|
+
]), ii = x((t) => (J(null), (F.workspaceId === e ? F : {
|
|
2259
2273
|
workspaceId: e,
|
|
2260
2274
|
ids: [Z],
|
|
2261
2275
|
activeId: Z
|
|
2262
|
-
}).ids.includes(t) &&
|
|
2276
|
+
}).ids.includes(t) && Xt({
|
|
2263
2277
|
workspaceId: e,
|
|
2264
2278
|
id: t
|
|
2265
|
-
}),
|
|
2279
|
+
}), Gt((n) => {
|
|
2266
2280
|
let r = n.workspaceId === e ? n : {
|
|
2267
2281
|
workspaceId: e,
|
|
2268
2282
|
ids: [Z],
|
|
@@ -2270,16 +2284,16 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2270
2284
|
};
|
|
2271
2285
|
return {
|
|
2272
2286
|
workspaceId: e,
|
|
2273
|
-
ids:
|
|
2287
|
+
ids: sn(r.ids, r.activeId, t),
|
|
2274
2288
|
activeId: t
|
|
2275
2289
|
};
|
|
2276
2290
|
}), G(t)), [
|
|
2277
|
-
|
|
2291
|
+
F,
|
|
2278
2292
|
Z,
|
|
2279
2293
|
G,
|
|
2280
2294
|
e
|
|
2281
|
-
]),
|
|
2282
|
-
let n =
|
|
2295
|
+
]), ai = x((t) => {
|
|
2296
|
+
let n = F.workspaceId === e ? F : {
|
|
2283
2297
|
workspaceId: e,
|
|
2284
2298
|
ids: [Z],
|
|
2285
2299
|
activeId: Z
|
|
@@ -2288,21 +2302,21 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2288
2302
|
let r = n.ids.indexOf(t);
|
|
2289
2303
|
if (r < 0) return;
|
|
2290
2304
|
let i = n.ids.filter((e) => e !== t), a = n.activeId === t ? i[Math.max(0, r - 1)] ?? i[0] ?? null : n.activeId;
|
|
2291
|
-
|
|
2305
|
+
Gt({
|
|
2292
2306
|
workspaceId: e,
|
|
2293
2307
|
ids: i,
|
|
2294
2308
|
activeId: a
|
|
2295
2309
|
}), a && n.activeId === t && G(a);
|
|
2296
2310
|
}, [
|
|
2297
|
-
|
|
2311
|
+
F,
|
|
2298
2312
|
Z,
|
|
2299
2313
|
G,
|
|
2300
2314
|
e
|
|
2301
|
-
]),
|
|
2302
|
-
let t =
|
|
2315
|
+
]), oi = x(() => {
|
|
2316
|
+
let t = nr();
|
|
2303
2317
|
return Promise.resolve(t).then((t) => {
|
|
2304
|
-
let n =
|
|
2305
|
-
n && (
|
|
2318
|
+
let n = on(t);
|
|
2319
|
+
n && (Gt((t) => {
|
|
2306
2320
|
let r = t.workspaceId === e ? t : {
|
|
2307
2321
|
workspaceId: e,
|
|
2308
2322
|
ids: [Z],
|
|
@@ -2310,7 +2324,7 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2310
2324
|
}, i = r.ids.length > 0 ? r.ids : [Z];
|
|
2311
2325
|
return {
|
|
2312
2326
|
workspaceId: e,
|
|
2313
|
-
ids:
|
|
2327
|
+
ids: cn(i, r.activeId ?? i[0] ?? Z, n),
|
|
2314
2328
|
activeId: n
|
|
2315
2329
|
};
|
|
2316
2330
|
}), G(n));
|
|
@@ -2318,23 +2332,23 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2318
2332
|
}, [
|
|
2319
2333
|
Z,
|
|
2320
2334
|
G,
|
|
2321
|
-
|
|
2335
|
+
nr,
|
|
2322
2336
|
e
|
|
2323
|
-
]),
|
|
2337
|
+
]), si = x((t) => {
|
|
2324
2338
|
let n = {
|
|
2325
2339
|
afterId: t,
|
|
2326
2340
|
knownIds: new Set(H.map((e) => e.id))
|
|
2327
2341
|
};
|
|
2328
|
-
|
|
2329
|
-
let r =
|
|
2342
|
+
Tr.current = n;
|
|
2343
|
+
let r = nr();
|
|
2330
2344
|
return Promise.resolve(r).then((r) => {
|
|
2331
|
-
let i =
|
|
2332
|
-
i && (
|
|
2345
|
+
let i = on(r);
|
|
2346
|
+
i && (Tr.current === n && (Tr.current = {
|
|
2333
2347
|
...n,
|
|
2334
2348
|
createdId: i
|
|
2335
|
-
}),
|
|
2349
|
+
}), Gt((n) => ({
|
|
2336
2350
|
workspaceId: e,
|
|
2337
|
-
ids:
|
|
2351
|
+
ids: sn((n.workspaceId === e ? n : {
|
|
2338
2352
|
workspaceId: e,
|
|
2339
2353
|
ids: [Z],
|
|
2340
2354
|
activeId: Z
|
|
@@ -2342,117 +2356,117 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2342
2356
|
activeId: i
|
|
2343
2357
|
})));
|
|
2344
2358
|
}).catch(() => {
|
|
2345
|
-
|
|
2359
|
+
Tr.current === n && (Tr.current = null);
|
|
2346
2360
|
}), r;
|
|
2347
2361
|
}, [
|
|
2348
2362
|
Z,
|
|
2349
|
-
|
|
2363
|
+
nr,
|
|
2350
2364
|
H,
|
|
2351
2365
|
e
|
|
2352
|
-
]),
|
|
2353
|
-
let n =
|
|
2366
|
+
]), ci = x((t) => {
|
|
2367
|
+
let n = F.workspaceId === e ? F : {
|
|
2354
2368
|
workspaceId: e,
|
|
2355
2369
|
ids: [Z],
|
|
2356
2370
|
activeId: Z
|
|
2357
2371
|
}, r = n.ids.indexOf(t), i = n.activeId;
|
|
2358
2372
|
if (r >= 0) {
|
|
2359
2373
|
let a = n.ids.filter((e) => e !== t);
|
|
2360
|
-
i = n.activeId === t ? a[Math.max(0, r - 1)] ?? a[0] ?? null : n.activeId,
|
|
2374
|
+
i = n.activeId === t ? a[Math.max(0, r - 1)] ?? a[0] ?? null : n.activeId, Gt({
|
|
2361
2375
|
workspaceId: e,
|
|
2362
2376
|
ids: a,
|
|
2363
2377
|
activeId: i
|
|
2364
|
-
}), i && n.activeId === t &&
|
|
2378
|
+
}), i && n.activeId === t && tr(i);
|
|
2365
2379
|
}
|
|
2366
|
-
return
|
|
2380
|
+
return ir(t);
|
|
2367
2381
|
}, [
|
|
2368
|
-
|
|
2382
|
+
F,
|
|
2369
2383
|
Z,
|
|
2370
|
-
|
|
2371
|
-
|
|
2384
|
+
ir,
|
|
2385
|
+
tr,
|
|
2372
2386
|
e
|
|
2373
|
-
]),
|
|
2387
|
+
]), li = x(() => Q.length >= 2 ? si($) : oi(), [
|
|
2374
2388
|
$,
|
|
2375
2389
|
Q.length,
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
]), [
|
|
2379
|
-
|
|
2380
|
-
if (
|
|
2381
|
-
|
|
2390
|
+
si,
|
|
2391
|
+
oi
|
|
2392
|
+
]), [ui, di] = T(Xn), fi = w(e);
|
|
2393
|
+
S(() => {
|
|
2394
|
+
if (fi.current !== e) {
|
|
2395
|
+
fi.current = e, di(Xn);
|
|
2382
2396
|
return;
|
|
2383
2397
|
}
|
|
2384
|
-
|
|
2385
|
-
}, [
|
|
2386
|
-
let
|
|
2387
|
-
|
|
2398
|
+
Xn && di(!0);
|
|
2399
|
+
}, [Xn, e]);
|
|
2400
|
+
let pi = Xn && An && !W, mi = !ui && ot !== !1 && (!An || !!W), hi = x((t) => {
|
|
2401
|
+
Pt({
|
|
2388
2402
|
workspaceId: e,
|
|
2389
2403
|
status: t
|
|
2390
|
-
}),
|
|
2391
|
-
}, [
|
|
2392
|
-
|
|
2404
|
+
}), ct?.(t);
|
|
2405
|
+
}, [ct, e]);
|
|
2406
|
+
S(() => {
|
|
2393
2407
|
let e = (e) => {
|
|
2394
2408
|
let t = e.detail;
|
|
2395
|
-
!t || typeof t != "object" ||
|
|
2409
|
+
!t || typeof t != "object" || s(t, Wr);
|
|
2396
2410
|
};
|
|
2397
|
-
return globalThis.addEventListener?.(
|
|
2398
|
-
}, [
|
|
2399
|
-
|
|
2411
|
+
return globalThis.addEventListener?.(l, e), () => globalThis.removeEventListener?.(l, e);
|
|
2412
|
+
}, [Wr]), S(() => {
|
|
2413
|
+
z || _e?.(W ?? null);
|
|
2400
2414
|
}, [
|
|
2401
2415
|
W,
|
|
2402
2416
|
_e,
|
|
2403
|
-
|
|
2417
|
+
z
|
|
2404
2418
|
]);
|
|
2405
|
-
let
|
|
2406
|
-
let t = `${
|
|
2419
|
+
let gi = Dn.status !== "ready", _i = gi ? /* @__PURE__ */ D(Jt, { status: Dn }) : void 0, vi = x(async (e) => {
|
|
2420
|
+
let t = `${y?.replace(/\/$/, "") ?? ""}/api/v1/agent/reload`;
|
|
2407
2421
|
try {
|
|
2408
2422
|
let n = await fetch(t, {
|
|
2409
2423
|
method: "POST",
|
|
2410
2424
|
headers: {
|
|
2411
|
-
...
|
|
2425
|
+
...Dt,
|
|
2412
2426
|
"content-type": "application/json"
|
|
2413
2427
|
},
|
|
2414
2428
|
body: JSON.stringify({ sessionId: e })
|
|
2415
2429
|
});
|
|
2416
2430
|
if (!n.ok) return (await n.json().catch(() => ({}))).error || `reload failed (${n.status})`;
|
|
2417
2431
|
let r = await n.json().catch(() => ({}));
|
|
2418
|
-
return window.dispatchEvent(new CustomEvent(
|
|
2432
|
+
return window.dispatchEvent(new CustomEvent(te, { detail: r })), yn(r);
|
|
2419
2433
|
} catch (e) {
|
|
2420
2434
|
return e instanceof Error ? e.message : "Agent plugin reload failed.";
|
|
2421
2435
|
}
|
|
2422
|
-
}, [
|
|
2423
|
-
let e =
|
|
2436
|
+
}, [y, Dt]), yi = C(() => {
|
|
2437
|
+
let e = j?.remoteSessionOptions && typeof j.remoteSessionOptions == "object" ? j.remoteSessionOptions : void 0;
|
|
2424
2438
|
return re ? {
|
|
2425
2439
|
...e ?? {},
|
|
2426
2440
|
requestTimeoutMs: re
|
|
2427
2441
|
} : e;
|
|
2428
|
-
}, [re,
|
|
2429
|
-
let r = n.bridgeEnabled ?? !0, i =
|
|
2442
|
+
}, [re, j?.remoteSessionOptions]), bi = x((t, n = {}) => {
|
|
2443
|
+
let r = n.bridgeEnabled ?? !0, i = j?.toolRenderers && typeof j.toolRenderers == "object" ? j.toolRenderers : void 0;
|
|
2430
2444
|
return {
|
|
2431
|
-
...
|
|
2432
|
-
...
|
|
2445
|
+
...j,
|
|
2446
|
+
...pi ? {
|
|
2433
2447
|
autoSubmitInitialDraft: !1,
|
|
2434
2448
|
initialDraft: void 0
|
|
2435
2449
|
} : {},
|
|
2436
2450
|
sessionId: t,
|
|
2437
|
-
apiBaseUrl:
|
|
2451
|
+
apiBaseUrl: y,
|
|
2438
2452
|
workspaceId: e,
|
|
2439
2453
|
storageScope: e,
|
|
2440
|
-
requestHeaders:
|
|
2441
|
-
remoteSessionOptions:
|
|
2454
|
+
requestHeaders: Dt,
|
|
2455
|
+
remoteSessionOptions: yi,
|
|
2442
2456
|
showSessions: !1,
|
|
2443
|
-
onReloadAgentPlugins:
|
|
2457
|
+
onReloadAgentPlugins: j?.onReloadAgentPlugins ?? (() => vi(t)),
|
|
2444
2458
|
toolRenderers: {
|
|
2445
|
-
...
|
|
2459
|
+
...Jr,
|
|
2446
2460
|
...i ?? {}
|
|
2447
2461
|
},
|
|
2448
|
-
bridgeEndpoint: r ?
|
|
2449
|
-
surfaceDispatch:
|
|
2450
|
-
extraCommands:
|
|
2451
|
-
workspaceWarmupStatus:
|
|
2452
|
-
hydrateMessages:
|
|
2453
|
-
allowPromptDuringInitialHydration:
|
|
2462
|
+
bridgeEndpoint: r ? ce : null,
|
|
2463
|
+
surfaceDispatch: Wr,
|
|
2464
|
+
extraCommands: at,
|
|
2465
|
+
workspaceWarmupStatus: Dn,
|
|
2466
|
+
hydrateMessages: mi,
|
|
2467
|
+
allowPromptDuringInitialHydration: ei.has(t),
|
|
2454
2468
|
onPromptSubmitStarted: ({ sessionId: t }) => {
|
|
2455
|
-
|
|
2469
|
+
$r((n) => {
|
|
2456
2470
|
let r = n.workspaceId === e ? n.ids : /* @__PURE__ */ new Set();
|
|
2457
2471
|
if (r.has(t)) return n.workspaceId === e ? n : {
|
|
2458
2472
|
workspaceId: e,
|
|
@@ -2467,44 +2481,44 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2467
2481
|
},
|
|
2468
2482
|
onTurnComplete: () => {
|
|
2469
2483
|
V?.refresh?.({ background: !0 });
|
|
2470
|
-
let e =
|
|
2484
|
+
let e = j?.onTurnComplete;
|
|
2471
2485
|
typeof e == "function" && e();
|
|
2472
2486
|
},
|
|
2473
2487
|
onAutoSubmitInitialDraftSettled: () => {
|
|
2474
|
-
|
|
2475
|
-
let e =
|
|
2488
|
+
er.current = !1, di(!1), Qn(void 0);
|
|
2489
|
+
let e = j?.onAutoSubmitInitialDraftSettled;
|
|
2476
2490
|
typeof e == "function" && e();
|
|
2477
2491
|
},
|
|
2478
|
-
...
|
|
2492
|
+
...bt === void 0 ? {} : { hotReloadEnabled: bt }
|
|
2479
2493
|
};
|
|
2480
2494
|
}, [
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
Br,
|
|
2488
|
-
ot,
|
|
2489
|
-
_n,
|
|
2490
|
-
ui,
|
|
2491
|
-
Xr,
|
|
2492
|
-
A,
|
|
2495
|
+
y,
|
|
2496
|
+
j,
|
|
2497
|
+
yi,
|
|
2498
|
+
pi,
|
|
2499
|
+
Dt,
|
|
2500
|
+
ce,
|
|
2493
2501
|
Wr,
|
|
2502
|
+
at,
|
|
2503
|
+
Dn,
|
|
2494
2504
|
mi,
|
|
2505
|
+
ei,
|
|
2506
|
+
bt,
|
|
2507
|
+
Jr,
|
|
2508
|
+
vi,
|
|
2495
2509
|
V,
|
|
2496
2510
|
e
|
|
2497
|
-
]),
|
|
2498
|
-
(!
|
|
2499
|
-
make:
|
|
2511
|
+
]), xi = C(() => bi(Z), [Z, bi]), Si = w(null), Ci = C(() => {
|
|
2512
|
+
(!Si.current || Si.current.make !== bi) && (Si.current = {
|
|
2513
|
+
make: bi,
|
|
2500
2514
|
cache: /* @__PURE__ */ new Map()
|
|
2501
2515
|
});
|
|
2502
|
-
let { cache: e } =
|
|
2516
|
+
let { cache: e } = Si.current;
|
|
2503
2517
|
return Q.map((t) => {
|
|
2504
2518
|
let n = t === $, r = `${t}:${n}`, i = e.get(r);
|
|
2505
|
-
return i || (i =
|
|
2519
|
+
return i || (i = bi(t, { bridgeEnabled: n }), e.set(r, i)), {
|
|
2506
2520
|
id: t,
|
|
2507
|
-
title:
|
|
2521
|
+
title: Zr.get(t) ?? (t === "default" ? k : t),
|
|
2508
2522
|
panel: "chat",
|
|
2509
2523
|
params: i
|
|
2510
2524
|
};
|
|
@@ -2512,10 +2526,10 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2512
2526
|
}, [
|
|
2513
2527
|
$,
|
|
2514
2528
|
Q,
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
]),
|
|
2529
|
+
k,
|
|
2530
|
+
bi,
|
|
2531
|
+
Zr
|
|
2532
|
+
]), wi = C(() => {
|
|
2519
2533
|
let e = /* @__PURE__ */ new Set();
|
|
2520
2534
|
for (let t of H) e.add(t.id);
|
|
2521
2535
|
for (let t of Q) e.add(t);
|
|
@@ -2524,29 +2538,29 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2524
2538
|
Q,
|
|
2525
2539
|
W,
|
|
2526
2540
|
H
|
|
2527
|
-
]),
|
|
2528
|
-
storageKey:
|
|
2541
|
+
]), Ti = !z && !(V?.hasMore ?? !1), Ei = C(() => ({
|
|
2542
|
+
storageKey: M,
|
|
2529
2543
|
defaultLeftTab: ze,
|
|
2530
2544
|
initialPanels: He,
|
|
2531
|
-
extraPanels:
|
|
2532
|
-
onReloadAgentPlugins: () =>
|
|
2533
|
-
onReady:
|
|
2534
|
-
onChange:
|
|
2535
|
-
onClose:
|
|
2545
|
+
extraPanels: Yr,
|
|
2546
|
+
onReloadAgentPlugins: () => vi(W ?? Z),
|
|
2547
|
+
onReady: Nr,
|
|
2548
|
+
onChange: Fr,
|
|
2549
|
+
onClose: Br,
|
|
2536
2550
|
showCloseAction: !1
|
|
2537
2551
|
}), [
|
|
2538
|
-
|
|
2552
|
+
Br,
|
|
2539
2553
|
ze,
|
|
2540
2554
|
He,
|
|
2541
|
-
|
|
2555
|
+
vi,
|
|
2542
2556
|
W,
|
|
2543
2557
|
Z,
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2558
|
+
Fr,
|
|
2559
|
+
Nr,
|
|
2560
|
+
M,
|
|
2561
|
+
Yr,
|
|
2548
2562
|
X
|
|
2549
|
-
]),
|
|
2563
|
+
]), Di = () => {
|
|
2550
2564
|
document.dispatchEvent(new KeyboardEvent("keydown", {
|
|
2551
2565
|
key: "k",
|
|
2552
2566
|
metaKey: !0,
|
|
@@ -2554,51 +2568,51 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2554
2568
|
bubbles: !0,
|
|
2555
2569
|
cancelable: !0
|
|
2556
2570
|
}));
|
|
2557
|
-
},
|
|
2571
|
+
}, Oi = /* @__PURE__ */ O(E, { children: [Ke ? /* @__PURE__ */ D(nt, {}) : null, We] }), ki = {
|
|
2558
2572
|
sessions: H,
|
|
2559
2573
|
activeId: $,
|
|
2560
2574
|
openIds: Q,
|
|
2561
|
-
pinnedIds:
|
|
2562
|
-
onTogglePin:
|
|
2563
|
-
onSwitch:
|
|
2564
|
-
onOpenAsTab:
|
|
2565
|
-
onCreate:
|
|
2566
|
-
onDelete:
|
|
2575
|
+
pinnedIds: Tn,
|
|
2576
|
+
onTogglePin: En,
|
|
2577
|
+
onSwitch: ni,
|
|
2578
|
+
onOpenAsTab: ii,
|
|
2579
|
+
onCreate: nr,
|
|
2580
|
+
onDelete: ci,
|
|
2567
2581
|
onLoadMore: V?.loadMore,
|
|
2568
2582
|
hasMore: V?.hasMore,
|
|
2569
2583
|
loadingMore: V?.loadingMore,
|
|
2570
|
-
onClose: () =>
|
|
2571
|
-
},
|
|
2584
|
+
onClose: () => sr(!1)
|
|
2585
|
+
}, Ai = !!(V || ge || !zn), ji = C(() => P ? {
|
|
2572
2586
|
sessions: H,
|
|
2573
2587
|
activeId: $,
|
|
2574
2588
|
openIds: Q,
|
|
2575
|
-
search: (e, t) =>
|
|
2576
|
-
onSwitch:
|
|
2577
|
-
onOpenAsTab:
|
|
2589
|
+
search: (e, t) => et(e, t, { limit: 8 }),
|
|
2590
|
+
onSwitch: ni,
|
|
2591
|
+
onOpenAsTab: ii
|
|
2578
2592
|
} : void 0, [
|
|
2579
2593
|
$,
|
|
2580
2594
|
Q,
|
|
2581
|
-
|
|
2582
|
-
|
|
2595
|
+
P,
|
|
2596
|
+
ii,
|
|
2583
2597
|
H,
|
|
2584
|
-
|
|
2585
|
-
]),
|
|
2586
|
-
appLeftPaneCollapsed:
|
|
2598
|
+
ni
|
|
2599
|
+
]), Mi = ht({
|
|
2600
|
+
appLeftPaneCollapsed: cr,
|
|
2587
2601
|
workspaceId: e,
|
|
2588
|
-
effectiveAppLeftPaneWidth:
|
|
2589
|
-
sessionTitleById:
|
|
2590
|
-
defaultSessionTitle:
|
|
2591
|
-
makeCenterParams:
|
|
2592
|
-
openChatPane:
|
|
2593
|
-
surfaceDispatch:
|
|
2602
|
+
effectiveAppLeftPaneWidth: fr,
|
|
2603
|
+
sessionTitleById: Zr,
|
|
2604
|
+
defaultSessionTitle: k,
|
|
2605
|
+
makeCenterParams: bi,
|
|
2606
|
+
openChatPane: ii,
|
|
2607
|
+
surfaceDispatch: Wr,
|
|
2594
2608
|
onDockOverlay: () => J(null)
|
|
2595
|
-
}),
|
|
2609
|
+
}), Ni = Tt, Pi = nn({
|
|
2596
2610
|
plugins: K,
|
|
2597
2611
|
activeOverlay: q,
|
|
2598
2612
|
setActiveOverlay: J
|
|
2599
|
-
}),
|
|
2613
|
+
}), Fi = C(() => !P || !A?.length ? null : /* @__PURE__ */ D("div", {
|
|
2600
2614
|
className: "flex items-center gap-1",
|
|
2601
|
-
children:
|
|
2615
|
+
children: A.map((e) => /* @__PURE__ */ O("button", {
|
|
2602
2616
|
type: "button",
|
|
2603
2617
|
"data-boring-workspace-part": "chat-pane-control",
|
|
2604
2618
|
className: "inline-flex h-5 items-center gap-1 rounded-md px-1.5 text-[11px] font-medium text-muted-foreground/80 transition-colors hover:bg-muted/70 hover:text-foreground aria-pressed:bg-muted aria-pressed:text-foreground",
|
|
@@ -2610,18 +2624,18 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2610
2624
|
onClick: (t) => {
|
|
2611
2625
|
t.preventDefault(), t.stopPropagation(), J((t) => t === e.id ? null : e.id);
|
|
2612
2626
|
},
|
|
2613
|
-
children: [e.icon ? /* @__PURE__ */
|
|
2627
|
+
children: [e.icon ? /* @__PURE__ */ D("span", {
|
|
2614
2628
|
className: "grid size-3.5 place-items-center",
|
|
2615
2629
|
children: e.icon
|
|
2616
|
-
}) : null, /* @__PURE__ */
|
|
2630
|
+
}) : null, /* @__PURE__ */ D("span", { children: e.label })]
|
|
2617
2631
|
}, e.id))
|
|
2618
2632
|
}), [
|
|
2619
|
-
|
|
2620
|
-
|
|
2633
|
+
A,
|
|
2634
|
+
P,
|
|
2621
2635
|
q
|
|
2622
|
-
]),
|
|
2623
|
-
let e = [...
|
|
2624
|
-
for (let t of
|
|
2636
|
+
]), Ii = C(() => {
|
|
2637
|
+
let e = [...Pi, ...Xe ?? []];
|
|
2638
|
+
for (let t of A ?? []) e.push({
|
|
2625
2639
|
id: t.id,
|
|
2626
2640
|
label: t.label,
|
|
2627
2641
|
icon: t.icon,
|
|
@@ -2629,113 +2643,115 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2629
2643
|
emphasis: t.emphasis,
|
|
2630
2644
|
onClick: () => J((e) => e === t.id ? null : t.id)
|
|
2631
2645
|
});
|
|
2632
|
-
return
|
|
2646
|
+
return wt && e.push({
|
|
2633
2647
|
id: "plugins",
|
|
2634
2648
|
label: "Plugins",
|
|
2635
|
-
icon: /* @__PURE__ */
|
|
2649
|
+
icon: /* @__PURE__ */ D(Be, {
|
|
2636
2650
|
className: "h-4 w-4",
|
|
2637
2651
|
strokeWidth: 1.75
|
|
2638
2652
|
}),
|
|
2639
2653
|
onClick: () => J((e) => e === "plugins" ? null : "plugins")
|
|
2640
|
-
}),
|
|
2654
|
+
}), Ct && e.push({
|
|
2641
2655
|
id: "skills",
|
|
2642
2656
|
label: "Skills",
|
|
2643
|
-
icon: /* @__PURE__ */
|
|
2657
|
+
icon: /* @__PURE__ */ D(Ge, {
|
|
2644
2658
|
className: "h-4 w-4",
|
|
2645
2659
|
strokeWidth: 1.75
|
|
2646
2660
|
}),
|
|
2647
2661
|
onClick: () => J((e) => e === "skills" ? null : "skills")
|
|
2648
|
-
}),
|
|
2662
|
+
}), tn(e), e;
|
|
2649
2663
|
}, [
|
|
2650
2664
|
Xe,
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
]),
|
|
2665
|
+
A,
|
|
2666
|
+
Pi,
|
|
2667
|
+
wt,
|
|
2668
|
+
Ct
|
|
2669
|
+
]), Li = rn({
|
|
2656
2670
|
plugins: K,
|
|
2657
2671
|
activeOverlay: q,
|
|
2658
2672
|
onClose: () => J(null),
|
|
2659
|
-
headerInsetStart:
|
|
2673
|
+
headerInsetStart: cr,
|
|
2660
2674
|
headerInsetEnd: !Y
|
|
2661
|
-
}),
|
|
2662
|
-
let t =
|
|
2675
|
+
}), Ri = C(() => {
|
|
2676
|
+
let t = A?.find((e) => e.id === q);
|
|
2663
2677
|
return t ? t.render({
|
|
2664
2678
|
onClose: () => J(null),
|
|
2665
|
-
headerInsetStart:
|
|
2679
|
+
headerInsetStart: cr,
|
|
2666
2680
|
headerInsetEnd: !Y,
|
|
2667
2681
|
workspaceId: e
|
|
2668
2682
|
}) : null;
|
|
2669
2683
|
}, [
|
|
2670
|
-
|
|
2671
|
-
|
|
2684
|
+
A,
|
|
2685
|
+
cr,
|
|
2672
2686
|
q,
|
|
2673
2687
|
Y,
|
|
2674
2688
|
e
|
|
2675
|
-
]),
|
|
2689
|
+
]), zi = Li ?? Ri ?? (q === "skills" && Ct ? /* @__PURE__ */ D(it, {
|
|
2676
2690
|
onClose: () => J(null),
|
|
2677
|
-
headerInsetStart:
|
|
2691
|
+
headerInsetStart: cr,
|
|
2678
2692
|
headerInsetEnd: !Y
|
|
2679
|
-
}) : q === "plugins" &&
|
|
2693
|
+
}) : q === "plugins" && wt ? /* @__PURE__ */ D(vt, {
|
|
2680
2694
|
onClose: () => J(null),
|
|
2681
|
-
onReloadExternalPlugins: () =>
|
|
2682
|
-
headerInsetStart:
|
|
2695
|
+
onReloadExternalPlugins: () => vi(W ?? Z),
|
|
2696
|
+
headerInsetStart: cr,
|
|
2683
2697
|
headerInsetEnd: !Y
|
|
2684
|
-
}) : null),
|
|
2698
|
+
}) : null), Bi = Kn ? /* @__PURE__ */ D(Yt, {}) : /* @__PURE__ */ D(xe, {
|
|
2685
2699
|
className: pt,
|
|
2686
|
-
nav:
|
|
2687
|
-
navParams:
|
|
2700
|
+
nav: P ? null : mr ? "session-list" : null,
|
|
2701
|
+
navParams: ki,
|
|
2688
2702
|
center: "chat",
|
|
2689
|
-
centerParams:
|
|
2690
|
-
chatPanes:
|
|
2691
|
-
chatTopActions:
|
|
2703
|
+
centerParams: xi,
|
|
2704
|
+
chatPanes: Ci,
|
|
2705
|
+
chatTopActions: Fi,
|
|
2692
2706
|
activeChatPaneId: $,
|
|
2693
|
-
onActiveChatPaneChange:
|
|
2694
|
-
onCloseChatPane:
|
|
2695
|
-
onCreateChatPaneAfter:
|
|
2696
|
-
onDropChatSession:
|
|
2697
|
-
flashChatPaneId:
|
|
2707
|
+
onActiveChatPaneChange: ri,
|
|
2708
|
+
onCloseChatPane: ai,
|
|
2709
|
+
onCreateChatPaneAfter: P ? void 0 : si,
|
|
2710
|
+
onDropChatSession: ii,
|
|
2711
|
+
flashChatPaneId: Kt?.workspaceId === e ? Kt.id : null,
|
|
2698
2712
|
surface: Y ? "artifact-surface" : null,
|
|
2699
|
-
surfaceParams:
|
|
2700
|
-
chatOverlay:
|
|
2713
|
+
surfaceParams: Ei,
|
|
2714
|
+
chatOverlay: P ? zi : null,
|
|
2701
2715
|
onCloseChatOverlay: () => J(null),
|
|
2702
|
-
surfaceOverlay:
|
|
2703
|
-
sidebar: Y && !
|
|
2704
|
-
sidebarParams: Y && !
|
|
2716
|
+
surfaceOverlay: _i,
|
|
2717
|
+
sidebar: Y && !gi && Kr && xr ? "workbench-left" : null,
|
|
2718
|
+
sidebarParams: Y && !gi && Kr ? {
|
|
2705
2719
|
...ze ? { defaultTab: ze } : {},
|
|
2706
|
-
bridge:
|
|
2720
|
+
bridge: Gr,
|
|
2707
2721
|
onClose: () => {
|
|
2708
|
-
|
|
2722
|
+
vr(!1), br(!1);
|
|
2709
2723
|
},
|
|
2710
2724
|
onCollapse: () => {
|
|
2711
|
-
|
|
2725
|
+
vr(!1), br(!1);
|
|
2712
2726
|
}
|
|
2713
2727
|
} : void 0,
|
|
2714
|
-
storageKey:
|
|
2715
|
-
onOpenNav: !
|
|
2716
|
-
|
|
2728
|
+
storageKey: N ? St : void 0,
|
|
2729
|
+
onOpenNav: !P && Fe ? () => {
|
|
2730
|
+
sr(!0), lt?.();
|
|
2717
2731
|
} : void 0,
|
|
2718
2732
|
onOpenSurface: () => {
|
|
2719
|
-
|
|
2733
|
+
Er.current = !0, X(!0), ut?.();
|
|
2720
2734
|
},
|
|
2721
|
-
surfaceButtonBottomOffset:
|
|
2722
|
-
|
|
2723
|
-
|
|
2735
|
+
surfaceButtonBottomOffset: dt,
|
|
2736
|
+
mobileShellEnabled: ft,
|
|
2737
|
+
onOpenSidebar: Kr ? () => {
|
|
2738
|
+
Er.current = !0, X(!0), vr(!0), br(!0);
|
|
2724
2739
|
} : void 0
|
|
2725
|
-
}),
|
|
2726
|
-
collapsed:
|
|
2727
|
-
onExpand: () =>
|
|
2728
|
-
onCollapse: () =>
|
|
2729
|
-
onResizeLeftPane: (e) =>
|
|
2730
|
-
leftPaneWidth:
|
|
2740
|
+
}), Vi = P ? /* @__PURE__ */ D(Nt, {
|
|
2741
|
+
collapsed: cr,
|
|
2742
|
+
onExpand: () => lr(!1),
|
|
2743
|
+
onCollapse: () => lr(!0),
|
|
2744
|
+
onResizeLeftPane: (e) => dr((t) => hn(t + e, 220, 420)),
|
|
2745
|
+
leftPaneWidth: fr,
|
|
2731
2746
|
minLeftPaneWidth: 220,
|
|
2732
2747
|
maxLeftPaneWidth: 420,
|
|
2733
|
-
|
|
2734
|
-
|
|
2748
|
+
mobileShellEnabled: ft,
|
|
2749
|
+
leftPane: /* @__PURE__ */ D(jt, {
|
|
2750
|
+
width: fr,
|
|
2735
2751
|
appTitle: ve,
|
|
2736
|
-
workspaceLabel:
|
|
2737
|
-
workspaceSectionTitle:
|
|
2738
|
-
layoutMode:
|
|
2752
|
+
workspaceLabel: be,
|
|
2753
|
+
workspaceSectionTitle: Se,
|
|
2754
|
+
layoutMode: Ce,
|
|
2739
2755
|
headerMode: Te,
|
|
2740
2756
|
projects: Ee,
|
|
2741
2757
|
activeProjectId: De ?? e,
|
|
@@ -2743,99 +2759,99 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2743
2759
|
onShowMoreProjectSessions: Ae,
|
|
2744
2760
|
onCreateProject: je,
|
|
2745
2761
|
onCreateProjectSession: (t) => {
|
|
2746
|
-
t === (De ?? e) ? (J(null),
|
|
2762
|
+
t === (De ?? e) ? (J(null), li()) : Oe?.(t);
|
|
2747
2763
|
},
|
|
2748
2764
|
onOpenProjectSettings: Me,
|
|
2749
2765
|
onOpenProjectInNewTab: Ne,
|
|
2750
|
-
sessionTitle:
|
|
2766
|
+
sessionTitle: Kn ? "Loading sessions…" : ar ?? k,
|
|
2751
2767
|
topSlot: Ue,
|
|
2752
|
-
bottomSlot: Ke || We != null ? /* @__PURE__ */
|
|
2768
|
+
bottomSlot: Ke || We != null ? /* @__PURE__ */ D("div", {
|
|
2753
2769
|
className: "flex w-full min-w-0 items-center gap-2",
|
|
2754
|
-
children:
|
|
2770
|
+
children: Oi
|
|
2755
2771
|
}) : void 0,
|
|
2756
2772
|
sessions: H,
|
|
2757
2773
|
activeSessionId: $,
|
|
2758
2774
|
openSessionIds: Q,
|
|
2759
|
-
pinnedSessionIds:
|
|
2775
|
+
pinnedSessionIds: Tn,
|
|
2760
2776
|
onCreateSession: () => {
|
|
2761
|
-
J(null),
|
|
2777
|
+
J(null), li();
|
|
2762
2778
|
},
|
|
2763
|
-
onOpenCommandPalette:
|
|
2764
|
-
onSwitchSession:
|
|
2765
|
-
onOpenSessionAsPane:
|
|
2766
|
-
onToggleSessionPinned:
|
|
2767
|
-
onDeleteSession:
|
|
2768
|
-
actions:
|
|
2779
|
+
onOpenCommandPalette: Di,
|
|
2780
|
+
onSwitchSession: ni,
|
|
2781
|
+
onOpenSessionAsPane: ii,
|
|
2782
|
+
onToggleSessionPinned: En,
|
|
2783
|
+
onDeleteSession: Ai ? ci : void 0,
|
|
2784
|
+
actions: Ii
|
|
2769
2785
|
}),
|
|
2770
|
-
children:
|
|
2771
|
-
}) : /* @__PURE__ */
|
|
2786
|
+
children: Bi
|
|
2787
|
+
}) : /* @__PURE__ */ O("div", {
|
|
2772
2788
|
className: "flex h-full min-h-0 flex-col",
|
|
2773
|
-
children: [/* @__PURE__ */
|
|
2789
|
+
children: [/* @__PURE__ */ D(ye, {
|
|
2774
2790
|
appTitle: ve,
|
|
2775
|
-
sessionTitle:
|
|
2776
|
-
onCommandPalette:
|
|
2791
|
+
sessionTitle: Kn ? "Loading sessions…" : ar ?? k,
|
|
2792
|
+
onCommandPalette: Di,
|
|
2777
2793
|
topBarLeft: Ue,
|
|
2778
|
-
topBarRight:
|
|
2779
|
-
}),
|
|
2780
|
-
}),
|
|
2781
|
-
return /* @__PURE__ */
|
|
2794
|
+
topBarRight: Oi
|
|
2795
|
+
}), Bi]
|
|
2796
|
+
}), Hi = Mi.floatingChatNode, Ui = P ? !cr : mr;
|
|
2797
|
+
return /* @__PURE__ */ D("div", {
|
|
2782
2798
|
className: "relative h-full bg-background text-foreground",
|
|
2783
|
-
children: /* @__PURE__ */
|
|
2784
|
-
value:
|
|
2785
|
-
children: /* @__PURE__ */
|
|
2786
|
-
chatPanel:
|
|
2787
|
-
panels:
|
|
2788
|
-
commands:
|
|
2789
|
-
catalogs:
|
|
2790
|
-
plugins:
|
|
2799
|
+
children: /* @__PURE__ */ D(we, {
|
|
2800
|
+
value: Mi.shellCapabilities,
|
|
2801
|
+
children: /* @__PURE__ */ O(le, {
|
|
2802
|
+
chatPanel: On,
|
|
2803
|
+
panels: Ni,
|
|
2804
|
+
commands: m,
|
|
2805
|
+
catalogs: h,
|
|
2806
|
+
plugins: g,
|
|
2791
2807
|
capturedPlugins: K,
|
|
2792
|
-
excludeDefaults:
|
|
2793
|
-
capabilities:
|
|
2794
|
-
apiBaseUrl:
|
|
2795
|
-
authHeaders:
|
|
2808
|
+
excludeDefaults: _,
|
|
2809
|
+
capabilities: v,
|
|
2810
|
+
apiBaseUrl: y,
|
|
2811
|
+
authHeaders: Ot,
|
|
2796
2812
|
apiTimeout: re,
|
|
2797
2813
|
activeSessionId: $,
|
|
2798
2814
|
openSessionIds: Q,
|
|
2799
|
-
attentionSessionIds:
|
|
2800
|
-
attentionSessionsAuthoritative:
|
|
2815
|
+
attentionSessionIds: wi,
|
|
2816
|
+
attentionSessionsAuthoritative: Ti,
|
|
2801
2817
|
defaultTheme: ie,
|
|
2802
2818
|
onThemeChange: ae,
|
|
2803
2819
|
workspaceId: e,
|
|
2804
|
-
workspaceLabel:
|
|
2820
|
+
workspaceLabel: be,
|
|
2805
2821
|
appTitle: ve,
|
|
2806
|
-
storageKey:
|
|
2822
|
+
storageKey: xt,
|
|
2807
2823
|
persistenceEnabled: oe,
|
|
2808
|
-
debug: se,
|
|
2824
|
+
debug: !gt && se,
|
|
2809
2825
|
bridgeEndpoint: null,
|
|
2810
2826
|
onAuthError: de,
|
|
2811
|
-
frontPluginHotReload:
|
|
2827
|
+
frontPluginHotReload: yt,
|
|
2812
2828
|
fullPageBasePath: ue,
|
|
2813
|
-
commandPaletteSessionSearch:
|
|
2829
|
+
commandPaletteSessionSearch: ji,
|
|
2814
2830
|
children: [
|
|
2815
|
-
|
|
2816
|
-
/* @__PURE__ */
|
|
2831
|
+
d,
|
|
2832
|
+
/* @__PURE__ */ D(qt, {
|
|
2817
2833
|
workspaceId: e,
|
|
2818
|
-
requestHeaders:
|
|
2819
|
-
apiBaseUrl:
|
|
2820
|
-
preloadPaths:
|
|
2821
|
-
provisionWorkspace:
|
|
2822
|
-
onStatusChange:
|
|
2834
|
+
requestHeaders: Dt,
|
|
2835
|
+
apiBaseUrl: y,
|
|
2836
|
+
preloadPaths: st,
|
|
2837
|
+
provisionWorkspace: ot,
|
|
2838
|
+
onStatusChange: hi
|
|
2823
2839
|
}),
|
|
2824
|
-
/* @__PURE__ */
|
|
2825
|
-
bridgeEndpoint:
|
|
2826
|
-
requestHeaders:
|
|
2827
|
-
navOpen:
|
|
2840
|
+
/* @__PURE__ */ D($t, {
|
|
2841
|
+
bridgeEndpoint: ce,
|
|
2842
|
+
requestHeaders: Dt,
|
|
2843
|
+
navOpen: Ui,
|
|
2828
2844
|
surfaceOpen: Y,
|
|
2829
|
-
surfaceReady:
|
|
2830
|
-
snapshot:
|
|
2845
|
+
surfaceReady: hr,
|
|
2846
|
+
snapshot: Mr
|
|
2831
2847
|
}),
|
|
2832
|
-
/* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ D(an, {
|
|
2833
2849
|
activeSessionId: $,
|
|
2834
|
-
onAttentionOpen:
|
|
2850
|
+
onAttentionOpen: Sr
|
|
2835
2851
|
}),
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2852
|
+
Vi,
|
|
2853
|
+
Hi,
|
|
2854
|
+
f
|
|
2839
2855
|
]
|
|
2840
2856
|
})
|
|
2841
2857
|
})
|
|
@@ -2843,8 +2859,8 @@ function wn({ workspaceId: e, chatPanel: t, useSessions: n, requestHeaders: i, s
|
|
|
2843
2859
|
}
|
|
2844
2860
|
//#endregion
|
|
2845
2861
|
//#region src/app/front/WorkspaceBootGate.tsx
|
|
2846
|
-
var
|
|
2847
|
-
function
|
|
2862
|
+
var En = 500;
|
|
2863
|
+
function Dn(e) {
|
|
2848
2864
|
return new Promise((t, n) => {
|
|
2849
2865
|
let r, i = () => {
|
|
2850
2866
|
r && globalThis.clearTimeout(r), e.removeEventListener("abort", a);
|
|
@@ -2857,72 +2873,72 @@ function En(e) {
|
|
|
2857
2873
|
}
|
|
2858
2874
|
r = globalThis.setTimeout(() => {
|
|
2859
2875
|
i(), t();
|
|
2860
|
-
},
|
|
2876
|
+
}, En), e.addEventListener("abort", a, { once: !0 });
|
|
2861
2877
|
});
|
|
2862
2878
|
}
|
|
2863
|
-
function
|
|
2864
|
-
let [g, _] =
|
|
2879
|
+
function On({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s = ae, provisionWorkspace: l = !0, loadingFallback: p, errorFallback: m, children: h }) {
|
|
2880
|
+
let [g, _] = T({
|
|
2865
2881
|
status: "loading",
|
|
2866
2882
|
label: "Waking workspace runtime"
|
|
2867
2883
|
});
|
|
2868
|
-
return
|
|
2869
|
-
let
|
|
2870
|
-
async function
|
|
2871
|
-
let
|
|
2872
|
-
headers:
|
|
2873
|
-
signal:
|
|
2874
|
-
}),
|
|
2875
|
-
if (!
|
|
2876
|
-
if (
|
|
2877
|
-
throw Error(
|
|
2884
|
+
return S(() => {
|
|
2885
|
+
let p = new AbortController(), m = a(t, n);
|
|
2886
|
+
async function h(n) {
|
|
2887
|
+
let a = await fetch(o(i, n), {
|
|
2888
|
+
headers: m,
|
|
2889
|
+
signal: p.signal
|
|
2890
|
+
}), s = await c(a);
|
|
2891
|
+
if (!a.ok) {
|
|
2892
|
+
if (r(s)) return "preparing";
|
|
2893
|
+
throw Error(u(s) ?? `${n} failed with ${a.status}`);
|
|
2878
2894
|
}
|
|
2879
|
-
if (
|
|
2880
|
-
let e =
|
|
2895
|
+
if (d(n)) {
|
|
2896
|
+
let e = f(s);
|
|
2881
2897
|
if (e?.state === "degraded") throw Error(e.message ?? "Workspace failed to prepare");
|
|
2882
2898
|
}
|
|
2883
|
-
return
|
|
2899
|
+
return v(n) !== null && s && typeof s == "object" && e(i, m["x-boring-workspace-id"] ?? t, n, s), "ready";
|
|
2884
2900
|
}
|
|
2885
|
-
async function
|
|
2901
|
+
async function g() {
|
|
2886
2902
|
_({
|
|
2887
2903
|
status: "loading",
|
|
2888
2904
|
label: "Waking workspace runtime"
|
|
2889
2905
|
});
|
|
2890
2906
|
try {
|
|
2891
|
-
let
|
|
2907
|
+
let e = me(s, l), t = await Promise.all(e.map(async (e) => ({
|
|
2892
2908
|
path: e,
|
|
2893
|
-
status: await
|
|
2894
|
-
}))),
|
|
2895
|
-
for (;
|
|
2909
|
+
status: await h(e)
|
|
2910
|
+
}))), n = t.filter((e) => e.status === "preparing").map((e) => e.path);
|
|
2911
|
+
for (; n.length > 0;) {
|
|
2896
2912
|
if (_({
|
|
2897
2913
|
status: "loading",
|
|
2898
2914
|
label: "Workspace is still preparing"
|
|
2899
|
-
}), await
|
|
2900
|
-
|
|
2915
|
+
}), await Dn(p.signal), p.signal.aborted) return;
|
|
2916
|
+
t = await Promise.all(n.map(async (e) => ({
|
|
2901
2917
|
path: e,
|
|
2902
|
-
status: await
|
|
2903
|
-
}))),
|
|
2918
|
+
status: await h(e)
|
|
2919
|
+
}))), n = t.filter((e) => e.status === "preparing").map((e) => e.path);
|
|
2904
2920
|
}
|
|
2905
|
-
|
|
2906
|
-
} catch (
|
|
2907
|
-
if (
|
|
2921
|
+
p.signal.aborted || _({ status: "ready" });
|
|
2922
|
+
} catch (e) {
|
|
2923
|
+
if (p.signal.aborted) return;
|
|
2908
2924
|
_({
|
|
2909
2925
|
status: "error",
|
|
2910
|
-
message:
|
|
2926
|
+
message: e instanceof Error ? e.message : "Unknown workspace boot error"
|
|
2911
2927
|
});
|
|
2912
2928
|
}
|
|
2913
2929
|
}
|
|
2914
|
-
return
|
|
2930
|
+
return g(), () => p.abort();
|
|
2915
2931
|
}, [
|
|
2916
|
-
|
|
2932
|
+
i,
|
|
2917
2933
|
s,
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
]), g.status === "ready" ? /* @__PURE__ */ E
|
|
2934
|
+
l,
|
|
2935
|
+
n,
|
|
2936
|
+
t
|
|
2937
|
+
]), g.status === "ready" ? /* @__PURE__ */ D(E, { children: h }) : g.status === "error" ? typeof m == "function" ? /* @__PURE__ */ D(E, { children: m(g.message) }) : m ? /* @__PURE__ */ D(E, { children: m }) : /* @__PURE__ */ D(Ce, {
|
|
2922
2938
|
title: "Workspace failed to open",
|
|
2923
2939
|
description: g.message,
|
|
2924
2940
|
status: "Retry by reloading the page"
|
|
2925
|
-
}) : typeof p == "function" ? /* @__PURE__ */ E
|
|
2941
|
+
}) : typeof p == "function" ? /* @__PURE__ */ D(E, { children: p(g.label) }) : p ? /* @__PURE__ */ D(E, { children: p }) : /* @__PURE__ */ D(Ce, {
|
|
2926
2942
|
title: "Opening workspace",
|
|
2927
2943
|
description: "Preparing secure runtime, files, sessions, and layout.",
|
|
2928
2944
|
status: g.label
|
|
@@ -2930,12 +2946,12 @@ function Dn({ workspaceId: r, requestHeaders: a, apiBaseUrl: o, preloadPaths: s
|
|
|
2930
2946
|
}
|
|
2931
2947
|
//#endregion
|
|
2932
2948
|
//#region src/app/front/fullPageRouteErrors.ts
|
|
2933
|
-
var
|
|
2949
|
+
var kn = "FULL_PAGE_PANEL_MISSING_COMPONENT", An = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON", jn = "FULL_PAGE_PANEL_PARAMS_NOT_OBJECT", Mn = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT", I = "FULL_PAGE_PANEL_NOT_SUPPORTED", Nn = "FULL_PAGE_PANEL_RENDER_FAILED";
|
|
2934
2950
|
//#endregion
|
|
2935
2951
|
//#region src/app/front/WorkspaceFullPagePanel.tsx
|
|
2936
|
-
function
|
|
2937
|
-
var
|
|
2938
|
-
function
|
|
2952
|
+
function L() {}
|
|
2953
|
+
var Pn = { dispose: L }, R = () => Pn;
|
|
2954
|
+
function z(e) {
|
|
2939
2955
|
return {
|
|
2940
2956
|
id: `full-page:${e}`,
|
|
2941
2957
|
title: e,
|
|
@@ -2948,31 +2964,31 @@ function Nn(e) {
|
|
|
2948
2964
|
type: "grid",
|
|
2949
2965
|
referenceGroup: void 0
|
|
2950
2966
|
},
|
|
2951
|
-
setActive:
|
|
2967
|
+
setActive: L,
|
|
2952
2968
|
setTitle: (e) => {
|
|
2953
2969
|
document.title = e;
|
|
2954
2970
|
},
|
|
2955
|
-
setSize:
|
|
2971
|
+
setSize: L,
|
|
2956
2972
|
close: () => {
|
|
2957
2973
|
window.close();
|
|
2958
2974
|
},
|
|
2959
|
-
moveTo:
|
|
2960
|
-
maximize:
|
|
2961
|
-
exitMaximized:
|
|
2975
|
+
moveTo: L,
|
|
2976
|
+
maximize: L,
|
|
2977
|
+
exitMaximized: L,
|
|
2962
2978
|
isMaximized: () => !1,
|
|
2963
|
-
minimize:
|
|
2964
|
-
onDidActiveChange:
|
|
2965
|
-
onDidVisibilityChange:
|
|
2966
|
-
onDidDimensionsChange:
|
|
2967
|
-
onDidFocusChange:
|
|
2968
|
-
onDidLocationChange:
|
|
2969
|
-
onDidParametersChange:
|
|
2970
|
-
onDidTitleChange:
|
|
2971
|
-
onDidRenamed:
|
|
2972
|
-
onWillFocus:
|
|
2979
|
+
minimize: L,
|
|
2980
|
+
onDidActiveChange: R,
|
|
2981
|
+
onDidVisibilityChange: R,
|
|
2982
|
+
onDidDimensionsChange: R,
|
|
2983
|
+
onDidFocusChange: R,
|
|
2984
|
+
onDidLocationChange: R,
|
|
2985
|
+
onDidParametersChange: R,
|
|
2986
|
+
onDidTitleChange: R,
|
|
2987
|
+
onDidRenamed: R,
|
|
2988
|
+
onWillFocus: R
|
|
2973
2989
|
};
|
|
2974
2990
|
}
|
|
2975
|
-
function
|
|
2991
|
+
function Fn() {
|
|
2976
2992
|
return {
|
|
2977
2993
|
width: window.innerWidth,
|
|
2978
2994
|
height: window.innerHeight,
|
|
@@ -2984,59 +3000,59 @@ function B() {
|
|
|
2984
3000
|
panels: [],
|
|
2985
3001
|
groups: [],
|
|
2986
3002
|
activeGroup: void 0,
|
|
2987
|
-
addPanel:
|
|
2988
|
-
addGroup:
|
|
2989
|
-
removePanel:
|
|
2990
|
-
removeGroup:
|
|
3003
|
+
addPanel: L,
|
|
3004
|
+
addGroup: L,
|
|
3005
|
+
removePanel: L,
|
|
3006
|
+
removeGroup: L,
|
|
2991
3007
|
getPanel: () => void 0,
|
|
2992
3008
|
getGroup: () => void 0,
|
|
2993
|
-
moveGroupOrPanel:
|
|
2994
|
-
fromJSON:
|
|
3009
|
+
moveGroupOrPanel: L,
|
|
3010
|
+
fromJSON: L,
|
|
2995
3011
|
toJSON: () => ({}),
|
|
2996
|
-
clear:
|
|
2997
|
-
focus:
|
|
2998
|
-
layout:
|
|
2999
|
-
onDidLayoutChange:
|
|
3000
|
-
onDidLayoutFromJSON:
|
|
3001
|
-
onDidAddPanel:
|
|
3002
|
-
onDidRemovePanel:
|
|
3003
|
-
onDidActivePanelChange:
|
|
3004
|
-
onDidAddGroup:
|
|
3005
|
-
onDidRemoveGroup:
|
|
3006
|
-
onDidActiveGroupChange:
|
|
3007
|
-
onUnhandledDragOverEvent:
|
|
3008
|
-
onDidDrop:
|
|
3009
|
-
onWillDrop:
|
|
3010
|
-
onWillDragGroup:
|
|
3011
|
-
onWillDragPanel:
|
|
3012
|
-
onDidActivePanelChange_:
|
|
3012
|
+
clear: L,
|
|
3013
|
+
focus: L,
|
|
3014
|
+
layout: L,
|
|
3015
|
+
onDidLayoutChange: R,
|
|
3016
|
+
onDidLayoutFromJSON: R,
|
|
3017
|
+
onDidAddPanel: R,
|
|
3018
|
+
onDidRemovePanel: R,
|
|
3019
|
+
onDidActivePanelChange: R,
|
|
3020
|
+
onDidAddGroup: R,
|
|
3021
|
+
onDidRemoveGroup: R,
|
|
3022
|
+
onDidActiveGroupChange: R,
|
|
3023
|
+
onUnhandledDragOverEvent: R,
|
|
3024
|
+
onDidDrop: R,
|
|
3025
|
+
onWillDrop: R,
|
|
3026
|
+
onWillDragGroup: R,
|
|
3027
|
+
onWillDragPanel: R,
|
|
3028
|
+
onDidActivePanelChange_: R
|
|
3013
3029
|
};
|
|
3014
3030
|
}
|
|
3015
|
-
function
|
|
3016
|
-
return /* @__PURE__ */
|
|
3031
|
+
function In({ code: e, title: t, description: n }) {
|
|
3032
|
+
return /* @__PURE__ */ D("div", {
|
|
3017
3033
|
className: "flex min-h-screen items-center justify-center bg-background p-6 text-foreground",
|
|
3018
3034
|
"data-testid": "full-page-error-state",
|
|
3019
3035
|
"data-full-page-error-code": e,
|
|
3020
|
-
children: /* @__PURE__ */
|
|
3036
|
+
children: /* @__PURE__ */ D(Ze, {
|
|
3021
3037
|
className: "w-full max-w-lg",
|
|
3022
3038
|
title: t,
|
|
3023
3039
|
description: n
|
|
3024
3040
|
})
|
|
3025
3041
|
});
|
|
3026
3042
|
}
|
|
3027
|
-
function
|
|
3028
|
-
let n =
|
|
3043
|
+
function Ln({ componentId: e, params: t = {} }) {
|
|
3044
|
+
let n = ce(), { errors: r } = ne(), a = n.get(e), o = n.getComponents()[e];
|
|
3029
3045
|
Ee(() => {
|
|
3030
|
-
document.title =
|
|
3031
|
-
}, [e,
|
|
3032
|
-
let
|
|
3046
|
+
document.title = a?.title ?? e;
|
|
3047
|
+
}, [e, a?.title]);
|
|
3048
|
+
let s = C(() => ({
|
|
3033
3049
|
params: t,
|
|
3034
|
-
api:
|
|
3035
|
-
containerApi:
|
|
3050
|
+
api: z(e),
|
|
3051
|
+
containerApi: Fn(),
|
|
3036
3052
|
className: "h-full"
|
|
3037
|
-
}), [e, t]),
|
|
3038
|
-
if (!
|
|
3039
|
-
let t =
|
|
3053
|
+
}), [e, t]), c = C(() => {
|
|
3054
|
+
if (!a) return null;
|
|
3055
|
+
let t = a.pluginId ?? a.id;
|
|
3040
3056
|
for (let n = r.length - 1; n >= 0; --n) {
|
|
3041
3057
|
let i = r[n];
|
|
3042
3058
|
if (i.contributionKind === "panel" && i.contributionId === e && i.pluginId === t) return i;
|
|
@@ -3045,37 +3061,37 @@ function V({ componentId: e, params: t = {} }) {
|
|
|
3045
3061
|
}, [
|
|
3046
3062
|
e,
|
|
3047
3063
|
r,
|
|
3048
|
-
|
|
3064
|
+
a
|
|
3049
3065
|
]);
|
|
3050
|
-
return
|
|
3051
|
-
code:
|
|
3066
|
+
return a ? !a.supportsFullPage || !o ? /* @__PURE__ */ D(In, {
|
|
3067
|
+
code: I,
|
|
3052
3068
|
title: "Panel does not support full-page mode",
|
|
3053
3069
|
description: `Panel "${e}" can render in the workspace, but it has not opted into the dedicated full-page pane route.`
|
|
3054
|
-
}) :
|
|
3055
|
-
code:
|
|
3070
|
+
}) : c ? /* @__PURE__ */ D(In, {
|
|
3071
|
+
code: Nn,
|
|
3056
3072
|
title: "Panel failed to render",
|
|
3057
|
-
description: `Panel "${e}" crashed while rendering in full-page mode: ${
|
|
3058
|
-
}) : /* @__PURE__ */
|
|
3073
|
+
description: `Panel "${e}" crashed while rendering in full-page mode: ${c.error.message}`
|
|
3074
|
+
}) : /* @__PURE__ */ D("div", {
|
|
3059
3075
|
className: "min-h-screen bg-background text-foreground",
|
|
3060
|
-
children: /* @__PURE__ */
|
|
3076
|
+
children: /* @__PURE__ */ D(i, {
|
|
3061
3077
|
mode: "full-page",
|
|
3062
|
-
children: /* @__PURE__ */
|
|
3078
|
+
children: /* @__PURE__ */ D(o, { ...s })
|
|
3063
3079
|
})
|
|
3064
|
-
}) : /* @__PURE__ */
|
|
3065
|
-
code:
|
|
3080
|
+
}) : /* @__PURE__ */ D(In, {
|
|
3081
|
+
code: Mn,
|
|
3066
3082
|
title: "Unknown panel",
|
|
3067
3083
|
description: `No full-page panel component is registered as "${e}".`
|
|
3068
3084
|
});
|
|
3069
3085
|
}
|
|
3070
3086
|
//#endregion
|
|
3071
3087
|
//#region src/app/front/fullPageRoute.ts
|
|
3072
|
-
function
|
|
3088
|
+
function B(e) {
|
|
3073
3089
|
let t = new URLSearchParams(e), n = t.get("component")?.trim() ?? "";
|
|
3074
3090
|
if (!n) return {
|
|
3075
3091
|
componentId: null,
|
|
3076
3092
|
params: {},
|
|
3077
3093
|
error: {
|
|
3078
|
-
code:
|
|
3094
|
+
code: kn,
|
|
3079
3095
|
message: "Missing full-page panel component id."
|
|
3080
3096
|
}
|
|
3081
3097
|
};
|
|
@@ -3092,7 +3108,7 @@ function Fn(e) {
|
|
|
3092
3108
|
componentId: null,
|
|
3093
3109
|
params: {},
|
|
3094
3110
|
error: {
|
|
3095
|
-
code:
|
|
3111
|
+
code: An,
|
|
3096
3112
|
message: "Invalid full-page panel params JSON."
|
|
3097
3113
|
}
|
|
3098
3114
|
};
|
|
@@ -3101,7 +3117,7 @@ function Fn(e) {
|
|
|
3101
3117
|
componentId: null,
|
|
3102
3118
|
params: {},
|
|
3103
3119
|
error: {
|
|
3104
|
-
code:
|
|
3120
|
+
code: jn,
|
|
3105
3121
|
message: "Full-page panel params must be a JSON object."
|
|
3106
3122
|
}
|
|
3107
3123
|
} : {
|
|
@@ -3110,4 +3126,4 @@ function Fn(e) {
|
|
|
3110
3126
|
};
|
|
3111
3127
|
}
|
|
3112
3128
|
//#endregion
|
|
3113
|
-
export {
|
|
3129
|
+
export { An as FULL_PAGE_PANEL_INVALID_PARAMS_JSON, kn as FULL_PAGE_PANEL_MISSING_COMPONENT, I as FULL_PAGE_PANEL_NOT_SUPPORTED, jn as FULL_PAGE_PANEL_PARAMS_NOT_OBJECT, Nn as FULL_PAGE_PANEL_RENDER_FAILED, Mn as FULL_PAGE_PANEL_UNKNOWN_COMPONENT, Tn as WorkspaceAgentFront, qt as WorkspaceBackgroundBoot, On as WorkspaceBootGate, Ln as WorkspaceFullPagePanel, zt as createLocalStorageSessions, B as parseFullPagePanelLocation, Bt as useLocalStorageSessions };
|