@forgeax/interface 0.4.1
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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +111 -0
- package/dist/package/browser/App.css +192 -0
- package/dist/package/browser/App.d.ts +11 -0
- package/dist/package/browser/App.js +11 -0
- package/dist/package/browser/ApplicationDetachedShell.d.ts +13 -0
- package/dist/package/browser/ApplicationDetachedShell.js +10 -0
- package/dist/package/browser/ApplicationShell.d.ts +19 -0
- package/dist/package/browser/ApplicationShell.js +62 -0
- package/dist/package/browser/app-kit.d.ts +1 -0
- package/dist/package/browser/app-kit.js +4 -0
- package/dist/package/browser/appHostBootstrap.d.ts +16 -0
- package/dist/package/browser/appHostBootstrap.js +145 -0
- package/dist/package/browser/application.d.ts +35 -0
- package/dist/package/browser/application.js +64 -0
- package/dist/package/browser/assets/icons/agent-icon.png +0 -0
- package/dist/package/browser/assets/icons/at.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-collapse.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-expand.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-up.svg +3 -0
- package/dist/package/browser/assets/icons/close-x.svg +3 -0
- package/dist/package/browser/assets/icons/close.svg +3 -0
- package/dist/package/browser/assets/icons/copy.svg +4 -0
- package/dist/package/browser/assets/icons/edit.svg +3 -0
- package/dist/package/browser/assets/icons/fullscreen.svg +3 -0
- package/dist/package/browser/assets/icons/pause.svg +4 -0
- package/dist/package/browser/assets/icons/play.svg +3 -0
- package/dist/package/browser/assets/icons/select.svg +3 -0
- package/dist/package/browser/assets/icons/sendMessage-enable.svg +4 -0
- package/dist/package/browser/assets/icons/sendMessage.svg +4 -0
- package/dist/package/browser/assets/icons/status-done.svg +11 -0
- package/dist/package/browser/assets/icons/status-running.svg +10 -0
- package/dist/package/browser/assets/icons/status-waiting.svg +10 -0
- package/dist/package/browser/assets/icons/tool-execute-script.svg +3 -0
- package/dist/package/browser/assets/icons/tool-other.svg +10 -0
- package/dist/package/browser/assets/icons/tool-read-file.svg +3 -0
- package/dist/package/browser/assets/icons/tool-resource-search.svg +3 -0
- package/dist/package/browser/assets/icons/tool-task-todo.svg +4 -0
- package/dist/package/browser/assets/icons/tool-write-file.svg +3 -0
- package/dist/package/browser/boot/SettingsSection.d.ts +14 -0
- package/dist/package/browser/boot/SettingsSection.js +82 -0
- package/dist/package/browser/boot/broadcast.d.ts +2 -0
- package/dist/package/browser/boot/broadcast.js +32 -0
- package/dist/package/browser/boot/driver.d.ts +22 -0
- package/dist/package/browser/boot/driver.js +47 -0
- package/dist/package/browser/boot/store.d.ts +29 -0
- package/dist/package/browser/boot/store.js +114 -0
- package/dist/package/browser/boot/themes.d.ts +19 -0
- package/dist/package/browser/boot/themes.js +21 -0
- package/dist/package/browser/boot/types.d.ts +22 -0
- package/dist/package/browser/boot/types.js +30 -0
- package/dist/package/browser/brand/BrandProvider.d.ts +19 -0
- package/dist/package/browser/brand/BrandProvider.js +35 -0
- package/dist/package/browser/brand/index.d.ts +4 -0
- package/dist/package/browser/brand/index.js +3 -0
- package/dist/package/browser/brand/runtime.d.ts +17 -0
- package/dist/package/browser/brand/runtime.js +71 -0
- package/dist/package/browser/brand/types.d.ts +77 -0
- package/dist/package/browser/brand/types.js +9 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.css +294 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.d.ts +2 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.d.ts +18 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.d.ts +17 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.d.ts +1 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.css +2425 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.d.ts +2 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.d.ts +3 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.d.ts +2 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.d.ts +1 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.d.ts +5 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.css +199 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.d.ts +2 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.d.ts +2 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.d.ts +10 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.d.ts +18 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/browser/components/DetachedSurface.d.ts +20 -0
- package/dist/package/browser/components/DetachedSurface.js +102 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.d.ts +4 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.d.ts +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.js +315 -0
- package/dist/package/browser/components/DockShell/DockShell.css +1018 -0
- package/dist/package/browser/components/DockShell/DockTab.d.ts +3 -0
- package/dist/package/browser/components/DockShell/DockTab.js +139 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.d.ts +9 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.d.ts +14 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.d.ts +6 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.d.ts +45 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.d.ts +17 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.d.ts +10 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.d.ts +16 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.d.ts +1 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.d.ts +2 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/browser/components/DockShell/dockTitle.d.ts +12 -0
- package/dist/package/browser/components/DockShell/dockTitle.js +36 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.d.ts +1 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.d.ts +24 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/browser/components/DockShell/edgePinStore.d.ts +12 -0
- package/dist/package/browser/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.d.ts +13 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.d.ts +8 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.d.ts +17 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.d.ts +7 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/browser/components/DockShell/footer-panels.d.ts +2 -0
- package/dist/package/browser/components/DockShell/footer-panels.js +7 -0
- package/dist/package/browser/components/DockShell/panelRegistry.d.ts +37 -0
- package/dist/package/browser/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/browser/components/DockShell/panelRenderers.d.ts +325 -0
- package/dist/package/browser/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.d.ts +18 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/browser/components/DockShell/panelWindowing.d.ts +32 -0
- package/dist/package/browser/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/browser/components/DockShell/regions.d.ts +1 -0
- package/dist/package/browser/components/DockShell/regions.js +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.d.ts +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.d.ts +3 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.d.ts +1 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.d.ts +13 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.d.ts +29 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.d.ts +80 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.d.ts +94 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.d.ts +32 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/browser/components/DockShell/ueDrag/ueDrag.css +199 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.d.ts +5 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.css +143 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.d.ts +19 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.d.ts +12 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.d.ts +15 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/browser/components/ErrorBoundary.d.ts +55 -0
- package/dist/package/browser/components/ErrorBoundary.js +131 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.d.ts +28 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.d.ts +14 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.css +640 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.d.ts +8 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.css +179 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.d.ts +2 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/browser/components/Feedback/collect.d.ts +15 -0
- package/dist/package/browser/components/Feedback/collect.js +80 -0
- package/dist/package/browser/components/Feedback/store.d.ts +61 -0
- package/dist/package/browser/components/Feedback/store.js +174 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.css +78 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.d.ts +14 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.d.ts +1 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/browser/components/MainArea/MainArea.css +2130 -0
- package/dist/package/browser/components/MainArea/MainArea.d.ts +2 -0
- package/dist/package/browser/components/MainArea/MainArea.js +20 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.d.ts +25 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.d.ts +3 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.css +122 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.d.ts +36 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/browser/components/MenuBar/MenuBar.css +186 -0
- package/dist/package/browser/components/MenuBar/MenuBar.d.ts +27 -0
- package/dist/package/browser/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/browser/components/MenuBar/index.d.ts +1 -0
- package/dist/package/browser/components/MenuBar/index.js +1 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.d.ts +8 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.d.ts +30 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/browser/components/ModelPicker/index.d.ts +1 -0
- package/dist/package/browser/components/ModelPicker/index.js +1 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.d.ts +22 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.d.ts +2 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/browser/components/Onboarding/Onboarding.css +232 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.d.ts +10 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/browser/components/Onboarding/connect-selection.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/browser/components/Onboarding/home-transition.d.ts +9 -0
- package/dist/package/browser/components/Onboarding/home-transition.js +20 -0
- package/dist/package/browser/components/Onboarding/index.d.ts +4 -0
- package/dist/package/browser/components/Onboarding/index.js +3 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.d.ts +5 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/browser/components/Onboarding/project-name.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/project-name.js +29 -0
- package/dist/package/browser/components/Onboarding/types.d.ts +31 -0
- package/dist/package/browser/components/Onboarding/types.js +77 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.css +221 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.d.ts +3 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.d.ts +9 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/browser/components/PanelShell/PanelShell.css +517 -0
- package/dist/package/browser/components/PanelShell/PanelShell.d.ts +7 -0
- package/dist/package/browser/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/browser/components/Resize/ResizeHandle.d.ts +1 -0
- package/dist/package/browser/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.d.ts +2 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.css +138 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.d.ts +17 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.d.ts +30 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/browser/components/SettingsPrimitives.d.ts +24 -0
- package/dist/package/browser/components/SettingsPrimitives.js +145 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/browser/components/Sidebar/Sidebar.css +1393 -0
- package/dist/package/browser/components/Sidebar/Sidebar.d.ts +3 -0
- package/dist/package/browser/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.d.ts +18 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.d.ts +25 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/browser/components/StatusBar/GlobalStatusBar.css +304 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.css +174 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.d.ts +19 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/browser/components/StatusBar/StatusChip.css +52 -0
- package/dist/package/browser/components/StatusBar/StatusChip.d.ts +40 -0
- package/dist/package/browser/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/browser/components/StatusBar/StripHostView.d.ts +2 -0
- package/dist/package/browser/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/browser/components/StatusBar/StripPopover.css +58 -0
- package/dist/package/browser/components/StatusBar/StripPopover.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.d.ts +14 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/browser/components/StatusBar/footer/footer.css +178 -0
- package/dist/package/browser/components/StatusBar/healthBridge.d.ts +38 -0
- package/dist/package/browser/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/browser/components/StatusBar/healthStore.d.ts +80 -0
- package/dist/package/browser/components/StatusBar/healthStore.js +129 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.d.ts +10 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAlive.css +34 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.d.ts +3 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.css +160 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.d.ts +9 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/FsBrowser.css +156 -0
- package/dist/package/browser/components/TopBar/FsBrowser.d.ts +8 -0
- package/dist/package/browser/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.d.ts +29 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.d.ts +3 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.css +133 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.d.ts +10 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.d.ts +2 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/browser/components/TopBar/TopBar.css +1672 -0
- package/dist/package/browser/components/TopBar/TopBar.d.ts +2 -0
- package/dist/package/browser/components/TopBar/TopBar.js +606 -0
- package/dist/package/browser/components/TopBar/publish-options.d.ts +20 -0
- package/dist/package/browser/components/TopBar/publish-options.js +28 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.css +122 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.d.ts +26 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/browser/components/TourOverlay/index.d.ts +2 -0
- package/dist/package/browser/components/TourOverlay/index.js +1 -0
- package/dist/package/browser/components/ownership.d.ts +7 -0
- package/dist/package/browser/components/ownership.js +7 -0
- package/dist/package/browser/components/ui/SearchableMenu.css +143 -0
- package/dist/package/browser/components/ui/SearchableMenu.d.ts +30 -0
- package/dist/package/browser/components/ui/SearchableMenu.js +40 -0
- package/dist/package/browser/components/ui/alert-dialog.d.ts +20 -0
- package/dist/package/browser/components/ui/alert-dialog.js +38 -0
- package/dist/package/browser/components/ui/button.d.ts +11 -0
- package/dist/package/browser/components/ui/button.js +33 -0
- package/dist/package/browser/components/ui/checkbox.d.ts +4 -0
- package/dist/package/browser/components/ui/checkbox.js +8 -0
- package/dist/package/browser/components/ui/command.d.ts +74 -0
- package/dist/package/browser/components/ui/command.js +20 -0
- package/dist/package/browser/components/ui/dialog.d.ts +21 -0
- package/dist/package/browser/components/ui/dialog.js +34 -0
- package/dist/package/browser/components/ui/dropdown-menu.d.ts +18 -0
- package/dist/package/browser/components/ui/dropdown-menu.js +30 -0
- package/dist/package/browser/components/ui/input.d.ts +3 -0
- package/dist/package/browser/components/ui/input.js +8 -0
- package/dist/package/browser/components/ui/label.d.ts +4 -0
- package/dist/package/browser/components/ui/label.js +7 -0
- package/dist/package/browser/components/ui/popover.d.ts +7 -0
- package/dist/package/browser/components/ui/popover.js +10 -0
- package/dist/package/browser/components/ui/select.d.ts +11 -0
- package/dist/package/browser/components/ui/select.js +31 -0
- package/dist/package/browser/components/ui/tabs.d.ts +7 -0
- package/dist/package/browser/components/ui/tabs.js +12 -0
- package/dist/package/browser/components/ui/textarea.d.ts +3 -0
- package/dist/package/browser/components/ui/textarea.js +8 -0
- package/dist/package/browser/components/ui/tooltip.d.ts +7 -0
- package/dist/package/browser/components/ui/tooltip.js +10 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.d.ts +28 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.d.ts +2 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/browser/core/app-shell/host.d.ts +31 -0
- package/dist/package/browser/core/app-shell/host.js +188 -0
- package/dist/package/browser/core/app-shell/index.d.ts +7 -0
- package/dist/package/browser/core/app-shell/index.js +8 -0
- package/dist/package/browser/core/app-shell/logger.d.ts +2 -0
- package/dist/package/browser/core/app-shell/logger.js +6 -0
- package/dist/package/browser/core/app-shell/ownership.d.ts +7 -0
- package/dist/package/browser/core/app-shell/ownership.js +7 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.d.ts +10 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/browser/core/app-shell/surface-extension.d.ts +17 -0
- package/dist/package/browser/core/app-shell/surface-extension.js +33 -0
- package/dist/package/browser/core/app-shell/types.d.ts +176 -0
- package/dist/package/browser/core/app-shell/types.js +1 -0
- package/dist/package/browser/core/contextual-keybindings.d.ts +71 -0
- package/dist/package/browser/core/contextual-keybindings.js +198 -0
- package/dist/package/browser/core/extension-foundation/bus.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/bus.js +3 -0
- package/dist/package/browser/core/extension-foundation/capabilities.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/browser/core/extension-foundation/commands.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/commands.js +3 -0
- package/dist/package/browser/core/extension-foundation/context-keys.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/browser/core/extension-foundation/errors.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/errors.js +3 -0
- package/dist/package/browser/core/extension-foundation/index.d.ts +8 -0
- package/dist/package/browser/core/extension-foundation/index.js +9 -0
- package/dist/package/browser/core/extension-foundation/loader.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/loader.js +3 -0
- package/dist/package/browser/core/extension-foundation/storage.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/storage.js +3 -0
- package/dist/package/browser/core/extension-foundation/types.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/types.js +1 -0
- package/dist/package/browser/core/extensions/builtin-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-commands.js +256 -0
- package/dist/package/browser/core/extensions/builtin-menus.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-menus.js +252 -0
- package/dist/package/browser/core/extensions/chrome-drawer.d.ts +3 -0
- package/dist/package/browser/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.d.ts +6 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/browser/core/extensions/detached-files-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/browser/core/extensions/editor-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/editor-commands.js +182 -0
- package/dist/package/browser/core/extensions/foundation-bus.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-bus.js +3 -0
- package/dist/package/browser/core/extensions/foundation-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-commands.js +6 -0
- package/dist/package/browser/core/extensions/foundation-storage.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-storage.js +3 -0
- package/dist/package/browser/core/extensions/host-commands.d.ts +18 -0
- package/dist/package/browser/core/extensions/host-commands.js +52 -0
- package/dist/package/browser/core/extensions/observability.d.ts +14 -0
- package/dist/package/browser/core/extensions/observability.js +18 -0
- package/dist/package/browser/core/extensions/panels-chat.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-chat.js +41 -0
- package/dist/package/browser/core/extensions/panels-editor.d.ts +8 -0
- package/dist/package/browser/core/extensions/panels-editor.js +26 -0
- package/dist/package/browser/core/extensions/panels-viewport.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-viewport.js +20 -0
- package/dist/package/browser/core/extensions/session-client.d.ts +29 -0
- package/dist/package/browser/core/extensions/session-client.js +42 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.d.ts +5 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.d.ts +12 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.d.ts +3 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/browser/core/extensions/trajectory.d.ts +2 -0
- package/dist/package/browser/core/extensions/trajectory.js +50 -0
- package/dist/package/browser/core/page-navigation.d.ts +1 -0
- package/dist/package/browser/core/page-navigation.js +1 -0
- package/dist/package/browser/core/page-platform/activity.d.ts +4 -0
- package/dist/package/browser/core/page-platform/activity.js +46 -0
- package/dist/package/browser/core/page-platform/dockview-layout.d.ts +7 -0
- package/dist/package/browser/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/browser/core/page-platform/index.d.ts +8 -0
- package/dist/package/browser/core/page-platform/index.js +8 -0
- package/dist/package/browser/core/page-platform/layout-store.d.ts +18 -0
- package/dist/package/browser/core/page-platform/layout-store.js +54 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.d.ts +1 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/browser/core/page-platform/registry.d.ts +3 -0
- package/dist/package/browser/core/page-platform/registry.js +194 -0
- package/dist/package/browser/core/page-platform/resource-editor.d.ts +3 -0
- package/dist/package/browser/core/page-platform/resource-editor.js +74 -0
- package/dist/package/browser/core/page-platform/session.d.ts +10 -0
- package/dist/package/browser/core/page-platform/session.js +327 -0
- package/dist/package/browser/core/page-platform/types.d.ts +242 -0
- package/dist/package/browser/core/page-platform/types.js +10 -0
- package/dist/package/browser/core/panels/context-expression.d.ts +1 -0
- package/dist/package/browser/core/panels/context-expression.js +1 -0
- package/dist/package/browser/core/panels/drawer.d.ts +23 -0
- package/dist/package/browser/core/panels/drawer.js +1 -0
- package/dist/package/browser/core/panels/index.d.ts +7 -0
- package/dist/package/browser/core/panels/index.js +7 -0
- package/dist/package/browser/core/panels/panel-action-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-action-registry.js +62 -0
- package/dist/package/browser/core/panels/panel-control-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-control-registry.js +54 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.d.ts +10 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/browser/core/panels/strip.d.ts +40 -0
- package/dist/package/browser/core/panels/strip.js +1 -0
- package/dist/package/browser/core/panels/types.d.ts +143 -0
- package/dist/package/browser/core/panels/types.js +1 -0
- package/dist/package/browser/i18n/index.d.ts +50 -0
- package/dist/package/browser/i18n/index.js +207 -0
- package/dist/package/browser/i18n/locales/en.json +1959 -0
- package/dist/package/browser/i18n/locales/zh.json +1959 -0
- package/dist/package/browser/index.d.ts +2 -0
- package/dist/package/browser/index.js +2 -0
- package/dist/package/browser/lib/a11y-summary.d.ts +17 -0
- package/dist/package/browser/lib/a11y-summary.js +66 -0
- package/dist/package/browser/lib/action-dom-discovery.d.ts +2 -0
- package/dist/package/browser/lib/action-dom-discovery.js +84 -0
- package/dist/package/browser/lib/action-registry.d.ts +94 -0
- package/dist/package/browser/lib/action-registry.js +210 -0
- package/dist/package/browser/lib/aegis.d.ts +40 -0
- package/dist/package/browser/lib/aegis.js +230 -0
- package/dist/package/browser/lib/agent-catalog-url.d.ts +9 -0
- package/dist/package/browser/lib/agent-catalog-url.js +24 -0
- package/dist/package/browser/lib/agent-cli-provider.d.ts +10 -0
- package/dist/package/browser/lib/agent-cli-provider.js +81 -0
- package/dist/package/browser/lib/ai-intents.d.ts +30 -0
- package/dist/package/browser/lib/ai-intents.js +52 -0
- package/dist/package/browser/lib/broadcast-stream.d.ts +17 -0
- package/dist/package/browser/lib/broadcast-stream.js +163 -0
- package/dist/package/browser/lib/browser-prefs-sync.d.ts +16 -0
- package/dist/package/browser/lib/browser-prefs-sync.js +151 -0
- package/dist/package/browser/lib/builtin-actions.d.ts +2 -0
- package/dist/package/browser/lib/builtin-actions.js +558 -0
- package/dist/package/browser/lib/bus.d.ts +25 -0
- package/dist/package/browser/lib/bus.js +71 -0
- package/dist/package/browser/lib/checkpoint-api.d.ts +54 -0
- package/dist/package/browser/lib/checkpoint-api.js +41 -0
- package/dist/package/browser/lib/cli-providers.d.ts +33 -0
- package/dist/package/browser/lib/cli-providers.js +61 -0
- package/dist/package/browser/lib/command-palette-store.d.ts +5 -0
- package/dist/package/browser/lib/command-palette-store.js +22 -0
- package/dist/package/browser/lib/composer-bridge.d.ts +103 -0
- package/dist/package/browser/lib/composer-bridge.js +448 -0
- package/dist/package/browser/lib/dashboard-api.d.ts +104 -0
- package/dist/package/browser/lib/dashboard-api.js +125 -0
- package/dist/package/browser/lib/deep-link-bus.d.ts +10 -0
- package/dist/package/browser/lib/deep-link-bus.js +35 -0
- package/dist/package/browser/lib/dialog.d.ts +40 -0
- package/dist/package/browser/lib/dialog.js +103 -0
- package/dist/package/browser/lib/editor-facts-bus.d.ts +27 -0
- package/dist/package/browser/lib/editor-facts-bus.js +25 -0
- package/dist/package/browser/lib/extension-api.d.ts +140 -0
- package/dist/package/browser/lib/extension-api.js +90 -0
- package/dist/package/browser/lib/file-activity-stream.d.ts +54 -0
- package/dist/package/browser/lib/file-activity-stream.js +123 -0
- package/dist/package/browser/lib/file-family.d.ts +15 -0
- package/dist/package/browser/lib/file-family.js +25 -0
- package/dist/package/browser/lib/game-templates.d.ts +7 -0
- package/dist/package/browser/lib/game-templates.js +15 -0
- package/dist/package/browser/lib/global-shortcuts.d.ts +121 -0
- package/dist/package/browser/lib/global-shortcuts.js +551 -0
- package/dist/package/browser/lib/logSink.d.ts +16 -0
- package/dist/package/browser/lib/logSink.js +128 -0
- package/dist/package/browser/lib/lucide-icon.d.ts +5 -0
- package/dist/package/browser/lib/lucide-icon.js +20 -0
- package/dist/package/browser/lib/menu-registry.d.ts +113 -0
- package/dist/package/browser/lib/menu-registry.js +197 -0
- package/dist/package/browser/lib/model-config.d.ts +89 -0
- package/dist/package/browser/lib/model-config.js +72 -0
- package/dist/package/browser/lib/model-prefs.d.ts +5 -0
- package/dist/package/browser/lib/model-prefs.js +53 -0
- package/dist/package/browser/lib/model-route/index.d.ts +81 -0
- package/dist/package/browser/lib/model-route/index.js +175 -0
- package/dist/package/browser/lib/narrative-copilot.d.ts +20 -0
- package/dist/package/browser/lib/narrative-copilot.js +105 -0
- package/dist/package/browser/lib/native-menu-bridge.d.ts +37 -0
- package/dist/package/browser/lib/native-menu-bridge.js +151 -0
- package/dist/package/browser/lib/page-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/page-tab-icons.js +64 -0
- package/dist/package/browser/lib/panel-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/panel-tab-icons.js +49 -0
- package/dist/package/browser/lib/passive-feedback.d.ts +50 -0
- package/dist/package/browser/lib/passive-feedback.js +171 -0
- package/dist/package/browser/lib/perception-stream.d.ts +27 -0
- package/dist/package/browser/lib/perception-stream.js +42 -0
- package/dist/package/browser/lib/platform/index.d.ts +14 -0
- package/dist/package/browser/lib/platform/index.js +13 -0
- package/dist/package/browser/lib/platform/runtime.d.ts +22 -0
- package/dist/package/browser/lib/platform/runtime.js +42 -0
- package/dist/package/browser/lib/platform/shell-adapter.d.ts +24 -0
- package/dist/package/browser/lib/platform/shell-adapter.js +74 -0
- package/dist/package/browser/lib/platform/surface-windowing.d.ts +4 -0
- package/dist/package/browser/lib/platform/surface-windowing.js +16 -0
- package/dist/package/browser/lib/platform/surface.d.ts +13 -0
- package/dist/package/browser/lib/platform/surface.js +27 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.d.ts +1 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/browser/lib/platform/window-manager.d.ts +2 -0
- package/dist/package/browser/lib/platform/window-manager.js +82 -0
- package/dist/package/browser/lib/project-context.d.ts +4 -0
- package/dist/package/browser/lib/project-context.js +42 -0
- package/dist/package/browser/lib/project.d.ts +5 -0
- package/dist/package/browser/lib/project.js +8 -0
- package/dist/package/browser/lib/recent-games.d.ts +24 -0
- package/dist/package/browser/lib/recent-games.js +50 -0
- package/dist/package/browser/lib/repair-builtin-menus.d.ts +6 -0
- package/dist/package/browser/lib/repair-builtin-menus.js +18 -0
- package/dist/package/browser/lib/reply-language.d.ts +9 -0
- package/dist/package/browser/lib/reply-language.js +11 -0
- package/dist/package/browser/lib/resilient-polling.d.ts +9 -0
- package/dist/package/browser/lib/resilient-polling.js +16 -0
- package/dist/package/browser/lib/session-time.d.ts +8 -0
- package/dist/package/browser/lib/session-time.js +40 -0
- package/dist/package/browser/lib/shell-live-data.d.ts +12 -0
- package/dist/package/browser/lib/shell-live-data.js +66 -0
- package/dist/package/browser/lib/sse.d.ts +5 -0
- package/dist/package/browser/lib/sse.js +42 -0
- package/dist/package/browser/lib/storageKeys.d.ts +70 -0
- package/dist/package/browser/lib/storageKeys.js +89 -0
- package/dist/package/browser/lib/surface-store.d.ts +38 -0
- package/dist/package/browser/lib/surface-store.js +62 -0
- package/dist/package/browser/lib/surface.d.ts +56 -0
- package/dist/package/browser/lib/surface.js +225 -0
- package/dist/package/browser/lib/surfaceAnchors.d.ts +16 -0
- package/dist/package/browser/lib/surfaceAnchors.js +76 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.d.ts +7 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/browser/lib/telemetry-test-prelude.d.ts +0 -0
- package/dist/package/browser/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/browser/lib/text-edit-actions.d.ts +14 -0
- package/dist/package/browser/lib/text-edit-actions.js +184 -0
- package/dist/package/browser/lib/trace.d.ts +34 -0
- package/dist/package/browser/lib/trace.js +273 -0
- package/dist/package/browser/lib/trustedOrigins.d.ts +4 -0
- package/dist/package/browser/lib/trustedOrigins.js +36 -0
- package/dist/package/browser/lib/ui-action-highlight.d.ts +2 -0
- package/dist/package/browser/lib/ui-action-highlight.js +93 -0
- package/dist/package/browser/lib/ui-bridge.d.ts +2 -0
- package/dist/package/browser/lib/ui-bridge.js +224 -0
- package/dist/package/browser/lib/ui-screenshot.d.ts +31 -0
- package/dist/package/browser/lib/ui-screenshot.js +155 -0
- package/dist/package/browser/lib/ui-trajectory.d.ts +47 -0
- package/dist/package/browser/lib/ui-trajectory.js +99 -0
- package/dist/package/browser/lib/use-bus-snapshot.d.ts +3 -0
- package/dist/package/browser/lib/use-bus-snapshot.js +13 -0
- package/dist/package/browser/lib/use-extension-manifest.d.ts +19 -0
- package/dist/package/browser/lib/use-extension-manifest.js +67 -0
- package/dist/package/browser/lib/useConfirmToast.d.ts +26 -0
- package/dist/package/browser/lib/useConfirmToast.js +120 -0
- package/dist/package/browser/lib/utils.d.ts +2 -0
- package/dist/package/browser/lib/utils.js +5 -0
- package/dist/package/browser/lib/vag-action-bridge.d.ts +2 -0
- package/dist/package/browser/lib/vag-action-bridge.js +130 -0
- package/dist/package/browser/main.d.ts +1 -0
- package/dist/package/browser/main.js +157 -0
- package/dist/package/browser/store-parts/domain-clients.d.ts +149 -0
- package/dist/package/browser/store-parts/domain-clients.js +17 -0
- package/dist/package/browser/store-parts/observability.d.ts +4 -0
- package/dist/package/browser/store-parts/observability.js +35 -0
- package/dist/package/browser/store-parts/persistence.d.ts +40 -0
- package/dist/package/browser/store-parts/persistence.js +245 -0
- package/dist/package/browser/store-parts/session-client.d.ts +73 -0
- package/dist/package/browser/store-parts/session-client.js +17 -0
- package/dist/package/browser/store-parts/session-pick.d.ts +8 -0
- package/dist/package/browser/store-parts/session-pick.js +21 -0
- package/dist/package/browser/store-parts/shell.d.ts +5 -0
- package/dist/package/browser/store-parts/shell.js +37 -0
- package/dist/package/browser/store.d.ts +455 -0
- package/dist/package/browser/store.js +890 -0
- package/dist/package/browser/styles/forgeax-preview/agent-avatar.css +69 -0
- package/dist/package/browser/styles/forgeax-preview/aliases.css +21 -0
- package/dist/package/browser/styles/forgeax-preview/chat-popover.css +141 -0
- package/dist/package/browser/styles/forgeax-preview/chat-session.css +896 -0
- package/dist/package/browser/styles/forgeax-preview/composer-port.css +531 -0
- package/dist/package/browser/styles/forgeax-preview/design-tokens.css +25 -0
- package/dist/package/browser/styles/forgeax-preview/index.css +9 -0
- package/dist/package/browser/styles/forgeax-preview/scene-fx.css +117 -0
- package/dist/package/browser/styles/forgeax-preview/shell-layout.css +280 -0
- package/dist/package/browser/styles/forgeax-preview/shell-skin.css +128 -0
- package/dist/package/browser/styles/foundation.tokens.json +2755 -0
- package/dist/package/browser/styles/global.css +196 -0
- package/dist/package/browser/styles/motion.css +558 -0
- package/dist/package/browser/styles/plugin-token-bridge.css +19 -0
- package/dist/package/browser/styles/primitive.css +197 -0
- package/dist/package/browser/styles/semantic.tokens.json +1524 -0
- package/dist/package/browser/styles/tokens.css +304 -0
- package/dist/package/node/App.js +11 -0
- package/dist/package/node/ApplicationDetachedShell.js +10 -0
- package/dist/package/node/ApplicationShell.js +62 -0
- package/dist/package/node/app-kit.js +4 -0
- package/dist/package/node/appHostBootstrap.js +145 -0
- package/dist/package/node/application.js +64 -0
- package/dist/package/node/boot/SettingsSection.js +82 -0
- package/dist/package/node/boot/broadcast.js +32 -0
- package/dist/package/node/boot/driver.js +47 -0
- package/dist/package/node/boot/store.js +114 -0
- package/dist/package/node/boot/themes.js +21 -0
- package/dist/package/node/boot/types.js +30 -0
- package/dist/package/node/brand/BrandProvider.js +35 -0
- package/dist/package/node/brand/index.js +3 -0
- package/dist/package/node/brand/runtime.js +71 -0
- package/dist/package/node/brand/types.js +9 -0
- package/dist/package/node/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/node/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/node/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/node/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/node/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/node/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/node/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/node/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/node/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/node/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/node/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/node/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/node/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/node/components/DetachedSurface.js +102 -0
- package/dist/package/node/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/node/components/DockShell/DockRegion.js +315 -0
- package/dist/package/node/components/DockShell/DockTab.js +139 -0
- package/dist/package/node/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/node/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/node/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/node/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/node/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/node/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/node/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/node/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/node/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/node/components/DockShell/dockTitle.js +36 -0
- package/dist/package/node/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/node/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/node/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/node/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/node/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/node/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/node/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/node/components/DockShell/footer-panels.js +7 -0
- package/dist/package/node/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/node/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/node/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/node/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/node/components/DockShell/regions.js +1 -0
- package/dist/package/node/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/node/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/node/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/node/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/node/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/node/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/node/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/node/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/node/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/node/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/node/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/node/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/node/components/ErrorBoundary.js +131 -0
- package/dist/package/node/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/node/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/node/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/node/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/node/components/Feedback/collect.js +80 -0
- package/dist/package/node/components/Feedback/store.js +174 -0
- package/dist/package/node/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/node/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/node/components/MainArea/MainArea.js +20 -0
- package/dist/package/node/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/node/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/node/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/node/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/node/components/MenuBar/index.js +1 -0
- package/dist/package/node/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/node/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/node/components/ModelPicker/index.js +1 -0
- package/dist/package/node/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/node/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/node/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/node/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/node/components/Onboarding/home-transition.js +20 -0
- package/dist/package/node/components/Onboarding/index.js +3 -0
- package/dist/package/node/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/node/components/Onboarding/project-name.js +29 -0
- package/dist/package/node/components/Onboarding/types.js +77 -0
- package/dist/package/node/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/node/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/node/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/node/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/node/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/node/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/node/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/node/components/SettingsPrimitives.js +145 -0
- package/dist/package/node/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/node/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/node/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/node/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/node/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/node/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/node/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/node/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/node/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/node/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/node/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/node/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/node/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/node/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/node/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/node/components/StatusBar/healthStore.js +129 -0
- package/dist/package/node/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/node/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/node/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/node/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/node/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/node/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/node/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/node/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/node/components/TopBar/TopBar.js +606 -0
- package/dist/package/node/components/TopBar/publish-options.js +28 -0
- package/dist/package/node/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/node/components/TourOverlay/index.js +1 -0
- package/dist/package/node/components/ownership.js +7 -0
- package/dist/package/node/components/ui/SearchableMenu.js +40 -0
- package/dist/package/node/components/ui/alert-dialog.js +38 -0
- package/dist/package/node/components/ui/button.js +33 -0
- package/dist/package/node/components/ui/checkbox.js +8 -0
- package/dist/package/node/components/ui/command.js +20 -0
- package/dist/package/node/components/ui/dialog.js +34 -0
- package/dist/package/node/components/ui/dropdown-menu.js +30 -0
- package/dist/package/node/components/ui/input.js +8 -0
- package/dist/package/node/components/ui/label.js +7 -0
- package/dist/package/node/components/ui/popover.js +10 -0
- package/dist/package/node/components/ui/select.js +31 -0
- package/dist/package/node/components/ui/tabs.js +12 -0
- package/dist/package/node/components/ui/textarea.js +8 -0
- package/dist/package/node/components/ui/tooltip.js +10 -0
- package/dist/package/node/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/node/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/node/core/app-shell/host.js +188 -0
- package/dist/package/node/core/app-shell/index.js +8 -0
- package/dist/package/node/core/app-shell/logger.js +6 -0
- package/dist/package/node/core/app-shell/ownership.js +7 -0
- package/dist/package/node/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/node/core/app-shell/surface-extension.js +33 -0
- package/dist/package/node/core/app-shell/types.js +1 -0
- package/dist/package/node/core/contextual-keybindings.js +198 -0
- package/dist/package/node/core/extension-foundation/bus.js +3 -0
- package/dist/package/node/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/node/core/extension-foundation/commands.js +3 -0
- package/dist/package/node/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/node/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/node/core/extension-foundation/errors.js +3 -0
- package/dist/package/node/core/extension-foundation/index.js +9 -0
- package/dist/package/node/core/extension-foundation/loader.js +3 -0
- package/dist/package/node/core/extension-foundation/storage.js +3 -0
- package/dist/package/node/core/extension-foundation/types.js +1 -0
- package/dist/package/node/core/extensions/builtin-commands.js +256 -0
- package/dist/package/node/core/extensions/builtin-menus.js +252 -0
- package/dist/package/node/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/node/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/node/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/node/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/node/core/extensions/editor-commands.js +182 -0
- package/dist/package/node/core/extensions/foundation-bus.js +3 -0
- package/dist/package/node/core/extensions/foundation-commands.js +6 -0
- package/dist/package/node/core/extensions/foundation-storage.js +3 -0
- package/dist/package/node/core/extensions/host-commands.js +52 -0
- package/dist/package/node/core/extensions/observability.js +18 -0
- package/dist/package/node/core/extensions/panels-chat.js +41 -0
- package/dist/package/node/core/extensions/panels-editor.js +26 -0
- package/dist/package/node/core/extensions/panels-viewport.js +20 -0
- package/dist/package/node/core/extensions/session-client.js +42 -0
- package/dist/package/node/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/node/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/node/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/node/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/node/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/node/core/extensions/trajectory.js +50 -0
- package/dist/package/node/core/page-navigation.js +1 -0
- package/dist/package/node/core/page-platform/activity.js +46 -0
- package/dist/package/node/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/node/core/page-platform/index.js +8 -0
- package/dist/package/node/core/page-platform/layout-store.js +54 -0
- package/dist/package/node/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/node/core/page-platform/registry.js +194 -0
- package/dist/package/node/core/page-platform/resource-editor.js +74 -0
- package/dist/package/node/core/page-platform/session.js +327 -0
- package/dist/package/node/core/page-platform/types.js +10 -0
- package/dist/package/node/core/panels/context-expression.js +1 -0
- package/dist/package/node/core/panels/drawer.js +1 -0
- package/dist/package/node/core/panels/index.js +7 -0
- package/dist/package/node/core/panels/panel-action-registry.js +62 -0
- package/dist/package/node/core/panels/panel-control-registry.js +54 -0
- package/dist/package/node/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/node/core/panels/strip.js +1 -0
- package/dist/package/node/core/panels/types.js +1 -0
- package/dist/package/node/i18n/index.js +207 -0
- package/dist/package/node/i18n/locales/en.json +1959 -0
- package/dist/package/node/i18n/locales/zh.json +1959 -0
- package/dist/package/node/index.js +2 -0
- package/dist/package/node/lib/a11y-summary.js +66 -0
- package/dist/package/node/lib/action-dom-discovery.js +84 -0
- package/dist/package/node/lib/action-registry.js +210 -0
- package/dist/package/node/lib/aegis.js +230 -0
- package/dist/package/node/lib/agent-catalog-url.js +24 -0
- package/dist/package/node/lib/agent-cli-provider.js +81 -0
- package/dist/package/node/lib/ai-intents.js +52 -0
- package/dist/package/node/lib/broadcast-stream.js +163 -0
- package/dist/package/node/lib/browser-prefs-sync.js +151 -0
- package/dist/package/node/lib/builtin-actions.js +558 -0
- package/dist/package/node/lib/bus.js +71 -0
- package/dist/package/node/lib/checkpoint-api.js +41 -0
- package/dist/package/node/lib/cli-providers.js +61 -0
- package/dist/package/node/lib/command-palette-store.js +22 -0
- package/dist/package/node/lib/composer-bridge.js +448 -0
- package/dist/package/node/lib/dashboard-api.js +125 -0
- package/dist/package/node/lib/deep-link-bus.js +35 -0
- package/dist/package/node/lib/dialog.js +103 -0
- package/dist/package/node/lib/editor-facts-bus.js +25 -0
- package/dist/package/node/lib/extension-api.js +90 -0
- package/dist/package/node/lib/file-activity-stream.js +123 -0
- package/dist/package/node/lib/file-family.js +25 -0
- package/dist/package/node/lib/game-templates.js +15 -0
- package/dist/package/node/lib/global-shortcuts.js +551 -0
- package/dist/package/node/lib/logSink.js +128 -0
- package/dist/package/node/lib/lucide-icon.js +20 -0
- package/dist/package/node/lib/menu-registry.js +197 -0
- package/dist/package/node/lib/model-config.js +72 -0
- package/dist/package/node/lib/model-prefs.js +53 -0
- package/dist/package/node/lib/model-route/index.js +175 -0
- package/dist/package/node/lib/narrative-copilot.js +105 -0
- package/dist/package/node/lib/native-menu-bridge.js +151 -0
- package/dist/package/node/lib/page-tab-icons.js +64 -0
- package/dist/package/node/lib/panel-tab-icons.js +49 -0
- package/dist/package/node/lib/passive-feedback.js +171 -0
- package/dist/package/node/lib/perception-stream.js +42 -0
- package/dist/package/node/lib/platform/index.js +13 -0
- package/dist/package/node/lib/platform/runtime.js +42 -0
- package/dist/package/node/lib/platform/shell-adapter.js +74 -0
- package/dist/package/node/lib/platform/surface-windowing.js +16 -0
- package/dist/package/node/lib/platform/surface.js +27 -0
- package/dist/package/node/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/node/lib/platform/window-manager.js +82 -0
- package/dist/package/node/lib/project-context.js +42 -0
- package/dist/package/node/lib/project.js +8 -0
- package/dist/package/node/lib/recent-games.js +50 -0
- package/dist/package/node/lib/repair-builtin-menus.js +18 -0
- package/dist/package/node/lib/reply-language.js +11 -0
- package/dist/package/node/lib/resilient-polling.js +16 -0
- package/dist/package/node/lib/session-time.js +40 -0
- package/dist/package/node/lib/shell-live-data.js +66 -0
- package/dist/package/node/lib/sse.js +42 -0
- package/dist/package/node/lib/storageKeys.js +89 -0
- package/dist/package/node/lib/surface-store.js +62 -0
- package/dist/package/node/lib/surface.js +225 -0
- package/dist/package/node/lib/surfaceAnchors.js +76 -0
- package/dist/package/node/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/node/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/node/lib/text-edit-actions.js +184 -0
- package/dist/package/node/lib/trace.js +273 -0
- package/dist/package/node/lib/trustedOrigins.js +36 -0
- package/dist/package/node/lib/ui-action-highlight.js +93 -0
- package/dist/package/node/lib/ui-bridge.js +224 -0
- package/dist/package/node/lib/ui-screenshot.js +155 -0
- package/dist/package/node/lib/ui-trajectory.js +99 -0
- package/dist/package/node/lib/use-bus-snapshot.js +13 -0
- package/dist/package/node/lib/use-extension-manifest.js +67 -0
- package/dist/package/node/lib/useConfirmToast.js +120 -0
- package/dist/package/node/lib/utils.js +5 -0
- package/dist/package/node/lib/vag-action-bridge.js +130 -0
- package/dist/package/node/main.js +157 -0
- package/dist/package/node/store-parts/domain-clients.js +17 -0
- package/dist/package/node/store-parts/observability.js +35 -0
- package/dist/package/node/store-parts/persistence.js +245 -0
- package/dist/package/node/store-parts/session-client.js +17 -0
- package/dist/package/node/store-parts/session-pick.js +21 -0
- package/dist/package/node/store-parts/shell.js +37 -0
- package/dist/package/node/store.js +890 -0
- package/dist/package/node/styles/foundation.tokens.json +2755 -0
- package/dist/package/node/styles/semantic.tokens.json +1524 -0
- package/dist/package/packages/design/styles/fx-bridge.css +25 -0
- package/dist/package/packages/design/styles/primitive.css +199 -0
- package/dist/package/packages/design/styles/semantic.css +262 -0
- package/dist/package/packages/design/theme.d.ts +15 -0
- package/dist/package/packages/design/theme.js +31 -0
- package/dist/package/packages/design/tokens.css +14 -0
- package/package.json +145 -0
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
// OnboardingController — faithful port of first-run-onboarding-prototype onto
|
|
3
|
+
// the live shell (design §11). Phases:
|
|
4
|
+
//
|
|
5
|
+
// welcome → language + connect-a-model (mutually exclusive API Key / local CLI;
|
|
6
|
+
// Next probes the selected path) → 2s auto-advance on success.
|
|
7
|
+
// project → root dir + new / open / sample project cards → enter home.
|
|
8
|
+
// home → TourOverlay coach marks over the LIVE shell, then a first-chat
|
|
9
|
+
// nudge near the composer. Completing / skipping ends onboarding.
|
|
10
|
+
//
|
|
11
|
+
// Runtime state (open sub-modal, check result, countdown) is ephemeral; only
|
|
12
|
+
// the phase + milestone flags persist (Onboarding/types).
|
|
13
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
14
|
+
import { createIntervalTaskLifecycle } from '@forgeax/app-shell/react';
|
|
15
|
+
import { useTranslation, changeLanguage, getLocale } from '../../i18n';
|
|
16
|
+
import { getStudioProjectClient, useShellStore } from '../../store';
|
|
17
|
+
import { useHost } from '../../core/app-shell';
|
|
18
|
+
import { applyModelRoute } from '../../lib/model-route';
|
|
19
|
+
import { listModelsWithLive } from '../../lib/model-config';
|
|
20
|
+
import { fetchCliProviders } from '../../lib/cli-providers';
|
|
21
|
+
import { FsBrowser } from '../TopBar/FsBrowser';
|
|
22
|
+
import '../TopBar/FsBrowser.css';
|
|
23
|
+
// FsBrowser's footer buttons are .tb-modal-btn — declare that dependency here
|
|
24
|
+
// instead of inheriting it from TopBar, which is unmounted during onboarding.
|
|
25
|
+
import '../TopBar/TopBar.css';
|
|
26
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select';
|
|
27
|
+
import { TourOverlay } from '../TourOverlay';
|
|
28
|
+
import { APP_EVENTS } from '../../lib/storageKeys';
|
|
29
|
+
import { resolveHomeOnboarding, shouldActivateTour } from './home-transition';
|
|
30
|
+
import { loadOnboarding, saveOnboarding, PHASE_ORDER } from './types';
|
|
31
|
+
import { interpretLiveCatalogProbe, needsConnectSelection, validateApiKeyFields, } from './connect-selection';
|
|
32
|
+
import { isUserExistingGame, resolveProjectName, toGameSlug } from './project-name';
|
|
33
|
+
import { latchTourShellDefaults, prepareTourShell } from './prepareTourShell';
|
|
34
|
+
import { listGameTemplates } from '../../lib/game-templates';
|
|
35
|
+
import './Onboarding.css';
|
|
36
|
+
/** Map raw server errors to onboarding copy (keep unknown messages as-is). */
|
|
37
|
+
function formatProjectError(raw, t) {
|
|
38
|
+
if (/not a game folder/i.test(raw))
|
|
39
|
+
return t('onboarding.project.errNotGame');
|
|
40
|
+
return raw;
|
|
41
|
+
}
|
|
42
|
+
// Install-doc links, keyed by driver id. Optional lookup: a driver reported by
|
|
43
|
+
// /api/cli/health but absent here simply renders without a "how to install" link.
|
|
44
|
+
const CLI_LINKS = {
|
|
45
|
+
'claude-code': { name: 'Claude Code', url: 'https://code.claude.com/docs/en/setup' },
|
|
46
|
+
codex: { name: 'Codex CLI', url: 'https://developers.openai.com/codex/quickstart' },
|
|
47
|
+
'cursor-agent': { name: 'Cursor CLI', url: 'https://cursor.com/docs/cli/installation' },
|
|
48
|
+
codebuddy: { name: 'CodeBuddy CLI', url: 'https://www.codebuddy.ai/cli' },
|
|
49
|
+
'kimi-code': { name: 'Kimi Code CLI', url: 'https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html' },
|
|
50
|
+
'deepseek-harness': { name: 'DeepSeek Harness', url: 'https://github.com/deepseek-ai/deepseek-harness' },
|
|
51
|
+
};
|
|
52
|
+
// The native ForgeaX kernel (forgeax-core / forgeax) is registered in the shared
|
|
53
|
+
// kernel registry, so /api/cli/health surfaces it too — but it is NOT a
|
|
54
|
+
// connectable "Local CLI" (it's the API-key native path). Mirror
|
|
55
|
+
// Settings › Providers and drop it from the Local CLI dropdown.
|
|
56
|
+
const NATIVE_KERNEL_IDS = new Set(['forgeax-core', 'forgeax']);
|
|
57
|
+
// Seed list painted INSTANTLY (before /api/cli/health resolves) so all rows show
|
|
58
|
+
// up immediately in a "checking…" state rather than an empty box. It must be the
|
|
59
|
+
// COMPLETE known driver set (incl. codebuddy) — an incomplete seed was the "3 now,
|
|
60
|
+
// codebuddy later" bug. It is only a paint-fast optimism: once health returns it
|
|
61
|
+
// becomes the source of truth (below), so a future driver it doesn't list still
|
|
62
|
+
// appears, and per-row status is always live.
|
|
63
|
+
const SEED_CLI_IDS = ['claude-code', 'codex', 'cursor-agent', 'codebuddy', 'kimi-code', 'deepseek-harness'];
|
|
64
|
+
/** Local-CLI driver ids to offer. Before health lands: the complete seed (all
|
|
65
|
+
* rows visible, each "checking"). After: derived LIVE from /api/cli/health with
|
|
66
|
+
* the native path dropped — authoritative, so drivers can be added/removed and
|
|
67
|
+
* each row's dot reflects real reachability. */
|
|
68
|
+
function cliIdsFrom(providers) {
|
|
69
|
+
if (!providers)
|
|
70
|
+
return SEED_CLI_IDS;
|
|
71
|
+
return providers.filter((p) => !NATIVE_KERNEL_IDS.has(p.id)).map((p) => p.id);
|
|
72
|
+
}
|
|
73
|
+
// Fallback model pinned when the user activates the API-key source in onboarding
|
|
74
|
+
// without a finer choice — mirrors Settings › Providers (SectionsRegister's
|
|
75
|
+
// `apiModel` fallback) so the active-source derivation resolves to 'api-key'
|
|
76
|
+
// and the native path has a concrete model to call.
|
|
77
|
+
const OB_API_KEY_DEFAULT_MODEL = 'gpt-4o-mini';
|
|
78
|
+
const CLI_STATUS_COLOR = {
|
|
79
|
+
loading: 'var(--ob-text-3)',
|
|
80
|
+
ok: 'var(--ob-ok, #3fa266)',
|
|
81
|
+
down: 'var(--ob-err, #e04a5a)',
|
|
82
|
+
unknown: 'var(--ob-text-3)',
|
|
83
|
+
};
|
|
84
|
+
/** Map a CLI id against live health into a connectable-status token. */
|
|
85
|
+
function cliStatus(id, providers) {
|
|
86
|
+
if (!providers)
|
|
87
|
+
return 'loading';
|
|
88
|
+
const found = providers.find((p) => p.id === id);
|
|
89
|
+
if (!found)
|
|
90
|
+
return 'unknown'; // not reported by /api/cli/health → not installed
|
|
91
|
+
return found.health.ok ? 'ok' : 'down';
|
|
92
|
+
}
|
|
93
|
+
/** Dropdown option: id + a colored status dot + a "connectable" label, so the
|
|
94
|
+
* user can tell which local CLI is actually usable before picking it. */
|
|
95
|
+
function CliOptionLabel({ t, id, providers }) {
|
|
96
|
+
const kind = cliStatus(id, providers);
|
|
97
|
+
// Prefer the health-reported display name (e.g. "CodeBuddy CLI"), then the
|
|
98
|
+
// install-doc table, then the raw id — so the row reads human, not slug.
|
|
99
|
+
const label = providers?.find((p) => p.id === id)?.displayName ?? CLI_LINKS[id]?.name ?? id;
|
|
100
|
+
return (_jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: 8 }, children: [_jsx("span", { style: { width: 7, height: 7, borderRadius: '50%', background: CLI_STATUS_COLOR[kind], flexShrink: 0 } }), _jsx("span", { children: label }), _jsx("span", { className: "fx-ob-tiny fx-ob-muted", children: t(`onboarding.connect.cliStatus.${kind}`) })] }));
|
|
101
|
+
}
|
|
102
|
+
async function patchEnv(patch) {
|
|
103
|
+
const r = await fetch('/api/settings/env', {
|
|
104
|
+
method: 'PUT',
|
|
105
|
+
headers: { 'content-type': 'application/json' },
|
|
106
|
+
body: JSON.stringify(patch),
|
|
107
|
+
});
|
|
108
|
+
const j = (await r.json().catch(() => null));
|
|
109
|
+
if (!r.ok || !j?.ok)
|
|
110
|
+
throw new Error(j?.error ?? `HTTP ${r.status}`);
|
|
111
|
+
}
|
|
112
|
+
export function OnboardingController({ tourEnabled = true } = {}) {
|
|
113
|
+
const { t } = useTranslation();
|
|
114
|
+
const host = useHost();
|
|
115
|
+
const openOverlay = useShellStore((s) => s.openOverlay);
|
|
116
|
+
const setActiveGame = useShellStore((s) => s.setActiveGame);
|
|
117
|
+
const [phase, setPhaseState] = useState(() => loadOnboarding().phase);
|
|
118
|
+
const [lang, setLang] = useState(() => getLocale());
|
|
119
|
+
// ── welcome: connect-a-model runtime ──
|
|
120
|
+
const [selected, setSelected] = useState(null);
|
|
121
|
+
const [baseUrl, setBaseUrl] = useState('');
|
|
122
|
+
const [apiKey, setApiKey] = useState('');
|
|
123
|
+
const [cli, setCli] = useState('claude-code');
|
|
124
|
+
// Live health of local CLI drivers, keyed by provider id — drives the
|
|
125
|
+
// per-option "connectable" status inside the CLI dropdown. Fetched lazily the
|
|
126
|
+
// first time the CLI section is expanded (the endpoint live-checks each CLI).
|
|
127
|
+
const [cliProviders, setCliProviders] = useState(null);
|
|
128
|
+
const [checking, setChecking] = useState(false);
|
|
129
|
+
const [checkResult, setCheckResult] = useState('');
|
|
130
|
+
const [checkFailMsg, setCheckFailMsg] = useState('');
|
|
131
|
+
const [countdown, setCountdown] = useState(null);
|
|
132
|
+
const cdRef = useRef(null);
|
|
133
|
+
// ── project runtime: project = one game directory ──
|
|
134
|
+
const [projName, setProjName] = useState('');
|
|
135
|
+
const [fsOpen, setFsOpen] = useState(false);
|
|
136
|
+
const [tmplOpen, setTmplOpen] = useState(false);
|
|
137
|
+
const [templates, setTemplates] = useState(null);
|
|
138
|
+
const [tmplSlug, setTmplSlug] = useState(null);
|
|
139
|
+
const [projBusy, setProjBusy] = useState(false);
|
|
140
|
+
// Which action is in-flight — drives a specific "creating…/copying…/opening…"
|
|
141
|
+
// loading banner so the (possibly multi-second) server-side copy isn't a
|
|
142
|
+
// silent freeze followed by an abrupt jump to home.
|
|
143
|
+
const [projBusyKind, setProjBusyKind] = useState(null);
|
|
144
|
+
const [projErr, setProjErr] = useState(null);
|
|
145
|
+
// ── home runtime ──
|
|
146
|
+
// Resume from persisted milestones: a returning user who already finished the
|
|
147
|
+
// tour must NOT see it again on reload. The first-chat hint now lives in the
|
|
148
|
+
// chat empty state (ChatPanel), not here.
|
|
149
|
+
const [tourIdx, setTourIdx] = useState(0);
|
|
150
|
+
const [tourActive, setTourActive] = useState(() => shouldActivateTour(tourEnabled, loadOnboarding()));
|
|
151
|
+
// Open the real Level Page so tour anchors (sidebar/viewport/chat) exist.
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (phase !== 'home' || !tourActive)
|
|
154
|
+
return;
|
|
155
|
+
prepareTourShell(host);
|
|
156
|
+
}, [phase, tourActive, host]);
|
|
157
|
+
const setPhase = useCallback((p) => {
|
|
158
|
+
setPhaseState(p);
|
|
159
|
+
const prev = loadOnboarding();
|
|
160
|
+
saveOnboarding({ ...prev, phase: p });
|
|
161
|
+
// Notify the shell gate (App.useOnboardingPhase) so it can mount/unmount the
|
|
162
|
+
// full shell as we move between init (welcome/project) and layout (home).
|
|
163
|
+
window.dispatchEvent(new CustomEvent(APP_EVENTS.onboardingChanged));
|
|
164
|
+
}, []);
|
|
165
|
+
// Repair persisted `home` states left by older IDE builds that disabled the
|
|
166
|
+
// tour without completing the state machine. The initialization policy above
|
|
167
|
+
// suppresses the overlay in memory even when persistence is unavailable.
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (phase !== 'home' || tourEnabled)
|
|
170
|
+
return;
|
|
171
|
+
const transition = resolveHomeOnboarding(loadOnboarding(), false);
|
|
172
|
+
setTourActive(false);
|
|
173
|
+
saveOnboarding(transition.state);
|
|
174
|
+
setPhaseState(transition.state.phase);
|
|
175
|
+
window.dispatchEvent(new CustomEvent(APP_EVENTS.onboardingChanged));
|
|
176
|
+
}, [phase, tourEnabled]);
|
|
177
|
+
const clearCountdown = () => {
|
|
178
|
+
const countdown = cdRef.current;
|
|
179
|
+
cdRef.current = null;
|
|
180
|
+
countdown?.dispose();
|
|
181
|
+
};
|
|
182
|
+
const resetCheck = useCallback(() => {
|
|
183
|
+
clearCountdown();
|
|
184
|
+
setChecking(false);
|
|
185
|
+
setCheckResult('');
|
|
186
|
+
setCheckFailMsg('');
|
|
187
|
+
setCountdown(null);
|
|
188
|
+
}, []);
|
|
189
|
+
useEffect(() => () => clearCountdown(), []);
|
|
190
|
+
// Prefetch local CLI health on mount (NOT lazily on card-open): the probe
|
|
191
|
+
// live-checks every driver binary and takes a few seconds, so firing it while
|
|
192
|
+
// the user is still reading the welcome screen means the dropdown is already
|
|
193
|
+
// correct + complete (incl. codebuddy) by the time they expand the CLI card —
|
|
194
|
+
// no stale-then-mutate flash.
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
if (cliProviders)
|
|
197
|
+
return;
|
|
198
|
+
let cancelled = false;
|
|
199
|
+
fetchCliProviders()
|
|
200
|
+
.then(({ providers }) => {
|
|
201
|
+
if (cancelled)
|
|
202
|
+
return;
|
|
203
|
+
setCliProviders(providers);
|
|
204
|
+
// Correct the default selection once the live set is known: if the
|
|
205
|
+
// preset (claude-code) isn't among the connectable drivers this
|
|
206
|
+
// machine reports, fall back to the first one so the dropdown never
|
|
207
|
+
// shows a value that has no option row.
|
|
208
|
+
const ids = cliIdsFrom(providers);
|
|
209
|
+
if (ids.length > 0 && !ids.includes(cli))
|
|
210
|
+
setCli(ids[0]);
|
|
211
|
+
})
|
|
212
|
+
.catch(() => { if (!cancelled)
|
|
213
|
+
setCliProviders([]); });
|
|
214
|
+
return () => { cancelled = true; };
|
|
215
|
+
}, [cliProviders, cli]);
|
|
216
|
+
const connectedList = useCallback(() => {
|
|
217
|
+
if (selected === 'key')
|
|
218
|
+
return [t('onboarding.connected.key')];
|
|
219
|
+
if (selected === 'cli')
|
|
220
|
+
return [t('onboarding.connected.cli', { cli })];
|
|
221
|
+
return [];
|
|
222
|
+
}, [selected, cli, t]);
|
|
223
|
+
const beginCountdown = useCallback(() => {
|
|
224
|
+
setCountdown(2);
|
|
225
|
+
const countdown = createIntervalTaskLifecycle({
|
|
226
|
+
intervalMs: 1000,
|
|
227
|
+
task: () => {
|
|
228
|
+
setCountdown((c) => {
|
|
229
|
+
if (c === null)
|
|
230
|
+
return null;
|
|
231
|
+
if (c <= 1) {
|
|
232
|
+
clearCountdown();
|
|
233
|
+
resetCheck();
|
|
234
|
+
setPhase('project');
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
return c - 1;
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
cdRef.current = countdown;
|
|
242
|
+
countdown.start();
|
|
243
|
+
}, [resetCheck, setPhase]);
|
|
244
|
+
const runCheck = useCallback(async () => {
|
|
245
|
+
if (needsConnectSelection(selected)) {
|
|
246
|
+
setChecking(false);
|
|
247
|
+
setCheckResult('fail');
|
|
248
|
+
setCheckFailMsg(t('onboarding.check.failNeedSelect'));
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
resetCheck();
|
|
252
|
+
setChecking(true);
|
|
253
|
+
try {
|
|
254
|
+
if (selected === 'key') {
|
|
255
|
+
if (validateApiKeyFields(baseUrl, apiKey) === 'empty') {
|
|
256
|
+
setChecking(false);
|
|
257
|
+
setCheckResult('fail');
|
|
258
|
+
setCheckFailMsg(t('onboarding.check.failEmpty'));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const url = baseUrl.trim();
|
|
262
|
+
const key = apiKey.trim();
|
|
263
|
+
// Align with Settings › Providers: live catalog + llm-gateway read
|
|
264
|
+
// LITELLM_PROXY_*, and forgeax-core speaks Anthropic protocol against
|
|
265
|
+
// ANTHROPIC_* (mirrored on save). OPENAI_* still set for gpt-* routing.
|
|
266
|
+
await patchEnv({
|
|
267
|
+
OPENAI_BASE_URL: url,
|
|
268
|
+
OPENAI_API_KEY: key,
|
|
269
|
+
LITELLM_PROXY_BASE_URL: url,
|
|
270
|
+
LITELLM_PROXY_KEY: key,
|
|
271
|
+
ANTHROPIC_BASE_URL: url,
|
|
272
|
+
ANTHROPIC_API_KEY: key,
|
|
273
|
+
});
|
|
274
|
+
// Gate on LIVE /v1/models only — list_models falls back to disk catalog
|
|
275
|
+
// when live fails, so a bare listModels() would always "succeed".
|
|
276
|
+
const { live } = await listModelsWithLive(null);
|
|
277
|
+
const probe = interpretLiveCatalogProbe(live);
|
|
278
|
+
if (!probe.ok) {
|
|
279
|
+
setChecking(false);
|
|
280
|
+
setCheckResult('fail');
|
|
281
|
+
setCheckFailMsg(t('onboarding.check.failLive'));
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
const { refreshAllModelCatalogs } = await import('../ModelPicker/useModelCatalog');
|
|
286
|
+
await refreshAllModelCatalogs();
|
|
287
|
+
}
|
|
288
|
+
catch { /* best-effort UI cache refresh */ }
|
|
289
|
+
await applyModelRoute({ kind: 'api-key', model: OB_API_KEY_DEFAULT_MODEL });
|
|
290
|
+
setChecking(false);
|
|
291
|
+
setCheckResult('ok');
|
|
292
|
+
beginCountdown();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
// selected === 'cli'
|
|
296
|
+
let ok = false;
|
|
297
|
+
try {
|
|
298
|
+
const { providers } = await fetchCliProviders(true);
|
|
299
|
+
ok = !!providers.find((p) => p.id === cli)?.health.ok;
|
|
300
|
+
}
|
|
301
|
+
catch {
|
|
302
|
+
ok = false;
|
|
303
|
+
}
|
|
304
|
+
if (ok) {
|
|
305
|
+
await applyModelRoute({ kind: 'cli', providerId: cli });
|
|
306
|
+
setChecking(false);
|
|
307
|
+
setCheckResult('ok');
|
|
308
|
+
beginCountdown();
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
setChecking(false);
|
|
312
|
+
setCheckResult('fail');
|
|
313
|
+
const lk = CLI_LINKS[cli];
|
|
314
|
+
setCheckFailMsg(lk ? (_jsxs(_Fragment, { children: [t('onboarding.check.failCli', { cli }), ' ', _jsx("a", { href: lk.url, target: "_blank", rel: "noopener noreferrer", children: lk.name })] })) : (t('onboarding.check.failCli', { cli })));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
catch (e) {
|
|
318
|
+
setChecking(false);
|
|
319
|
+
setCheckResult('fail');
|
|
320
|
+
setCheckFailMsg(e.message || t('onboarding.check.fail'));
|
|
321
|
+
}
|
|
322
|
+
}, [selected, resetCheck, baseUrl, apiKey, cli, beginCountdown, t]);
|
|
323
|
+
// §14: there is NO "skip to home" — layout (home) is entered ONLY after a
|
|
324
|
+
// project is initialized (createGame / openGameDir → enterHomeWith). The
|
|
325
|
+
// welcome step's "skip" only skips model-connect and lands on `project`.
|
|
326
|
+
const skipConnect = useCallback(() => { resetCheck(); setPhase('project'); }, [resetCheck, setPhase]);
|
|
327
|
+
// Lazily load the built-in templates the first time the template modal opens.
|
|
328
|
+
useEffect(() => {
|
|
329
|
+
if (!tmplOpen || templates)
|
|
330
|
+
return;
|
|
331
|
+
let cancelled = false;
|
|
332
|
+
void listGameTemplates()
|
|
333
|
+
.then((items) => { if (!cancelled)
|
|
334
|
+
setTemplates(items); })
|
|
335
|
+
.catch(() => { if (!cancelled)
|
|
336
|
+
setTemplates([]); });
|
|
337
|
+
return () => { cancelled = true; };
|
|
338
|
+
}, [tmplOpen, templates]);
|
|
339
|
+
// Games already known to the runtime host (mtime-sorted server-side).
|
|
340
|
+
// Fetched once on mount; drives the "open an existing project" section so a
|
|
341
|
+
// host that already has games never forces a create (§14 amendment:
|
|
342
|
+
// opening an existing game IS a valid init — enterHomeWith reuses the same
|
|
343
|
+
// pin + enter path as create/link). Filter out the `default` session stub so
|
|
344
|
+
// an empty instance does not show a fake "已有项目" row.
|
|
345
|
+
const [existingGames, setExistingGames] = useState(null);
|
|
346
|
+
useEffect(() => {
|
|
347
|
+
let cancelled = false;
|
|
348
|
+
getStudioProjectClient().listProjects()
|
|
349
|
+
.then((j) => {
|
|
350
|
+
if (cancelled)
|
|
351
|
+
return;
|
|
352
|
+
setExistingGames(j.games
|
|
353
|
+
.filter((project) => isUserExistingGame(project.slug))
|
|
354
|
+
.map((project) => ({ slug: project.slug, name: project.name ?? project.slug })));
|
|
355
|
+
})
|
|
356
|
+
.catch(() => { if (!cancelled)
|
|
357
|
+
setExistingGames([]); });
|
|
358
|
+
return () => { cancelled = true; };
|
|
359
|
+
}, []);
|
|
360
|
+
// Create/link materializes the game; selection uses the one active-game write.
|
|
361
|
+
const enterHomeWith = useCallback(async (slug) => {
|
|
362
|
+
if (slug)
|
|
363
|
+
await setActiveGame(slug);
|
|
364
|
+
const transition = resolveHomeOnboarding(loadOnboarding(), tourEnabled);
|
|
365
|
+
// Latch Scene + default layout intent before shell mounts (onReady race).
|
|
366
|
+
if (transition.shouldRunTour)
|
|
367
|
+
latchTourShellDefaults();
|
|
368
|
+
setTourActive(transition.shouldRunTour);
|
|
369
|
+
saveOnboarding(transition.state);
|
|
370
|
+
setPhaseState(transition.state.phase);
|
|
371
|
+
window.dispatchEvent(new CustomEvent(APP_EVENTS.onboardingChanged));
|
|
372
|
+
}, [setActiveGame, tourEnabled]);
|
|
373
|
+
// Open a game that already exists in the active root: no create, no link —
|
|
374
|
+
// just pin + enter home. Reuses the 'open' busy label ("opening…").
|
|
375
|
+
const openExisting = useCallback(async (slug) => {
|
|
376
|
+
setProjBusy(true);
|
|
377
|
+
setProjBusyKind('open');
|
|
378
|
+
setProjErr(null);
|
|
379
|
+
try {
|
|
380
|
+
await enterHomeWith(slug);
|
|
381
|
+
}
|
|
382
|
+
catch (e) {
|
|
383
|
+
setProjErr(e.message);
|
|
384
|
+
setProjBusy(false);
|
|
385
|
+
setProjBusyKind(null);
|
|
386
|
+
}
|
|
387
|
+
}, [enterHomeWith]);
|
|
388
|
+
// Do the actual game create/link. Open games remain at their canonical paths;
|
|
389
|
+
// newly-created games use the runtime host's default game store.
|
|
390
|
+
const execIntent = useCallback(async (intent) => {
|
|
391
|
+
if (intent.kind === 'open') {
|
|
392
|
+
const j = await getStudioProjectClient().linkProject(intent.path);
|
|
393
|
+
if (!j.ok)
|
|
394
|
+
throw new Error(j.error ?? 'Unable to link project');
|
|
395
|
+
await enterHomeWith(j.slug ?? '');
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
const slug = toGameSlug(intent.name);
|
|
399
|
+
const j = await getStudioProjectClient().createProject({
|
|
400
|
+
slug,
|
|
401
|
+
name: intent.name.trim() || slug,
|
|
402
|
+
brief: '',
|
|
403
|
+
...(intent.kind === 'template' ? { template: intent.template } : {}),
|
|
404
|
+
});
|
|
405
|
+
if (!j.ok)
|
|
406
|
+
throw new Error(j.error ?? 'Unable to create project');
|
|
407
|
+
await enterHomeWith(j.slug ?? slug);
|
|
408
|
+
}, [enterHomeWith]);
|
|
409
|
+
// Entry point for all three project actions. There is no root-switch or
|
|
410
|
+
// Project creation/opening is a game operation; no root-switch intent exists.
|
|
411
|
+
const startAction = useCallback(async (intent) => {
|
|
412
|
+
let next = intent;
|
|
413
|
+
if (intent.kind !== 'open') {
|
|
414
|
+
const existing = (existingGames ?? []).map((g) => g.slug);
|
|
415
|
+
const resolved = resolveProjectName(intent.name, existing);
|
|
416
|
+
next = { ...intent, name: resolved.name };
|
|
417
|
+
}
|
|
418
|
+
setProjBusy(true);
|
|
419
|
+
setProjBusyKind(next.kind);
|
|
420
|
+
setProjErr(null);
|
|
421
|
+
try {
|
|
422
|
+
await execIntent(next);
|
|
423
|
+
}
|
|
424
|
+
catch (e) {
|
|
425
|
+
setProjErr(formatProjectError(e.message, t));
|
|
426
|
+
setProjBusy(false);
|
|
427
|
+
setProjBusyKind(null);
|
|
428
|
+
}
|
|
429
|
+
}, [execIntent, existingGames, t]);
|
|
430
|
+
const onLang = (next) => { setLang(next); changeLanguage(next); };
|
|
431
|
+
// Steps trace the default Scene layout in do-a-game order: viewport → scene
|
|
432
|
+
// outline/properties → top bar → footer (content browser + info now collapse
|
|
433
|
+
// into the global footer, so the tour anchors the footer instead of a live CB
|
|
434
|
+
// panel) → chat. Each anchorId matches a `data-tour-id` (hierarchy via
|
|
435
|
+
// panelRegistry EP_TOUR_IDS, preview on the viewport panel, topbar on the
|
|
436
|
+
// TopBar root, footer on the StatusBar host, chat on the chat panel).
|
|
437
|
+
const TOUR_STEPS = [
|
|
438
|
+
{ anchorId: 'preview', anchor: t('onboarding.tour.preview.anchor'), body: t('onboarding.tour.preview.body') },
|
|
439
|
+
{ anchorId: ['hierarchy', 'inspector'], anchor: t('onboarding.tour.hierarchy.anchor'), body: t('onboarding.tour.hierarchy.body') },
|
|
440
|
+
{ anchorId: 'topbar', anchor: t('onboarding.tour.topbar.anchor'), body: t('onboarding.tour.topbar.body') },
|
|
441
|
+
{ anchorId: 'footer', anchor: t('onboarding.tour.footer.anchor'), body: t('onboarding.tour.footer.body') },
|
|
442
|
+
{ anchorId: 'chat', anchor: t('onboarding.tour.chat.anchor'), body: t('onboarding.tour.chat.body') },
|
|
443
|
+
];
|
|
444
|
+
// Tour is the last onboarding-owned step; the first-chat hint lives in the
|
|
445
|
+
// chat empty state. Mark the tour done and go inert (phase → 'done'), then
|
|
446
|
+
// notify the chat so its hint can appear this session (no reload needed).
|
|
447
|
+
const endTour = useCallback(() => {
|
|
448
|
+
setTourActive(false);
|
|
449
|
+
const prev = loadOnboarding();
|
|
450
|
+
saveOnboarding({ ...prev, phase: 'done', done: { ...prev.done, tour: true } });
|
|
451
|
+
setPhaseState('done');
|
|
452
|
+
window.dispatchEvent(new CustomEvent(APP_EVENTS.onboardingChanged));
|
|
453
|
+
}, []);
|
|
454
|
+
if (phase === 'done')
|
|
455
|
+
return null;
|
|
456
|
+
// ── HOME PHASE: no dark scrim — overlay the live shell with the tour, then nudge ──
|
|
457
|
+
if (phase === 'home') {
|
|
458
|
+
return (_jsx(_Fragment, { children: tourActive && (_jsx(TourOverlay, { steps: TOUR_STEPS, stepIndex: tourIdx, onStepChange: setTourIdx, onClose: () => endTour(), labels: {
|
|
459
|
+
prev: t('onboarding.tour.prev'),
|
|
460
|
+
skip: t('onboarding.tour.skip'),
|
|
461
|
+
next: t('onboarding.tour.next'),
|
|
462
|
+
done: t('onboarding.tour.done'),
|
|
463
|
+
} })) }));
|
|
464
|
+
}
|
|
465
|
+
// ── WELCOME / PROJECT PHASES: dark modal over the shell ──
|
|
466
|
+
const stepStrip = (_jsx("div", { className: "fx-ob-strip", children: PHASE_ORDER.map((s, i) => {
|
|
467
|
+
const cur = PHASE_ORDER.indexOf(phase);
|
|
468
|
+
const active = s === phase;
|
|
469
|
+
const passed = cur > i;
|
|
470
|
+
return (_jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: 6 }, children: [_jsx("span", { className: `fx-ob-dot${active ? ' active' : passed ? ' passed' : ''}` }), _jsx("span", { className: `fx-ob-lbl${active ? ' active' : ''}`, children: t(`onboarding.step.${s}`) }), i < PHASE_ORDER.length - 1 && _jsx("span", { className: "fx-ob-bar" })] }, s));
|
|
471
|
+
}) }));
|
|
472
|
+
return (_jsxs("div", { className: "fx-ob-overlay", role: "dialog", "aria-modal": "true", "aria-label": t('onboarding.welcome.title'), children: [_jsxs("div", { className: "fx-ob-card-shell", children: [stepStrip, _jsx("div", { className: "fx-ob-frame", children: _jsx("div", { className: "fx-ob-frame-body", children: phase === 'welcome' ? (_jsx(WelcomeView, { t: t, lang: lang, onLang: onLang, selected: selected, setSelected: (v) => { setSelected(v); resetCheck(); }, baseUrl: baseUrl, setBaseUrl: (v) => { setBaseUrl(v); if (checkResult)
|
|
473
|
+
resetCheck(); }, apiKey: apiKey, setApiKey: (v) => { setApiKey(v); if (checkResult)
|
|
474
|
+
resetCheck(); }, cli: cli, setCli: (v) => { setCli(v); resetCheck(); }, cliProviders: cliProviders, checking: checking, checkResult: checkResult, checkFailMsg: checkFailMsg, connectedList: connectedList() })) : (_jsx(ProjectView, { t: t, projName: projName, setProjName: (v) => { setProjName(v); if (projErr)
|
|
475
|
+
setProjErr(null); }, busy: projBusy, busyKind: projBusyKind, err: projErr, onNew: () => void startAction({ kind: 'new', name: projName }), onTemplate: () => { setTmplSlug(null); setTmplOpen(true); }, onOpen: () => setFsOpen(true), existingGames: existingGames, onOpenExisting: (slug) => void openExisting(slug) })) }) }), _jsxs("div", { className: "fx-ob-row", style: { marginTop: 10 }, children: [_jsx("div", { className: "fx-ob-grow" }), phase === 'welcome' && (_jsxs(_Fragment, { children: [_jsx("button", { className: "fx-ob-btn fx-ob-btn-ghost", onClick: skipConnect, children: t('onboarding.skip') }), _jsx("button", { className: "fx-ob-btn fx-ob-btn-primary", disabled: checking, onClick: () => {
|
|
476
|
+
if (checking)
|
|
477
|
+
return;
|
|
478
|
+
if (countdown !== null) {
|
|
479
|
+
resetCheck();
|
|
480
|
+
setPhase('project');
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
void runCheck();
|
|
484
|
+
}, children: checking ? t('onboarding.check.checking') : countdown !== null ? t('onboarding.nextCountdown', { n: countdown }) : t('onboarding.next') })] }))] })] }), phase === 'project' && tmplOpen && (_jsx(TemplateModal, { t: t, templates: templates, selected: tmplSlug, onSelect: setTmplSlug, onCancel: () => setTmplOpen(false), onConfirm: () => { if (tmplSlug) {
|
|
485
|
+
setTmplOpen(false);
|
|
486
|
+
void startAction({ kind: 'template', name: projName, template: tmplSlug });
|
|
487
|
+
} }, busy: projBusy })), phase === 'project' && fsOpen && (_jsx("div", { className: "fx-ob-modal-scrim", onClick: (e) => { if (e.target === e.currentTarget)
|
|
488
|
+
setFsOpen(false); }, children: _jsx("div", { className: "fx-ob-modal", children: _jsxs("div", { className: "fx-ob-modal-inner", children: [_jsx("h3", { className: "fx-ob-h3", children: t('onboarding.project.openTitle') }), _jsx(FsBrowser, { initialDir: "~", onPick: (absPath) => { setFsOpen(false); void startAction({ kind: 'open', path: absPath }); }, onCancel: () => setFsOpen(false) })] }) }) }))] }));
|
|
489
|
+
}
|
|
490
|
+
function ConnectCard({ selected, onSelect, title, sub, children, }) {
|
|
491
|
+
return (_jsx("div", { className: `fx-ob-card fx-ob-connect-card${selected ? ' sel' : ''}`, onClick: onSelect, role: "button", tabIndex: 0,
|
|
492
|
+
// Prevent focusing the card on mouse click: focus inside the overflow:auto
|
|
493
|
+
// shell triggers scroll-into-view and looks like the text "shrinks"/jitters.
|
|
494
|
+
// Keyboard users still get focus via Tab + Enter/Space.
|
|
495
|
+
onMouseDown: (e) => {
|
|
496
|
+
const t = e.target;
|
|
497
|
+
if (t.closest('input, textarea, button, [role="combobox"]'))
|
|
498
|
+
return;
|
|
499
|
+
e.preventDefault();
|
|
500
|
+
}, onKeyDown: (e) => {
|
|
501
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
502
|
+
e.preventDefault();
|
|
503
|
+
onSelect();
|
|
504
|
+
}
|
|
505
|
+
}, children: _jsx("div", { className: "fx-ob-card-cb", children: _jsxs("div", { className: "fx-ob-stack fx-ob-gap6", children: [_jsx("span", { className: "fx-ob-connect-title", children: title }), _jsx("div", { className: "fx-ob-small fx-ob-sec", children: sub }), children] }) }) }));
|
|
506
|
+
}
|
|
507
|
+
function WelcomeView(props) {
|
|
508
|
+
const { t } = props;
|
|
509
|
+
return (_jsxs("div", { className: "fx-ob-stack fx-ob-gap14", children: [_jsxs("div", { className: "fx-ob-stack fx-ob-gap6", children: [_jsx("h2", { className: "fx-ob-h2", children: t('onboarding.welcome.title') }), _jsx("div", { className: "fx-ob-sec", children: t('onboarding.welcome.lead') })] }), _jsxs("div", { className: "fx-ob-row", children: [_jsx("span", { className: "fx-ob-small fx-ob-muted", children: t('onboarding.welcome.language') }), _jsx("span", { className: `fx-ob-pill${props.lang === 'zh' ? ' active' : ''}`, onClick: () => props.onLang('zh'), children: "\u4E2D\u6587" }), _jsx("span", { className: `fx-ob-pill${props.lang === 'en' ? ' active' : ''}`, onClick: () => props.onLang('en'), children: "English" })] }), _jsx("div", { className: "fx-ob-divider" }), _jsxs("div", { className: "fx-ob-stack fx-ob-gap8", children: [_jsxs("div", { className: "fx-ob-stack fx-ob-gap6", children: [_jsx("h3", { className: "fx-ob-h3", children: t('onboarding.connect.title') }), _jsx("div", { className: "fx-ob-tiny fx-ob-muted", children: t('onboarding.connect.hint') })] }), _jsxs("div", { className: "fx-ob-stack fx-ob-gap8", children: [_jsx(ConnectCard, { selected: props.selected === 'key', onSelect: () => props.setSelected('key'), title: t('onboarding.connect.keyTitle'), sub: t('onboarding.connect.keySub'), children: _jsxs("div", { className: "fx-ob-stack fx-ob-gap6", style: { marginTop: 10 }, onClick: (e) => e.stopPropagation(), children: [_jsx("input", { className: "fx-ob-input", placeholder: "Base URL, e.g. https://api.openai.com/v1", value: props.baseUrl, onChange: (e) => {
|
|
510
|
+
if (props.selected !== 'key')
|
|
511
|
+
props.setSelected('key');
|
|
512
|
+
props.setBaseUrl(e.target.value);
|
|
513
|
+
}, onFocus: () => { if (props.selected !== 'key')
|
|
514
|
+
props.setSelected('key'); } }), _jsx("input", { className: "fx-ob-input", type: "password", placeholder: "API Key", value: props.apiKey, onChange: (e) => {
|
|
515
|
+
if (props.selected !== 'key')
|
|
516
|
+
props.setSelected('key');
|
|
517
|
+
props.setApiKey(e.target.value);
|
|
518
|
+
}, onFocus: () => { if (props.selected !== 'key')
|
|
519
|
+
props.setSelected('key'); } })] }) }), _jsx(ConnectCard, { selected: props.selected === 'cli', onSelect: () => props.setSelected('cli'), title: t('onboarding.connect.cliTitle'), sub: t('onboarding.connect.cliSub'), children: _jsx("div", { style: { marginTop: 10 }, onClick: (e) => e.stopPropagation(), children: _jsxs(Select, { value: props.cli, onValueChange: (v) => {
|
|
520
|
+
if (props.selected !== 'cli')
|
|
521
|
+
props.setSelected('cli');
|
|
522
|
+
props.setCli(v);
|
|
523
|
+
}, onOpenChange: (open) => {
|
|
524
|
+
if (open && props.selected !== 'cli')
|
|
525
|
+
props.setSelected('cli');
|
|
526
|
+
}, children: [_jsx(SelectTrigger, { className: "rounded-[6px] border-[color:var(--ob-stroke-1)] text-[color:var(--ob-text)]", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { className: "z-[var(--z-toplevel)]", children: cliIdsFrom(props.cliProviders).map((id) => (_jsx(SelectItem, { value: id, children: _jsx(CliOptionLabel, { t: t, id: id, providers: props.cliProviders }) }, id))) })] }) }) })] })] }), props.checking && _jsx("div", { className: "fx-ob-callout info", children: t('onboarding.check.checking') }), !props.checking && props.checkResult === 'ok' && (_jsx("div", { className: "fx-ob-callout ok", children: t('onboarding.check.ok', { list: props.connectedList.join(' / ') }) })), !props.checking && props.checkResult === 'fail' && (_jsx("div", { className: "fx-ob-callout err", children: props.checkFailMsg }))] }));
|
|
527
|
+
}
|
|
528
|
+
function ProjectView(props) {
|
|
529
|
+
const { t } = props;
|
|
530
|
+
const resolved = resolveProjectName(props.projName, (props.existingGames ?? []).map((g) => g.slug));
|
|
531
|
+
const busyMsg = props.busyKind ? t(`onboarding.project.busy.${props.busyKind}`) : t('onboarding.project.busy.new');
|
|
532
|
+
// "New"/"template" create a game in the runtime host; "open" adopts
|
|
533
|
+
// an existing game dir at any path (name not needed — derived server-side).
|
|
534
|
+
// Empty name auto-resolves to untitled-N — never block create on the name field.
|
|
535
|
+
const cards = [
|
|
536
|
+
{ id: 'new', title: t('onboarding.project.newTitle'), desc: t('onboarding.project.newDesc'), cta: t('onboarding.project.newCta'), onGo: props.onNew },
|
|
537
|
+
{ id: 'sample', title: t('onboarding.project.sampleTitle'), desc: t('onboarding.project.sampleDesc'), cta: t('onboarding.project.sampleCta'), onGo: props.onTemplate },
|
|
538
|
+
{ id: 'open', title: t('onboarding.project.openTitle'), desc: t('onboarding.project.openDesc'), cta: t('onboarding.project.openCta'), onGo: props.onOpen },
|
|
539
|
+
];
|
|
540
|
+
return (_jsxs("div", { className: "fx-ob-stack fx-ob-gap12", children: [_jsx("h2", { className: "fx-ob-h2", children: t('onboarding.project.title') }), props.busy && (_jsxs("div", { className: "fx-ob-callout info fx-ob-busy", role: "status", "aria-live": "polite", children: [_jsx("span", { className: "fx-ob-spinner", "aria-hidden": "true" }), _jsx("span", { children: busyMsg })] })), props.existingGames && props.existingGames.length > 0 && (_jsxs("div", { className: "fx-ob-panel", children: [_jsx("div", { className: "fx-ob-row", children: _jsx("span", { className: "fx-ob-small fx-ob-sec", style: { fontWeight: 500 }, children: t('onboarding.project.existingTitle') }) }), _jsx("div", { className: "fx-ob-tiny", style: { color: 'var(--ob-text-4)', marginTop: 4 }, children: t('onboarding.project.existingDesc', { count: String(props.existingGames.length) }) }), _jsx("div", { className: "fx-ob-stack fx-ob-gap8", style: { marginTop: 8, maxHeight: 180, overflowY: 'auto' }, children: props.existingGames.map((g) => (_jsx("div", { className: "fx-ob-card", style: { cursor: props.busy ? 'default' : 'pointer' }, onClick: () => { if (!props.busy)
|
|
541
|
+
props.onOpenExisting(g.slug); }, children: _jsx("div", { className: "fx-ob-card-cb", children: _jsxs("div", { className: "fx-ob-row", children: [_jsx("span", { className: "fx-ob-small", children: g.name }), _jsx("span", { className: "fx-ob-tiny fx-ob-muted", style: { marginLeft: 8 }, children: g.slug }), _jsx("div", { className: "fx-ob-grow" }), _jsx("span", { className: "fx-ob-pill sm static", children: t('onboarding.project.existingOpen') })] }) }) }, g.slug))) })] })), _jsxs("div", { className: "fx-ob-panel", children: [_jsx("div", { className: "fx-ob-row", style: { marginTop: 8 }, children: _jsx("span", { className: "fx-ob-small fx-ob-sec", style: { fontWeight: 500 }, children: t('onboarding.project.name') }) }), _jsx("div", { className: "fx-ob-row", style: { marginTop: 6 }, children: _jsx("input", { className: "fx-ob-input", style: { flex: 1, minWidth: 0 }, placeholder: t('onboarding.project.namePlaceholder'), value: props.projName, onChange: (e) => props.setProjName(e.target.value) }) }), _jsx("div", { className: "fx-ob-tiny", style: { color: 'var(--ob-text-4)', marginTop: 6 }, children: t('onboarding.project.willCreate', { name: resolved.slug }) })] }), _jsx("div", { className: "fx-ob-grid3", children: cards.map((o) => (_jsxs("div", { className: "fx-ob-card", children: [_jsx("div", { className: "fx-ob-card-ch", children: _jsx("span", { children: o.title }) }), _jsx("div", { className: "fx-ob-card-cb", children: _jsxs("div", { className: "fx-ob-stack fx-ob-gap8", children: [_jsx("div", { className: "fx-ob-small fx-ob-sec", children: o.desc }), _jsx("button", { className: "fx-ob-btn fx-ob-btn-secondary fx-ob-btn-block", disabled: props.busy, onClick: o.onGo, children: o.cta })] }) })] }, o.id))) }), props.err && _jsx("div", { className: "fx-ob-callout err", children: props.err }), _jsx("div", { className: "fx-ob-tiny fx-ob-muted", children: t('onboarding.project.footer') })] }));
|
|
542
|
+
}
|
|
543
|
+
function TemplateModal(props) {
|
|
544
|
+
const { t } = props;
|
|
545
|
+
const loading = props.templates === null;
|
|
546
|
+
const empty = !loading && props.templates.length === 0;
|
|
547
|
+
return (_jsx("div", { className: "fx-ob-modal-scrim", onClick: (e) => { if (e.target === e.currentTarget)
|
|
548
|
+
props.onCancel(); }, children: _jsx("div", { className: "fx-ob-modal", children: _jsxs("div", { className: "fx-ob-modal-inner", children: [_jsx("h3", { className: "fx-ob-h3", children: t('onboarding.template.title') }), loading && _jsx("div", { className: "fx-ob-small fx-ob-muted", children: t('onboarding.template.loading') }), empty && _jsx("div", { className: "fx-ob-small fx-ob-muted", children: t('onboarding.template.empty') }), !loading && !empty && (_jsx("div", { className: "fx-ob-stack fx-ob-gap8", style: { maxHeight: 320, overflowY: 'auto' }, children: props.templates.map((tpl) => (_jsx("div", { className: `fx-ob-card${props.selected === tpl.slug ? ' sel' : ''}`, style: { cursor: 'pointer' }, onClick: () => props.onSelect(tpl.slug), children: _jsx("div", { className: "fx-ob-card-cb", children: _jsxs("div", { className: "fx-ob-row", children: [_jsx("span", { className: "fx-ob-small", children: tpl.name }), _jsx("span", { className: "fx-ob-tiny fx-ob-muted", style: { marginLeft: 8 }, children: tpl.slug }), _jsx("div", { className: "fx-ob-grow" }), props.selected === tpl.slug && _jsx("span", { className: "fx-ob-pill sm active static", children: t('onboarding.template.picked') })] }) }) }, tpl.slug))) })), _jsxs("div", { className: "fx-ob-row", style: { justifyContent: 'flex-end' }, children: [_jsx("button", { className: "fx-ob-btn fx-ob-btn-ghost", onClick: props.onCancel, children: t('onboarding.template.cancel') }), _jsx("button", { className: "fx-ob-btn fx-ob-btn-primary", disabled: props.selected === null || props.busy, onClick: props.onConfirm, children: t('onboarding.template.confirm') })] })] }) }) }));
|
|
549
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ConnectPath = 'key' | 'cli';
|
|
2
|
+
export type ConnectSelected = ConnectPath | null;
|
|
3
|
+
/** True when Next must block — user has not picked API Key or local CLI yet.
|
|
4
|
+
* (Skip still advances without a selection.) */
|
|
5
|
+
export declare function needsConnectSelection(selected: ConnectSelected): boolean;
|
|
6
|
+
export declare function validateApiKeyFields(baseUrl: string, apiKey: string): 'ok' | 'empty';
|
|
7
|
+
/** Live `/v1/models` probe result from `list_models` (server merges disk+live).
|
|
8
|
+
* Disk fallback must NOT count as connected — only a real live/cache hit. */
|
|
9
|
+
export declare function interpretLiveCatalogProbe(live: {
|
|
10
|
+
source?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
} | null | undefined): {
|
|
13
|
+
ok: true;
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
error?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** True when Next must block — user has not picked API Key or local CLI yet.
|
|
2
|
+
* (Skip still advances without a selection.) */
|
|
3
|
+
export function needsConnectSelection(selected) {
|
|
4
|
+
return selected === null;
|
|
5
|
+
}
|
|
6
|
+
export function validateApiKeyFields(baseUrl, apiKey) {
|
|
7
|
+
if (!baseUrl.trim() || !apiKey.trim())
|
|
8
|
+
return 'empty';
|
|
9
|
+
return 'ok';
|
|
10
|
+
}
|
|
11
|
+
/** Live `/v1/models` probe result from `list_models` (server merges disk+live).
|
|
12
|
+
* Disk fallback must NOT count as connected — only a real live/cache hit. */
|
|
13
|
+
export function interpretLiveCatalogProbe(live) {
|
|
14
|
+
const source = live?.source;
|
|
15
|
+
if (source === 'live' || source === 'cache')
|
|
16
|
+
return { ok: true };
|
|
17
|
+
return { ok: false, error: live?.error };
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OnboardingPersisted } from './types';
|
|
2
|
+
export interface HomeOnboardingTransition {
|
|
3
|
+
shouldRunTour: boolean;
|
|
4
|
+
state: OnboardingPersisted;
|
|
5
|
+
}
|
|
6
|
+
/** Product policy and persisted progress jointly decide whether the shell tour mounts. */
|
|
7
|
+
export declare function shouldActivateTour(tourEnabled: boolean, state: OnboardingPersisted): boolean;
|
|
8
|
+
/** Resolve setup → shell without parking a disabled/completed tour in `home`. */
|
|
9
|
+
export declare function resolveHomeOnboarding(state: OnboardingPersisted, tourEnabled: boolean): HomeOnboardingTransition;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Product policy and persisted progress jointly decide whether the shell tour mounts. */
|
|
2
|
+
export function shouldActivateTour(tourEnabled, state) {
|
|
3
|
+
return tourEnabled && !state.done.tour;
|
|
4
|
+
}
|
|
5
|
+
/** Resolve setup → shell without parking a disabled/completed tour in `home`. */
|
|
6
|
+
export function resolveHomeOnboarding(state, tourEnabled) {
|
|
7
|
+
const shouldRunTour = shouldActivateTour(tourEnabled, state);
|
|
8
|
+
if (shouldRunTour)
|
|
9
|
+
return { shouldRunTour, state: { ...state, phase: 'home' } };
|
|
10
|
+
if (state.phase === 'done' && state.done.tour)
|
|
11
|
+
return { shouldRunTour, state };
|
|
12
|
+
return {
|
|
13
|
+
shouldRunTour,
|
|
14
|
+
state: {
|
|
15
|
+
...state,
|
|
16
|
+
phase: 'done',
|
|
17
|
+
done: { ...state.done, tour: true },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|