@wrongstack/webui 0.297.0 → 0.298.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/dist/assets/AgentRosterView-C26RCdot.js +11 -0
- package/dist/assets/{AnalyticsDashboard-CkceglT6.js → AnalyticsDashboard-CEjjV3bX.js} +1 -1
- package/dist/assets/AudienceMemoryPanel-CnfZC8x0.js +3 -0
- package/dist/assets/{ChangesView-DouwIaDk.js → ChangesView-D0BiTbs8.js} +1 -1
- package/dist/assets/ChronicleDashboard-BZ4XOcvf.js +1 -0
- package/dist/assets/CodeEditor-BlqaT56D.js +1 -0
- package/dist/assets/CodeMap-Bj5tjjW5.js +1 -0
- package/dist/assets/{CronJobsPanel-CAImDL8t.js → CronJobsPanel-F6nhZtfg.js} +1 -1
- package/dist/assets/DeadCodeScanPanel-C9sLNUUc.js +2 -0
- package/dist/assets/{DebugDashboard-DLNPZIEI.js → DebugDashboard-D8BLcLjI.js} +1 -1
- package/dist/assets/{DesignGalleryView-D0azMq2e.js → DesignGalleryView-B8mE5nGy.js} +1 -1
- package/dist/assets/GoalView-DIx7Zr4a.js +1 -0
- package/dist/assets/KanbanView-DshzDwq1.js +3 -0
- package/dist/assets/MailboxDetailView-BJXpXjtm.js +1 -0
- package/dist/assets/MemoryManager-B-S5oREO.js +1 -0
- package/dist/assets/{ModelPicker-CN-UD3lc.js → ModelPicker-CNHhT2SO.js} +1 -1
- package/dist/assets/OfficeMapPanel-CBN9uG80.js +4 -0
- package/dist/assets/{ProcessMonitor-ButM8C0T.js → ProcessMonitor-Cc8LsfTh.js} +1 -1
- package/dist/assets/QueuePanel-B0NXFwEt.js +1 -0
- package/dist/assets/{RefreshDebugView-DVvWsh9A.js → RefreshDebugView-DLst_piS.js} +1 -1
- package/dist/assets/SageTabs-NwMcr4Pq.js +2 -0
- package/dist/assets/SddHub-CpRHXmjm.js +2 -0
- package/dist/assets/SessionsDashboard-C5dXb0iJ.js +1 -0
- package/dist/assets/SetupScreen-B81fcNgP.js +1 -0
- package/dist/assets/SkillDetailView-BTvgE_MD.js +3 -0
- package/dist/assets/{SpecsView-BJs_okSx.js → SpecsView-DhuaZcOl.js} +1 -1
- package/dist/assets/TechStackView-BXmfl2qY.js +1 -0
- package/dist/assets/{TerminalPanel-W2V0X7b9.js → TerminalPanel-DjruTcb6.js} +1 -1
- package/dist/assets/{Toaster-CbcX_Cou.js → Toaster-BmyghnqJ.js} +1 -1
- package/dist/assets/{activity-CbbZyUMG.js → activity-Bo6DncWg.js} +1 -1
- package/dist/assets/{activity-C4z6-WoZ.js → activity-C34aPcFU.js} +1 -1
- package/dist/assets/{activity-B4Ngvkan.js → activity-CBdzUJQ_.js} +1 -1
- package/dist/assets/{activity-B8uejnae.js → activity-CLYyxeC6.js} +1 -1
- package/dist/assets/{activity-qoJ3grs0.js → activity-Cv_EIWjY.js} +1 -1
- package/dist/assets/{activity-B5MvPWYV.js → activity-Wr0_Gb8A.js} +1 -1
- package/dist/assets/{activity-D57y5l1T.js → activity-kCY0dGRC.js} +1 -1
- package/dist/assets/{button-uGqXvobk.js → button-BMECp1cg.js} +1 -1
- package/dist/assets/{chat-Du7n7HZ7.js → chat-CRmMDzCb.js} +1 -1
- package/dist/assets/{chat-VkTBQmmx.js → chat-CwnuX7tG.js} +1 -1
- package/dist/assets/{chat-BJzPxfyr.js → chat-DLn1hY01.js} +1 -1
- package/dist/assets/{chat-IRKmQ6we.js → chat-DSEq1Bdz.js} +1 -1
- package/dist/assets/{chat-C7ybebfi.js → chat-DxLD17ER.js} +1 -1
- package/dist/assets/{chat-BRBVFl4h.js → chat-DzPxYALH.js} +1 -1
- package/dist/assets/{chat-Bkom8vQo.js → chat-OunddzYy.js} +1 -1
- package/dist/assets/chat-store-B2CjP2Zl.js +17 -0
- package/dist/assets/{codemap-activity-store-DP3mCZu1.js → codemap-activity-store-Cz0_AHqt.js} +1 -1
- package/dist/assets/codemap-index-store-B-XLZpJu.js +1 -0
- package/dist/assets/common-BfVFjVhf.js +1 -0
- package/dist/assets/common-C5hY-d_0.js +1 -0
- package/dist/assets/{dialog-CT1PTjzK.js → dialog-BJef9ZZo.js} +1 -1
- package/dist/assets/{empty-state-CdyXy96A.js → empty-state-BGzRrNXI.js} +1 -1
- package/dist/assets/{i18n-1BkaqMgr.js → i18n-2wGPPdl_.js} +2 -2
- package/dist/assets/index-DeA8UyiB.css +1 -0
- package/dist/assets/index-x6-rLl5H.js +132 -0
- package/dist/assets/{input-B-VCX2sG.js → input-Bd10nfMj.js} +1 -1
- package/dist/assets/{mailbox-store-DVoNbOZr.js → mailbox-store-D3omLzBk.js} +1 -1
- package/dist/assets/markdown-sSmz-Ua_.js +44 -0
- package/dist/assets/progress-ring-BEULkQ1r.js +1 -0
- package/dist/assets/{roster-ws-DXm0krqH.js → roster-ws-BmV_3U6w.js} +1 -1
- package/dist/assets/session-store-ZMNU48xK.js +1 -0
- package/dist/assets/settings-BF0lRxlj.js +1 -0
- package/dist/assets/settings-CP6cwqHD.js +1 -0
- package/dist/assets/settings-D0rWEhMg.js +1 -0
- package/dist/assets/settings-DFCaP02p.js +1 -0
- package/dist/assets/settings-DHix1ZPL.js +1 -0
- package/dist/assets/{settings-DEmKlLmn.js → settings-eEzjNzsC.js} +1 -1
- package/dist/assets/settings-kp_aIgcX.js +1 -0
- package/dist/assets/{shared-jvJxtKc5.js → shared-CrX8iE-U.js} +1 -1
- package/dist/assets/stores-DyQOSkkD.js +7 -0
- package/dist/assets/ui-store-di6oY7cy.js +1 -0
- package/dist/assets/useWebSocket-BVFPigcY.js +28 -0
- package/dist/assets/{utils-CN2sfDVP.js → utils-CwJvjOcH.js} +1 -1
- package/dist/assets/{vendor-2VBBgNb5.js → vendor-BTTkQ9Tn.js} +28 -28
- package/dist/assets/{view-navigation-Cgy5xh9q.js → view-navigation-BMRzqGbq.js} +1 -1
- package/dist/assets/ws-client-B0-KwuTK.js +1 -0
- package/dist/components/ChatInput/refine-panel-host.d.ts +9 -1
- package/dist/components/DeadCodeScanPanel/DeadCodeScanPanel.d.ts +1 -3
- package/dist/components/MemoryManager/MemoryInjectorPanel.d.ts +19 -0
- package/dist/components/PanelSuspense.d.ts +8 -0
- package/dist/components/SettingsPanel/DisplaySection.d.ts +20 -0
- package/dist/components/SettingsPanel/PluginToggleList.d.ts +11 -1
- package/dist/components/ViewRouter.d.ts +12 -0
- package/dist/components/WorkbenchTopbar.d.ts +53 -0
- package/dist/components/codemap-model.d.ts +2 -0
- package/dist/hooks/useViewport.d.ts +38 -0
- package/dist/hooks/useWebSocket.d.ts +1 -0
- package/dist/hooks/ws-handlers/misc-handlers.d.ts +1 -0
- package/dist/index.html +25 -26
- package/dist/index.js +58857 -57378
- package/dist/lib/sage-block.d.ts +18 -23
- package/dist/lib/view-navigation.d.ts +1 -1
- package/dist/lib/ws-client.d.ts +16 -8
- package/dist/providers.json +10 -0
- package/dist/stores/chat-store.d.ts +36 -3
- package/dist/stores/config-store.d.ts +0 -2
- package/dist/stores/local-prefs.d.ts +22 -2
- package/dist/stores/session-store.d.ts +3 -0
- package/dist/stores/types.d.ts +2 -1
- package/dist/stores/ui-store.d.ts +8 -1
- package/dist/types/client-message.d.ts +1 -0
- package/dist/types/connections.d.ts +7 -1
- package/dist/types/server-message.d.ts +11 -0
- package/dist/types/system.d.ts +4 -0
- package/package.json +11 -9
- package/dist/App.d.ts.map +0 -1
- package/dist/assets/AgentRosterView-Cje2NBtU.js +0 -11
- package/dist/assets/AudienceMemoryPanel-DB-8ISNP.js +0 -3
- package/dist/assets/ChronicleDashboard-B4Khm6hu.js +0 -1
- package/dist/assets/CodeEditor-CrKbA5s8.js +0 -1
- package/dist/assets/CodeMap-Dz8yNlUe.js +0 -1
- package/dist/assets/DeadCodeScanPanel-C5ehBTQF.js +0 -2
- package/dist/assets/GoalView-gtQRK78W.js +0 -1
- package/dist/assets/KanbanView-BXKe19EI.js +0 -3
- package/dist/assets/LazyMarkdown-BGwFjYKr.js +0 -3
- package/dist/assets/MailboxDetailView-D4fXipos.js +0 -1
- package/dist/assets/MemoryManager-D_rquas9.js +0 -1
- package/dist/assets/OfficeMapPanel-CJFrTNmg.js +0 -4
- package/dist/assets/QueuePanel-C5oihwYM.js +0 -1
- package/dist/assets/SageTabs-C9vAgvCD.js +0 -2
- package/dist/assets/SddHub-D_nsWjuM.js +0 -2
- package/dist/assets/SessionsDashboard-DdwU3Ma5.js +0 -1
- package/dist/assets/SetupScreen-CQCfLdPI.js +0 -1
- package/dist/assets/SkillDetailView-mVxi-9jo.js +0 -3
- package/dist/assets/TechStackView-BZ4M7TYc.js +0 -1
- package/dist/assets/chat-store-CM1dMeuY.js +0 -17
- package/dist/assets/codemap-index-store-DyAe3ZYJ.js +0 -1
- package/dist/assets/common-D8_r1x8x.js +0 -1
- package/dist/assets/common-suUxW9sA.js +0 -1
- package/dist/assets/index-BPfIz78e.js +0 -131
- package/dist/assets/index-BlceaIyu.css +0 -1
- package/dist/assets/markdown-L6DLSM7f.js +0 -44
- package/dist/assets/progress-ring-CFOvGxw7.js +0 -1
- package/dist/assets/session-store-BsNYnfOc.js +0 -1
- package/dist/assets/settings-C5F2tQ7C.js +0 -1
- package/dist/assets/settings-Cdk8i_p6.js +0 -1
- package/dist/assets/settings-D6wFOw5n.js +0 -1
- package/dist/assets/settings-DCEOkxYE.js +0 -1
- package/dist/assets/settings-DsflqNn0.js +0 -1
- package/dist/assets/settings-skShEZ2B.js +0 -1
- package/dist/assets/stores-mpa0202y.js +0 -6
- package/dist/assets/ui-store-CS-njcmT.js +0 -1
- package/dist/assets/useWebSocket-Dh3aAFDE.js +0 -28
- package/dist/assets/ws-client-WVGn8ORh.js +0 -1
- package/dist/components/AgentOfficeDetails.d.ts.map +0 -1
- package/dist/components/AgentOfficeView/model.d.ts.map +0 -1
- package/dist/components/AgentOfficeView.d.ts.map +0 -1
- package/dist/components/AgentRosterCatalogTab.d.ts.map +0 -1
- package/dist/components/AgentRosterChrome.d.ts.map +0 -1
- package/dist/components/AgentRosterLiveTab.d.ts.map +0 -1
- package/dist/components/AgentRosterSelfLearningTab.d.ts.map +0 -1
- package/dist/components/AgentRosterView.d.ts.map +0 -1
- package/dist/components/AgentRuntimePolicyEditor.d.ts.map +0 -1
- package/dist/components/AgentTranscript.d.ts.map +0 -1
- package/dist/components/AgentsMonitor.d.ts.map +0 -1
- package/dist/components/AgentsPage/format.d.ts.map +0 -1
- package/dist/components/AgentsPage.d.ts.map +0 -1
- package/dist/components/AnalyticsDashboard.d.ts.map +0 -1
- package/dist/components/AudienceMemoryPanel.d.ts.map +0 -1
- package/dist/components/AutonomyPicker.d.ts.map +0 -1
- package/dist/components/AvailabilityCalendarEditor.d.ts.map +0 -1
- package/dist/components/BoardView.d.ts.map +0 -1
- package/dist/components/ChangesView.d.ts.map +0 -1
- package/dist/components/ChatInput/code-detect.d.ts.map +0 -1
- package/dist/components/ChatInput/draft-token-counter.d.ts.map +0 -1
- package/dist/components/ChatInput/file-mention-picker.d.ts.map +0 -1
- package/dist/components/ChatInput/image-attach-control.d.ts.map +0 -1
- package/dist/components/ChatInput/image-attachments.d.ts.map +0 -1
- package/dist/components/ChatInput/queued-messages.d.ts.map +0 -1
- package/dist/components/ChatInput/refine-panel-host.d.ts.map +0 -1
- package/dist/components/ChatInput/slash-commands.d.ts.map +0 -1
- package/dist/components/ChatInput/slash-popup.d.ts.map +0 -1
- package/dist/components/ChatInput/slash-routing.d.ts.map +0 -1
- package/dist/components/ChatInput/stop-controls.d.ts.map +0 -1
- package/dist/components/ChatInput/use-paste-drop.d.ts.map +0 -1
- package/dist/components/ChatInput.d.ts.map +0 -1
- package/dist/components/ChatView/ThinkingBubble.d.ts.map +0 -1
- package/dist/components/ChatView/index.d.ts.map +0 -1
- package/dist/components/ChatView/utils.d.ts.map +0 -1
- package/dist/components/ChatView.d.ts.map +0 -1
- package/dist/components/CheckpointTimeline.d.ts.map +0 -1
- package/dist/components/ChipMultiSelect.d.ts.map +0 -1
- package/dist/components/ChronicleDashboard.d.ts.map +0 -1
- package/dist/components/ChroniclePipelineStrip.d.ts.map +0 -1
- package/dist/components/CodeEditor.d.ts.map +0 -1
- package/dist/components/CodeMap.d.ts.map +0 -1
- package/dist/components/CodeMapActivityDrawer.d.ts.map +0 -1
- package/dist/components/CodeMapActivityHelpers.d.ts.map +0 -1
- package/dist/components/CodeMapActivityStreamPanel.d.ts.map +0 -1
- package/dist/components/CodeMapCanvasSurface.d.ts.map +0 -1
- package/dist/components/CodeMapCanvasToolbar.d.ts.map +0 -1
- package/dist/components/CodeMapConfig.d.ts.map +0 -1
- package/dist/components/CodeMapDirectoryTree.d.ts.map +0 -1
- package/dist/components/CodeMapFlowState.d.ts.map +0 -1
- package/dist/components/CodeMapHeader.d.ts.map +0 -1
- package/dist/components/CodeMapLiveOverlay.d.ts.map +0 -1
- package/dist/components/CodeMapRelationInspector.d.ts.map +0 -1
- package/dist/components/CodeMapRelations.d.ts.map +0 -1
- package/dist/components/CodeMapSearchResults.d.ts.map +0 -1
- package/dist/components/CodeMapSelectedNodeSummary.d.ts.map +0 -1
- package/dist/components/CodeMapTreeSidebar.d.ts.map +0 -1
- package/dist/components/CodeMapVisuals.d.ts.map +0 -1
- package/dist/components/CollabPanel.d.ts.map +0 -1
- package/dist/components/CommandPalette/export-utils.d.ts.map +0 -1
- package/dist/components/CommandPalette/index.d.ts.map +0 -1
- package/dist/components/CommandPalette.d.ts.map +0 -1
- package/dist/components/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/ConfirmModal.d.ts.map +0 -1
- package/dist/components/ConnectionBanner.d.ts.map +0 -1
- package/dist/components/ContextBar.d.ts.map +0 -1
- package/dist/components/ContextBreakdownModal.d.ts.map +0 -1
- package/dist/components/ContextDashboard.d.ts.map +0 -1
- package/dist/components/ContextMemoryMonitor.d.ts.map +0 -1
- package/dist/components/ContextModePicker.d.ts.map +0 -1
- package/dist/components/CostChip.d.ts.map +0 -1
- package/dist/components/CronJobsPanel.d.ts.map +0 -1
- package/dist/components/CronTrigger.d.ts.map +0 -1
- package/dist/components/CustomRosterPanel.d.ts.map +0 -1
- package/dist/components/DeadCodeScanPanel/DeadCodeScanPanel.d.ts.map +0 -1
- package/dist/components/DebugDashboard.d.ts.map +0 -1
- package/dist/components/DependencyGraph.d.ts.map +0 -1
- package/dist/components/DesignGalleryView.d.ts.map +0 -1
- package/dist/components/DiffView.d.ts.map +0 -1
- package/dist/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/components/FallbackEditor.d.ts.map +0 -1
- package/dist/components/FileActivityDrawer.d.ts.map +0 -1
- package/dist/components/FileExplorer.d.ts.map +0 -1
- package/dist/components/FilePicker.d.ts.map +0 -1
- package/dist/components/FileReferenceChip.d.ts.map +0 -1
- package/dist/components/FleetMonitor.d.ts.map +0 -1
- package/dist/components/FleetPanel.d.ts.map +0 -1
- package/dist/components/GoalPanel.d.ts.map +0 -1
- package/dist/components/GoalView.d.ts.map +0 -1
- package/dist/components/InspectorPanel.d.ts.map +0 -1
- package/dist/components/KanbanAgentRunPanel.d.ts.map +0 -1
- package/dist/components/KanbanBoardChrome.d.ts.map +0 -1
- package/dist/components/KanbanBoardSidebar.d.ts.map +0 -1
- package/dist/components/KanbanBoardState.d.ts.map +0 -1
- package/dist/components/KanbanBoundaryEditor.d.ts.map +0 -1
- package/dist/components/KanbanCleanerAlert.d.ts.map +0 -1
- package/dist/components/KanbanColumnView.d.ts.map +0 -1
- package/dist/components/KanbanDecompositionPanel.d.ts.map +0 -1
- package/dist/components/KanbanQueueHealthBar.d.ts.map +0 -1
- package/dist/components/KanbanRunControls.d.ts.map +0 -1
- package/dist/components/KanbanTaskActivityRecorder.d.ts.map +0 -1
- package/dist/components/KanbanTaskCompletionChecks.d.ts.map +0 -1
- package/dist/components/KanbanTaskFields.d.ts.map +0 -1
- package/dist/components/KanbanTaskInspector.d.ts.map +0 -1
- package/dist/components/KanbanTaskOptions.d.ts.map +0 -1
- package/dist/components/KanbanTaskTree.d.ts.map +0 -1
- package/dist/components/KanbanVerificationDashboard.d.ts.map +0 -1
- package/dist/components/KanbanView.d.ts.map +0 -1
- package/dist/components/KanbanViewModeTabs.d.ts.map +0 -1
- package/dist/components/MailboxDetailView.d.ts.map +0 -1
- package/dist/components/MailboxPanel.d.ts.map +0 -1
- package/dist/components/MemoryManager/DeleteMemoryDialog.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryDetail.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryDrawer.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryEditor.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryFilters.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryGraph.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryInjectorTrace.d.ts +0 -3
- package/dist/components/MemoryManager/MemoryInjectorTrace.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryLifecycleTrace.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryList.d.ts.map +0 -1
- package/dist/components/MemoryManager/MemoryManagerEmpty.d.ts.map +0 -1
- package/dist/components/MemoryManager/SageTabs.d.ts.map +0 -1
- package/dist/components/MemoryManager/index.d.ts.map +0 -1
- package/dist/components/MemoryManager/selectors.d.ts.map +0 -1
- package/dist/components/MemoryManager/shared.d.ts.map +0 -1
- package/dist/components/MessageBubble/AttachmentGallery.d.ts.map +0 -1
- package/dist/components/MessageBubble/CopyButton.d.ts.map +0 -1
- package/dist/components/MessageBubble/ErrorBody.d.ts.map +0 -1
- package/dist/components/MessageBubble/LazyMarkdown.d.ts.map +0 -1
- package/dist/components/MessageBubble/StreamingMarkdown.d.ts.map +0 -1
- package/dist/components/MessageBubble/ToolInputView.d.ts.map +0 -1
- package/dist/components/MessageBubble/ToolLedgerCard.d.ts.map +0 -1
- package/dist/components/MessageBubble/index.d.ts.map +0 -1
- package/dist/components/MessageBubble/utils.d.ts.map +0 -1
- package/dist/components/MessageBubble.d.ts.map +0 -1
- package/dist/components/ModePicker.d.ts.map +0 -1
- package/dist/components/ModelPickDialog.d.ts.map +0 -1
- package/dist/components/ModelPicker.d.ts.map +0 -1
- package/dist/components/ModelSelectDialog.d.ts.map +0 -1
- package/dist/components/MonacoDiffView.d.ts.map +0 -1
- package/dist/components/NextStepsBar.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/CanvasPanels.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/Hud.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/Overlays.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/SelectedNodeDetailPanel.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/edges.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/nodes.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/resolve.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/use-recently-finished.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas/utils.d.ts.map +0 -1
- package/dist/components/OfficeMapCanvas.d.ts.map +0 -1
- package/dist/components/OfficeMapPanel.d.ts.map +0 -1
- package/dist/components/OfficeMapSettingsPanel.d.ts.map +0 -1
- package/dist/components/PhasePanel.d.ts.map +0 -1
- package/dist/components/PlanPanel.d.ts.map +0 -1
- package/dist/components/ProcessMonitor.d.ts.map +0 -1
- package/dist/components/PromptLibraryModal.d.ts.map +0 -1
- package/dist/components/ProviderWaitingRoom.d.ts.map +0 -1
- package/dist/components/QueuePanel.d.ts.map +0 -1
- package/dist/components/QuickModelSwitcher.d.ts.map +0 -1
- package/dist/components/QuickModelSwitcher.filter.d.ts.map +0 -1
- package/dist/components/RefinePanel.d.ts.map +0 -1
- package/dist/components/RefreshDebugView.d.ts.map +0 -1
- package/dist/components/SageMemoryCard.d.ts +0 -19
- package/dist/components/SageMemoryCard.d.ts.map +0 -1
- package/dist/components/SddActivityFeed.d.ts.map +0 -1
- package/dist/components/SddBoardView.d.ts.map +0 -1
- package/dist/components/SddDestroyDialog.d.ts.map +0 -1
- package/dist/components/SddFlowGraph.d.ts.map +0 -1
- package/dist/components/SddHub.d.ts.map +0 -1
- package/dist/components/SddKanbanView.d.ts.map +0 -1
- package/dist/components/SddTaskDrawer.d.ts.map +0 -1
- package/dist/components/SddWizard.d.ts.map +0 -1
- package/dist/components/SearchOverlay.d.ts.map +0 -1
- package/dist/components/SendButton.d.ts.map +0 -1
- package/dist/components/SessionWatchPanel.d.ts.map +0 -1
- package/dist/components/SessionsDashboard.d.ts.map +0 -1
- package/dist/components/SettingsPanel/BasicSettingsTabs.d.ts.map +0 -1
- package/dist/components/SettingsPanel/BrainSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ChimeraSettingsPanel.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ClearAllowlistDialog.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ConnectionsHealthSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/FallbacksSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/FleetSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/IntegrationsSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/MCPSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ModelSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/OAuthLoginSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/PluginToggleList.d.ts.map +0 -1
- package/dist/components/SettingsPanel/PreferenceControls.d.ts.map +0 -1
- package/dist/components/SettingsPanel/PreferenceToggle.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ProviderModelsPanel.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ProviderModelsPanel.filter.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ProviderSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/RoutingSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/SecuritySection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ShadowSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/ToolsSection.d.ts.map +0 -1
- package/dist/components/SettingsPanel/brain-section-options.d.ts.map +0 -1
- package/dist/components/SettingsPanel/index.d.ts.map +0 -1
- package/dist/components/SettingsPanel/local-presets.d.ts.map +0 -1
- package/dist/components/SettingsPanel/official-servers.d.ts.map +0 -1
- package/dist/components/SettingsPanel/settings-panel-reducers.d.ts.map +0 -1
- package/dist/components/SettingsPanel/undo-send-decision.d.ts.map +0 -1
- package/dist/components/SettingsPanel.d.ts.map +0 -1
- package/dist/components/SetupScreen/CustomProviderSection.d.ts.map +0 -1
- package/dist/components/SetupScreen/ModelEditor.d.ts.map +0 -1
- package/dist/components/SetupScreen/ProviderKeyCard.d.ts.map +0 -1
- package/dist/components/SetupScreen/key-operation.d.ts.map +0 -1
- package/dist/components/SetupScreen/popular-providers.d.ts.map +0 -1
- package/dist/components/SetupScreen/relative-time.d.ts.map +0 -1
- package/dist/components/SetupScreen/types.d.ts.map +0 -1
- package/dist/components/SetupScreen.d.ts.map +0 -1
- package/dist/components/ShortcutsOverlay.d.ts.map +0 -1
- package/dist/components/SideEffectTimeline.d.ts.map +0 -1
- package/dist/components/SidePanel/AgentsPanel.d.ts.map +0 -1
- package/dist/components/SidePanel/ChangesPanel.d.ts.map +0 -1
- package/dist/components/SidePanel/DesignStudioPanel.d.ts.map +0 -1
- package/dist/components/SidePanel/SessionList.d.ts.map +0 -1
- package/dist/components/SidePanel/SessionPanel.d.ts.map +0 -1
- package/dist/components/SidePanel/SkillsList.d.ts.map +0 -1
- package/dist/components/SidePanel/WorktreesPanel.d.ts.map +0 -1
- package/dist/components/SidePanel/index.d.ts.map +0 -1
- package/dist/components/SkillDetailView.d.ts.map +0 -1
- package/dist/components/SpecsView.d.ts.map +0 -1
- package/dist/components/TaskActivityTimeline.d.ts.map +0 -1
- package/dist/components/TaskBoard.d.ts.map +0 -1
- package/dist/components/TaskCard.d.ts.map +0 -1
- package/dist/components/TaskExecutionAttempts.d.ts.map +0 -1
- package/dist/components/TaskIntelligencePanel.d.ts.map +0 -1
- package/dist/components/TaskRiskPanel.d.ts.map +0 -1
- package/dist/components/TaskVerificationSection.d.ts.map +0 -1
- package/dist/components/TasksPanel.d.ts.map +0 -1
- package/dist/components/TechStackView/DependencyDetail.d.ts.map +0 -1
- package/dist/components/TechStackView/DependencyTable.d.ts.map +0 -1
- package/dist/components/TechStackView/FindingsPanel.d.ts.map +0 -1
- package/dist/components/TechStackView/TechStackToolbar.d.ts.map +0 -1
- package/dist/components/TechStackView/index.d.ts.map +0 -1
- package/dist/components/TechStackView/shared.d.ts.map +0 -1
- package/dist/components/TerminalPanel.d.ts.map +0 -1
- package/dist/components/ThemeProvider.d.ts.map +0 -1
- package/dist/components/Toaster.d.ts.map +0 -1
- package/dist/components/TodosPanel.d.ts.map +0 -1
- package/dist/components/ToolGroup.d.ts.map +0 -1
- package/dist/components/ToolResult.d.ts.map +0 -1
- package/dist/components/UpdateBanner.d.ts.map +0 -1
- package/dist/components/VerificationReportPanel.d.ts.map +0 -1
- package/dist/components/WatchMessageBubble.d.ts.map +0 -1
- package/dist/components/WelcomeScreen.d.ts.map +0 -1
- package/dist/components/WorkDashboard.d.ts.map +0 -1
- package/dist/components/WorkspaceDock.d.ts.map +0 -1
- package/dist/components/WorktreeGraph.d.ts.map +0 -1
- package/dist/components/WorktreeLanes.d.ts.map +0 -1
- package/dist/components/WorktreeOrphans.d.ts.map +0 -1
- package/dist/components/activity-bar/index.d.ts.map +0 -1
- package/dist/components/activity-bar/nav.d.ts.map +0 -1
- package/dist/components/agent-roster-data.d.ts.map +0 -1
- package/dist/components/agents/AgentDetailSection.d.ts.map +0 -1
- package/dist/components/agents/AgentRosterCard.d.ts.map +0 -1
- package/dist/components/agents/FleetSummaryBar.d.ts.map +0 -1
- package/dist/components/codemap-model.d.ts.map +0 -1
- package/dist/components/context-editor/ContextWindowEditor.d.ts.map +0 -1
- package/dist/components/dashboard-primitives.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/monaco-theme.d.ts.map +0 -1
- package/dist/components/toaster-helpers.d.ts.map +0 -1
- package/dist/components/ui/PickerCardList.d.ts.map +0 -1
- package/dist/components/ui/api-key-display.d.ts.map +0 -1
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/concurrency-gauge.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/empty-state.d.ts.map +0 -1
- package/dist/components/ui/event-timeline.d.ts.map +0 -1
- package/dist/components/ui/fleet-agent-row.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/pagination.d.ts.map +0 -1
- package/dist/components/ui/progress-ring.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sparkline.d.ts.map +0 -1
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/useAgentRosterData.d.ts.map +0 -1
- package/dist/components/useKanbanRegistrySessionIds.d.ts.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/use-ws-handlers.d.ts.map +0 -1
- package/dist/hooks/useDesktopBridge.d.ts.map +0 -1
- package/dist/hooks/useF5Resilience.d.ts.map +0 -1
- package/dist/hooks/useFieldKeyboardNav.d.ts.map +0 -1
- package/dist/hooks/useFleetPolling.d.ts.map +0 -1
- package/dist/hooks/useGitInfo.d.ts.map +0 -1
- package/dist/hooks/useGlobalKeyboardShortcuts.d.ts.map +0 -1
- package/dist/hooks/useHorizontalScroll.d.ts.map +0 -1
- package/dist/hooks/useKanbanMeta.d.ts.map +0 -1
- package/dist/hooks/useMemoryForFile.d.ts.map +0 -1
- package/dist/hooks/usePagination.d.ts.map +0 -1
- package/dist/hooks/useProviderModels.d.ts.map +0 -1
- package/dist/hooks/useScrollPosition.d.ts.map +0 -1
- package/dist/hooks/useWebSocket.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/chat-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/coordinator-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/files-mailbox-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/fleet-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/misc-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/session-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers/techstack-handlers.d.ts.map +0 -1
- package/dist/hooks/ws-handlers.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/languages.d.ts.map +0 -1
- package/dist/index.css.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/lib/accent-colors.d.ts.map +0 -1
- package/dist/lib/agent-office.d.ts.map +0 -1
- package/dist/lib/agent-status.d.ts.map +0 -1
- package/dist/lib/chime.d.ts.map +0 -1
- package/dist/lib/color.d.ts.map +0 -1
- package/dist/lib/completion.d.ts.map +0 -1
- package/dist/lib/core-browser-shim.d.ts.map +0 -1
- package/dist/lib/default-prompt-pools.d.ts.map +0 -1
- package/dist/lib/desktop-host.d.ts.map +0 -1
- package/dist/lib/desktop-shell.d.ts.map +0 -1
- package/dist/lib/fallback-ref.d.ts.map +0 -1
- package/dist/lib/favicon.d.ts.map +0 -1
- package/dist/lib/file-icons.d.ts.map +0 -1
- package/dist/lib/goal.d.ts.map +0 -1
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/kanban-cleaner.d.ts.map +0 -1
- package/dist/lib/kanban-metadata.d.ts.map +0 -1
- package/dist/lib/kanban-verification.d.ts.map +0 -1
- package/dist/lib/model-calendar.d.ts.map +0 -1
- package/dist/lib/model-matrix-routes.d.ts.map +0 -1
- package/dist/lib/notify.d.ts.map +0 -1
- package/dist/lib/plugin-enablement.d.ts.map +0 -1
- package/dist/lib/roster-ws.d.ts.map +0 -1
- package/dist/lib/sage-block.d.ts.map +0 -1
- package/dist/lib/sdd-theme.d.ts.map +0 -1
- package/dist/lib/stream-coalescer.d.ts.map +0 -1
- package/dist/lib/terminal-dock.d.ts.map +0 -1
- package/dist/lib/tool-icon.d.ts.map +0 -1
- package/dist/lib/tool-summary.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/view-navigation.d.ts.map +0 -1
- package/dist/lib/ws-client-actions.d.ts.map +0 -1
- package/dist/lib/ws-client-contracts.d.ts.map +0 -1
- package/dist/lib/ws-client-helpers.d.ts.map +0 -1
- package/dist/lib/ws-client-utils.d.ts.map +0 -1
- package/dist/lib/ws-client.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/protocol-compatibility.d.ts.map +0 -1
- package/dist/stores/auto-submit-streak.d.ts.map +0 -1
- package/dist/stores/chat-store.d.ts.map +0 -1
- package/dist/stores/codemap-activity-store.d.ts.map +0 -1
- package/dist/stores/codemap-index-store.d.ts.map +0 -1
- package/dist/stores/config-store.d.ts.map +0 -1
- package/dist/stores/context-editor-store.d.ts.map +0 -1
- package/dist/stores/coordinator-monitor-store.d.ts.map +0 -1
- package/dist/stores/cron-store.d.ts.map +0 -1
- package/dist/stores/file-reference-store.d.ts.map +0 -1
- package/dist/stores/file-store.d.ts.map +0 -1
- package/dist/stores/fleet-store.d.ts.map +0 -1
- package/dist/stores/git-changes-store.d.ts.map +0 -1
- package/dist/stores/git-info-store.d.ts.map +0 -1
- package/dist/stores/goal-assess-store.d.ts.map +0 -1
- package/dist/stores/goal-run-store.d.ts.map +0 -1
- package/dist/stores/goal-state-store.d.ts.map +0 -1
- package/dist/stores/goal-store.d.ts.map +0 -1
- package/dist/stores/history-store.d.ts.map +0 -1
- package/dist/stores/index.d.ts.map +0 -1
- package/dist/stores/kanban-store.d.ts.map +0 -1
- package/dist/stores/local-prefs.d.ts.map +0 -1
- package/dist/stores/mailbox-store.d.ts.map +0 -1
- package/dist/stores/memory-injector-store.d.ts.map +0 -1
- package/dist/stores/memory-lifecycle-store.d.ts.map +0 -1
- package/dist/stores/monitor-store.d.ts.map +0 -1
- package/dist/stores/office-map-store.d.ts.map +0 -1
- package/dist/stores/provider-status-store.d.ts.map +0 -1
- package/dist/stores/sdd-board-store.d.ts.map +0 -1
- package/dist/stores/sdd-wizard-store.d.ts.map +0 -1
- package/dist/stores/session-store.d.ts.map +0 -1
- package/dist/stores/side-effect-store.d.ts.map +0 -1
- package/dist/stores/specs-store.d.ts.map +0 -1
- package/dist/stores/techstack-store.d.ts.map +0 -1
- package/dist/stores/types.d.ts.map +0 -1
- package/dist/stores/ui-store.d.ts.map +0 -1
- package/dist/stores/viz-store.d.ts.map +0 -1
- package/dist/stores/worktree-store.d.ts.map +0 -1
- package/dist/types/brain.d.ts.map +0 -1
- package/dist/types/chronicle.d.ts.map +0 -1
- package/dist/types/client-message.d.ts.map +0 -1
- package/dist/types/collab.d.ts.map +0 -1
- package/dist/types/connections.d.ts.map +0 -1
- package/dist/types/goal-kanban-worktree.d.ts.map +0 -1
- package/dist/types/protocol-core.d.ts.map +0 -1
- package/dist/types/runtime.d.ts.map +0 -1
- package/dist/types/sage.d.ts.map +0 -1
- package/dist/types/server-message.d.ts.map +0 -1
- package/dist/types/skills-design.d.ts.map +0 -1
- package/dist/types/system.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Ei as t,Ti as n,et as r,hi as i,tn as a,wa as o}from"./vendor-BTTkQ9Tn.js";import{A as s}from"./stores-DyQOSkkD.js";import{a as c,n as l,o as u,r as d,t as f}from"./dialog-BJef9ZZo.js";import{k as p,o as m}from"./index-x6-rLl5H.js";var h=e(o(),1),g=r();function _(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}function v(e){if(!e)return`—`;let t=new Date(e),n=Date.now(),r=t.getTime()-n,i=Math.abs(r);if(i<6e4)return r>=0?`<1m`:`<1m ago`;if(i<36e5){let e=Math.round(i/6e4);return r>=0?`${e}m`:`${e}m ago`}if(i<864e5){let e=Math.round(i/36e5);return r>=0?`${e}h`:`${e}h ago`}return t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function y({enabled:e,overdue:r}){return e?r?(0,g.jsxs)(m,{variant:`destructive`,className:`gap-1`,children:[(0,g.jsx)(i,{className:`h-3 w-3`}),`Overdue`]}):(0,g.jsxs)(m,{variant:`default`,className:`gap-1 bg-emerald-600 hover:bg-emerald-600`,children:[(0,g.jsx)(n,{className:`h-3 w-3`}),`Active`]}):(0,g.jsxs)(m,{variant:`secondary`,className:`gap-1`,children:[(0,g.jsx)(t,{className:`h-3 w-3`}),`Disabled`]})}function b({open:e,onClose:t}){let n=s(e=>e.snapshot),r=s(e=>e.lastFiredAt);s(e=>e.revision);let o=n?.jobs??[],m=n?.count??0,b=n?.maxConcurrent??0,x=o.filter(e=>e.overdue).length,S=o.filter(e=>e.enabled).length,C=o.reduce((e,t)=>e+t.runCount,0);return(0,g.jsx)(f,{open:e,onOpenChange:(0,h.useCallback)(e=>{e||t()},[t]),children:(0,g.jsxs)(l,{className:`max-w-3xl max-h-[80vh] flex flex-col`,children:[(0,g.jsxs)(c,{children:[(0,g.jsxs)(u,{className:`flex items-center gap-2`,children:[(0,g.jsx)(a,{className:`h-5 w-5`}),`Cron Jobs`]}),(0,g.jsx)(d,{children:`Scheduled recurring tasks managed by the cron plugin.`})]}),m>0&&(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-sm text-muted-foreground border-b border-border/70 pb-3`,children:[(0,g.jsxs)(`span`,{className:`font-medium text-foreground`,children:[m,` job`,m===1?``:`s`]}),(0,g.jsxs)(`span`,{className:`text-emerald-500`,children:[S,` enabled`]}),x>0&&(0,g.jsxs)(`span`,{className:`text-destructive`,children:[x,` overdue`]}),(0,g.jsxs)(`span`,{children:[C,` total runs`]}),(0,g.jsxs)(`span`,{className:`text-muted-foreground/60`,children:[`max `,b,` concurrent`]})]}),m===0&&(0,g.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-12 text-muted-foreground`,children:[(0,g.jsx)(i,{className:`h-8 w-8 opacity-40`}),(0,g.jsx)(`p`,{className:`text-sm`,children:`No cron jobs scheduled.`}),(0,g.jsxs)(`p`,{className:`text-xs`,children:[`Use `,(0,g.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5`,children:`cron_schedule`}),` to add one.`]})]}),m>0&&(0,g.jsx)(p,{className:`flex-1 -mx-6 px-6`,children:(0,g.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,g.jsx)(`thead`,{children:(0,g.jsxs)(`tr`,{className:`border-b border-border/50 text-left text-xs text-muted-foreground`,children:[(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium`,children:`Status`}),(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium`,children:`Name`}),(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium`,children:`Interval`}),(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium text-right`,children:`Runs`}),(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium`,children:`Next Run`}),(0,g.jsx)(`th`,{className:`pb-2 pr-3 font-medium`,children:`Last Run`}),(0,g.jsx)(`th`,{className:`pb-2 font-medium`,children:`Action`})]})}),(0,g.jsx)(`tbody`,{children:o.map(e=>(0,g.jsxs)(`tr`,{className:`border-b border-border/30 last:border-0`,children:[(0,g.jsx)(`td`,{className:`py-2.5 pr-3`,children:(0,g.jsx)(y,{enabled:e.enabled,overdue:e.overdue})}),(0,g.jsx)(`td`,{className:`py-2.5 pr-3 font-mono text-xs font-medium max-w-[160px] truncate`,title:e.name,children:e.name}),(0,g.jsx)(`td`,{className:`py-2.5 pr-3 font-mono text-xs tabular-nums`,children:_(e.intervalMs)}),(0,g.jsxs)(`td`,{className:`py-2.5 pr-3 text-right font-mono text-xs tabular-nums`,children:[e.runCount,r[e.name]&&(0,g.jsx)(`span`,{className:`ml-1 text-emerald-500`,title:`Last fired at ${r[e.name]}`,children:`●`})]}),(0,g.jsx)(`td`,{className:`py-2.5 pr-3 font-mono text-xs tabular-nums`,children:v(e.nextRun)}),(0,g.jsx)(`td`,{className:`py-2.5 pr-3 font-mono text-xs tabular-nums`,children:v(e.lastRun)}),(0,g.jsx)(`td`,{className:`py-2.5 font-mono text-xs max-w-[200px] truncate text-muted-foreground`,title:e.action,children:e.action})]},e.name))})]})}),m>0&&(0,g.jsxs)(`p`,{className:`text-xs text-muted-foreground pt-3 border-t border-border/70`,children:[`Use `,(0,g.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-[11px]`,children:`cron_schedule`}),` to add,`,(0,g.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-[11px] ml-1`,children:`cron_cancel`}),` to remove.`]})]})})}export{b as CronJobsPanel};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{et as t,wa as n}from"./vendor-BTTkQ9Tn.js";var r=e(n(),1),i=t(),a={0:`P0 Dead Package`,1:`P1 Dead File`,2:`P2 Dead Symbol`},o={0:`hsl(var(--destructive))`,1:`hsl(var(--warning))`,2:`hsl(var(--info))`};async function s(e){let t=await e.text();try{return JSON.parse(t)}catch{let e=t.length>300?`${t.slice(0,300)}…`:t;throw console.warn(JSON.stringify({level:`warn`,event:`deadcode_parse_error`,preview:e,timestamp:new Date().toISOString()})),Error(`The server returned a non-JSON response (possibly an HTML error page). Check that the backend is running and the /api/deadcode/* routes are wired.`)}}function c(){let[e,t]=(0,r.useState)(`idle`),[n,c]=(0,r.useState)(`idle`),[l,p]=(0,r.useState)(null),[m,h]=(0,r.useState)(null),[g,_]=(0,r.useState)(null),v=(0,r.useCallback)(async()=>{t(`scanning`),_(null),p(null),h(null),c(`idle`);try{let e=await fetch(`/api/deadcode/scan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({})});if(!e.ok){let t=await s(e);throw Error(t.detail??t.error??`HTTP ${e.status}`)}let n=await s(e);p(n),t(`done`)}catch(e){_(e instanceof Error?e.message:String(e)),t(`error`)}},[]),y=(0,r.useCallback)(async()=>{if(l){c(`generating`),_(null);try{let e=await fetch(`/api/deadcode/action-plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(l)});if(!e.ok){let t=await s(e);throw Error(t.detail??t.error??`HTTP ${e.status}`)}let t=await s(e);h(t),c(`ready`)}catch(e){_(e instanceof Error?e.message:String(e)),c(`idle`)}}},[l]),b=(0,r.useCallback)(()=>{if(!m)return;c(`executing`);let e=[`# Dead-Code Cleanup Plan`,``,m.summary,``,`## Files to address (in priority order)`,...m.files.map((e,t)=>`${t+1}. [${a[e.priority]}] ${e.file} — ${e.symbolCount} symbol(s) to remove`+(e.symbols.length>0?`\n Symbols: ${e.symbols.slice(0,5).join(`, `)}${e.symbols.length>5?` and ${e.symbols.length-5} more`:``}`:``))].join(`
|
|
2
|
+
`),t=window.__WS;t&&t.readyState===WebSocket.OPEN?t.send(JSON.stringify({type:`user.message`,payload:{text:e,action:`send`}})):(navigator.clipboard.writeText(e),_(`Agent not connected. Plan copied to clipboard — paste it into the chat.`)),c(`idle`)},[m]);return(0,i.jsxs)(`div`,{style:{padding:`16px`,fontFamily:`var(--font-sans, system-ui, sans-serif)`,color:`hsl(var(--foreground))`,background:`hsl(var(--background))`},children:[(0,i.jsx)(`h2`,{style:{margin:`0 0 16px`,fontSize:`18px`,fontWeight:600,color:`hsl(var(--foreground))`},children:`🔍 Dead-Code Scan`}),(0,i.jsx)(`button`,{type:`button`,onClick:v,disabled:e===`scanning`,style:{padding:`8px 16px`,fontSize:`14px`,fontWeight:500,background:e===`scanning`?`hsl(var(--muted))`:`hsl(var(--primary))`,color:e===`scanning`?`hsl(var(--muted-foreground))`:`hsl(var(--primary-foreground))`,border:`1px solid hsl(var(--border))`,borderRadius:`0`,cursor:e===`scanning`?`not-allowed`:`pointer`},children:e===`scanning`?`Scanning…`:`Scan for Dead Code`}),g&&(0,i.jsxs)(`div`,{style:{marginTop:`12px`,padding:`8px 12px`,background:`hsl(var(--destructive) / 0.1)`,color:`hsl(var(--destructive))`,border:`1px solid hsl(var(--destructive) / 0.3)`,borderRadius:`0`,fontSize:`13px`},children:[g,(0,i.jsx)(`button`,{type:`button`,onClick:()=>_(null),style:{marginLeft:`12px`,background:`none`,border:`none`,cursor:`pointer`,fontWeight:600,color:`hsl(var(--destructive))`},children:`✕`})]}),l&&(0,i.jsxs)(`div`,{style:{marginTop:`16px`},children:[(0,i.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,marginBottom:`12px`},children:[(0,i.jsx)(u,{label:`Total Symbols`,value:l.stats.totalSymbols,token:`info`}),(0,i.jsx)(u,{label:`Alive`,value:l.stats.alive,token:`success`}),(0,i.jsx)(u,{label:`Dead`,value:l.stats.dead,token:`destructive`})]}),l.deadPackages.length>0&&(0,i.jsx)(d,{title:`Dead Packages (${l.deadPackages.length})`,token:`destructive`,children:l.deadPackages.map(e=>(0,i.jsx)(f,{columns:[e.package,e.path,`${e.fileCount} file(s)`]},e.package))}),l.deadFiles.length>0&&(0,i.jsx)(d,{title:`Dead Files (${l.deadFiles.length})`,token:`warning`,children:l.deadFiles.map(e=>(0,i.jsx)(f,{columns:[e.file,`${e.symbolCount} symbol(s)`,e.lang]},e.file))}),l.deadSymbols.length>0&&(0,i.jsxs)(d,{title:`Dead Symbols (${l.deadSymbols.length})`,token:`info`,children:[l.deadSymbols.slice(0,50).map(e=>(0,i.jsx)(f,{columns:[e.name,e.kind,e.file.split(`/`).pop()??e.file,`line ${e.line}`]},`${e.file}:${e.line}:${e.name}`)),l.deadSymbols.length>50&&(0,i.jsxs)(`div`,{style:{padding:`6px 8px`,color:`hsl(var(--muted-foreground))`,fontSize:`12px`},children:[`… and `,l.deadSymbols.length-50,` more`]})]}),e===`done`&&(0,i.jsx)(`button`,{type:`button`,onClick:y,disabled:n===`generating`,style:{marginTop:`12px`,padding:`8px 16px`,fontSize:`14px`,fontWeight:500,background:n===`generating`?`hsl(var(--muted))`:`hsl(var(--accent))`,color:n===`generating`?`hsl(var(--muted-foreground))`:`hsl(var(--accent-foreground))`,border:`1px solid hsl(var(--border))`,borderRadius:`0`,cursor:n===`generating`?`not-allowed`:`pointer`},children:n===`generating`?`Generating…`:`Generate Action Plan`})]}),m&&(0,i.jsxs)(`div`,{style:{marginTop:`16px`,border:`1px solid hsl(var(--border))`,borderRadius:`0`,padding:`12px`,background:`hsl(var(--card))`},children:[(0,i.jsx)(`h3`,{style:{margin:`0 0 8px`,fontSize:`15px`,fontWeight:600,color:`hsl(var(--card-foreground))`},children:`📋 Action Plan`}),(0,i.jsx)(`p`,{style:{fontSize:`13px`,color:`hsl(var(--muted-foreground))`,margin:`0 0 12px`},children:m.summary}),m.files.map((e,t)=>(0,i.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`8px`,padding:`6px 0`,borderBottom:t<m.files.length-1?`1px solid hsl(var(--border))`:`none`,fontSize:`13px`},children:[(0,i.jsx)(`span`,{style:{background:o[e.priority]??`hsl(var(--muted-foreground))`,color:`hsl(var(--primary-foreground))`,borderRadius:`0`,padding:`2px 6px`,fontSize:`11px`,fontWeight:600,whiteSpace:`nowrap`,flexShrink:0},children:a[e.priority]??`P${e.priority}`}),(0,i.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,i.jsx)(`div`,{style:{fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`hsl(var(--foreground))`},children:e.file}),(0,i.jsxs)(`div`,{style:{color:`hsl(var(--muted-foreground))`,fontSize:`12px`},children:[e.symbolCount,` symbol(s)`,e.symbols.length>0&&` · ${e.symbols.slice(0,2).join(`, `)}${e.symbols.length>2?`…`:``}`]})]})]},e.file)),(0,i.jsx)(`button`,{type:`button`,onClick:b,disabled:n===`executing`,style:{marginTop:`12px`,padding:`8px 16px`,fontSize:`14px`,fontWeight:500,background:n===`executing`?`hsl(var(--muted))`:`hsl(var(--success))`,color:`hsl(var(--primary-foreground))`,border:`1px solid hsl(var(--border))`,borderRadius:`0`,cursor:n===`executing`?`not-allowed`:`pointer`},children:n===`executing`?`Sending…`:`Execute Plan via Agent`})]})]})}var l={success:`hsl(var(--success))`,warning:`hsl(var(--warning))`,info:`hsl(var(--info))`,destructive:`hsl(var(--destructive))`,primary:`hsl(var(--primary))`};function u({label:e,value:t,token:n}){let r=l[n];return(0,i.jsxs)(`div`,{style:{flex:1,padding:`10px`,borderRadius:`0`,border:`1px solid hsl(var(--border))`,background:`hsl(var(--card))`,textAlign:`center`},children:[(0,i.jsx)(`div`,{style:{fontSize:`24px`,fontWeight:700,color:r},children:t}),(0,i.jsx)(`div`,{style:{fontSize:`12px`,color:`hsl(var(--muted-foreground))`,marginTop:`2px`},children:e})]})}function d({title:e,token:t,children:n}){let r=l[t];return(0,i.jsxs)(`div`,{style:{marginBottom:`12px`},children:[(0,i.jsx)(`h3`,{style:{margin:`0 0 6px`,fontSize:`14px`,fontWeight:600,color:r,borderLeft:`3px solid ${r}`,paddingLeft:`8px`},children:e}),(0,i.jsx)(`div`,{style:{border:`1px solid hsl(var(--border))`,borderRadius:`0`,overflow:`hidden`,fontSize:`13px`},children:n})]})}function f({columns:e}){return(0,i.jsx)(`div`,{style:{display:`flex`,gap:`8px`,padding:`5px 8px`,borderBottom:`1px solid hsl(var(--border))`,fontSize:`13px`,fontFamily:`var(--font-mono, monospace)`,background:`hsl(var(--card))`,color:`hsl(var(--card-foreground))`},children:e.map((e,t)=>(0,i.jsx)(`span`,{style:{flex:t===0?2:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e},t))})}export{c as DeadCodeScanPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Cr as t,Hr as n,Mi as r,Sa as i,Vi as a,Yr as o,Yt as s,_a as c,ba as l,cn as u,et as d,gi as f,ma as p,xt as m}from"./vendor-2VBBgNb5.js";import"./i18n-1BkaqMgr.js";import{b as h}from"./index-BPfIz78e.js";var g=e(i(),1),_=d();function v({title:e,value:t,subtitle:n,icon:r,color:i=`text-primary`,trend:a}){let{t:o}=c();return(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,_.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium`,children:e}),(0,_.jsx)(`p`,{className:`mt-1 truncate text-xl font-semibold tabular-nums sm:text-2xl ${i}`,children:t}),n&&(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:n})]}),(0,_.jsx)(`div`,{className:`shrink-0 rounded-lg bg-muted/70 p-2 ${i}`,children:(0,_.jsx)(r,{className:`w-5 h-5`})})]}),a&&(0,_.jsxs)(`div`,{className:`mt-2 flex items-center gap-1`,children:[a===`up`&&(0,_.jsx)(m,{className:`w-3 h-3 text-success`}),a===`down`&&(0,_.jsx)(m,{className:`w-3 h-3 rotate-180 text-destructive`}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:o(a===`up`?`activity:debug.trendUp`:a===`down`?`activity:debug.trendDown`:`activity:debug.trendStable`)})]})]})}function y(){let{t:e}=c(),[i,d]=(0,g.useState)({fileWatcher:null,system:null,lastUpdated:null,error:null}),[y,C]=(0,g.useState)(!0),[w,T]=(0,g.useState)(2e3),E=(0,g.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch(`/debug/watcher-metrics`),fetch(`/debug/system`,{cache:`no-store`})]),n=null,r=e.headers.get(`content-type`)??``;if(e.ok&&r.includes(`application/json`)&&(n=await e.json()),!t.ok)throw Error(`System metrics request failed (${t.status})`);let i=await t.json();d({fileWatcher:n,system:i,lastUpdated:new Date,error:null})}catch(e){d(t=>({...t,error:e instanceof Error?e.message:l.t(`activity:debug.fetchFailed`)}))}finally{C(!1)}},[]);return(0,g.useEffect)(()=>{E();let e=setInterval(E,w);return()=>clearInterval(e)},[E,w]),(0,_.jsx)(`div`,{ref:h(`debug`),className:`h-full min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,_.jsxs)(`div`,{className:`mx-auto flex max-w-7xl flex-col gap-5`,children:[(0,_.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-semibold sm:text-xl`,children:[(0,_.jsx)(a,{className:`h-5 w-5 text-primary`}),e(`activity:debug.heading`)]}),(0,_.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e(`activity:debug.subtitle`)})]}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,_.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-sm`,children:[(0,_.jsx)(u,{className:`w-4 h-4 text-muted-foreground`}),(0,_.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e(`activity:debug.refreshLabel`)}),(0,_.jsxs)(`select`,{value:w,onChange:e=>T(Number(e.target.value)),className:`h-9 rounded-md border border-border/70 bg-background/70 px-2 text-sm`,children:[(0,_.jsx)(`option`,{value:1e3,children:`1s`}),(0,_.jsx)(`option`,{value:2e3,children:`2s`}),(0,_.jsx)(`option`,{value:5e3,children:`5s`}),(0,_.jsx)(`option`,{value:1e4,children:`10s`})]})]}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>{C(!0),E()},disabled:y,className:`inline-flex h-9 items-center justify-center gap-2 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 disabled:opacity-50`,children:[(0,_.jsx)(u,{className:`w-4 h-4 ${y?`animate-spin`:``}`}),e(`common:action.refresh`)]})]})]})}),i.lastUpdated&&(0,_.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border/60 bg-card/55 px-3 py-2 text-sm text-muted-foreground`,children:[(0,_.jsx)(f,{className:`w-4 h-4`}),e(`activity:debug.lastUpdated`,{time:i.lastUpdated.toLocaleTimeString()})]}),i.error&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-destructive/25 bg-destructive/10 p-4 text-destructive`,children:[(0,_.jsx)(r,{className:`w-5 h-5 flex-shrink-0`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`p`,{className:`font-medium`,children:e(`activity:debug.fetchFailed`)}),(0,_.jsx)(`p`,{className:`text-sm opacity-80`,children:i.error})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(o,{className:`h-4 w-4 text-primary`}),e(`activity:debug.fileWatcher`)]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:e(`activity:debug.watcherStatus`),value:i.fileWatcher?.watcherActive?e(`activity:debug.running`):e(`activity:debug.stopped`),icon:s,color:i.fileWatcher?.watcherActive?`text-success`:`text-destructive`}),(0,_.jsx)(v,{title:e(`activity:debug.activeProjects`),value:i.fileWatcher?.activeProjects??0,subtitle:e(`activity:debug.projectsWatched`),icon:n,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.fileChanges`),value:i.fileWatcher?.fileChangesDetected??0,subtitle:e(`activity:debug.totalDetected`),icon:p,color:`text-primary`,trend:`neutral`}),(0,_.jsx)(v,{title:e(`activity:debug.filesProcessed`),value:i.fileWatcher?.filesProcessed??0,subtitle:e(`activity:debug.afterHash`),icon:t,color:`text-success`})]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mt-4`,children:[(0,_.jsx)(v,{title:e(`activity:debug.broadcastsSent`),value:i.fileWatcher?.broadcastsSent??0,subtitle:e(`activity:debug.toClients`),icon:m,color:`text-success`}),(0,_.jsx)(v,{title:e(`activity:debug.debounceResets`),value:i.fileWatcher?.debounceResets??0,subtitle:e(`activity:debug.rapidWrites`),icon:u,color:`text-warning`}),(0,_.jsx)(v,{title:e(`activity:debug.avgDebounce`),value:`${(i.fileWatcher?.averageDebounceDelayMs??0).toFixed(1)}ms`,subtitle:e(`activity:debug.actualDelay`),icon:f,color:`text-warning`}),(0,_.jsx)(v,{title:e(`activity:debug.totalDelay`),value:`${(i.fileWatcher?.totalDebounceDelayMs??0).toFixed(0)}ms`,subtitle:e(`activity:debug.sumDelays`),icon:a,color:`text-primary`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(t,{className:`h-4 w-4 text-primary`}),`WebUI Server Process`]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:`Process RAM (RSS)`,value:b(i.system?.memoryUsage?.rss??0),subtitle:i.system?`PID ${i.system.pid}`:void 0,icon:s,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.heapUsed`),value:b(i.system?.memoryUsage?.heapUsed??0),subtitle:e(`activity:debug.jsHeap`),icon:a,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.heapTotal`),value:b(i.system?.memoryUsage?.heapTotal??0),subtitle:e(`activity:debug.totalHeap`),icon:a,color:`text-success`}),(0,_.jsx)(v,{title:`V8 Heap Limit`,value:b(i.system?.heapLimit??0),subtitle:`Configured old-space ceiling`,icon:t,color:`text-warning`}),(0,_.jsx)(v,{title:`Server Uptime`,value:S(i.system?.uptime??0),subtitle:`Since process start`,icon:f,color:`text-primary`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(p,{className:`h-4 w-4 text-primary`}),`Live WrongStack Processes`]}),(0,_.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-border/70 bg-card/75 shadow-sm`,children:(0,_.jsxs)(`table`,{className:`w-full min-w-[980px] text-left text-xs`,children:[(0,_.jsx)(`thead`,{className:`border-b border-border/70 bg-muted/35 text-muted-foreground`,children:(0,_.jsxs)(`tr`,{children:[(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Surface`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Memory`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Growth / signal`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Workload`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`HQ offline queue`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Resources / hotspot`})]})}),(0,_.jsxs)(`tbody`,{children:[(i.system?.processes??[]).map(e=>{let t=[e.workload.messages===void 0?void 0:`${e.workload.messages} msgs`,e.workload.messageEstimatedTokens===void 0?void 0:`${e.workload.messageEstimatedTokens.toLocaleString()} ctx tokens`,e.workload.historyEntries===void 0?void 0:`${e.workload.historyMountedEntries??0}/${e.workload.historyEntries} history mounted`,e.workload.appRenders===void 0?void 0:`${e.workload.appRenders} renders`,e.workload.metricsDroppedObservations?`${e.workload.metricsDroppedObservations} metric drops`:void 0,e.workload.kanbanSyncActive?`kanban sync active`:void 0,e.workload.kanbanSyncPendingBoards?`${e.workload.kanbanSyncPendingBoards} kanban pending`:void 0,e.workload.kanbanSyncFullRescanPending?`kanban full rescan pending`:void 0,e.workload.kanbanSyncRemoteApplyQueued?`${e.workload.kanbanSyncPendingRemoteBoards??0} remote boards queued`:void 0,e.workload.kanbanSyncCoalescedRefreshes?`${e.workload.kanbanSyncCoalescedRefreshes} kanban coalesced`:void 0,e.workload.kanbanSupervisorSnapshots?`${e.workload.kanbanSupervisorSnapshots} supervised boards`:void 0,e.workload.kanbanSupervisorScheduledBoards?`${e.workload.kanbanSupervisorScheduledBoards} supervisor schedules`:void 0].filter(Boolean).join(` · `);return(0,_.jsxs)(`tr`,{className:`border-b border-border/50 align-top last:border-b-0`,children:[(0,_.jsxs)(`td`,{className:`px-3 py-3`,children:[(0,_.jsx)(`div`,{className:`font-medium text-foreground`,children:e.surface}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`PID `,e.pid]}),(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:new Date(e.ts).toLocaleTimeString()})]}),(0,_.jsxs)(`td`,{className:`px-3 py-3 tabular-nums`,children:[(0,_.jsxs)(`div`,{children:[`RSS `,b(e.memory.rss)]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`heap `,b(e.memory.heapUsed),e.memory.retainedHeapUsed===void 0?``:` · retained ${b(e.memory.retainedHeapUsed)}`]}),e.memory.nativeResidual===void 0?null:(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`native `,b(e.memory.nativeResidual)]}),e.memory.external===void 0?null:(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`external `,b(e.memory.external),e.memory.arrayBuffers===void 0?``:` · buffers ${b(e.memory.arrayBuffers)}`]})]}),(0,_.jsxs)(`td`,{className:`px-3 py-3 tabular-nums`,children:[(0,_.jsx)(`div`,{className:e.signal===`stable`?`text-success`:e.signal?`text-warning`:`text-muted-foreground`,children:e.signal??`sampling`}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`heap `,x(e.heapGrowthBytesPerHour)]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`RSS `,x(e.rssGrowthBytesPerHour)]})]}),(0,_.jsx)(`td`,{className:`px-3 py-3 text-muted-foreground`,children:t||`—`}),(0,_.jsx)(`td`,{className:`px-3 py-3 tabular-nums`,children:e.hqQueue?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{children:[e.hqQueue.entries,` frames ·`,` `,b(e.hqQueue.bytes),` /`,` `,b(e.hqQueue.maxBytes)]}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[e.hqQueue.coalescedFrames,` coalesced ·`,` `,e.hqQueue.droppedFrames,` dropped`]}),e.hqSnapshot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`snapshot`,` `,e.hqSnapshot.inFlight?`in-flight`:e.hqSnapshot.pending?`pending`:e.hqSnapshot.timerScheduled?`scheduled`:`idle`]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`events`,` `,e.hqSnapshot.eventInFlight?`in-flight`:`idle`,` ·`,` `,e.hqSnapshot.pendingEvents,` pending ·`,` `,e.hqSnapshot.coalescedEvents,` coalesced ·`,` `,e.hqSnapshot.droppedEvents,` dropped`]})]}):null]}):(0,_.jsx)(`span`,{className:`text-muted-foreground`,children:`—`})}),(0,_.jsxs)(`td`,{className:`max-w-[360px] px-3 py-3 text-muted-foreground`,children:[(0,_.jsxs)(`div`,{children:[e.resources.active??0,` active`,e.resources.types?` · ${e.resources.types}`:``]}),e.profileTopStack?(0,_.jsxs)(`div`,{className:`mt-1 truncate`,title:e.profileTopStack,children:[e.profileTopStackBytes===void 0?``:`${b(e.profileTopStackBytes)} · `,e.profileTopStack]}):null]})]},e.pid)}),(i.system?.processes?.length??0)===0?(0,_.jsx)(`tr`,{children:(0,_.jsx)(`td`,{className:`px-3 py-5 text-muted-foreground`,colSpan:6,children:`Waiting for heap flight-recorder samples…`})}):null]})]})})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(s,{className:`h-4 w-4 text-primary`}),`Codebase Index Server`]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:`Connection`,value:i.system?.codebaseIndexServer?.health?.status??i.system?.codebaseIndexServer?.status??`unknown`,subtitle:i.system?.codebaseIndexServer?.pid?`PID ${i.system.codebaseIndexServer.pid} · RTT ${i.system.codebaseIndexServer.health?.latencyMs??`—`}ms`:`No connected project server`,icon:p,color:i.system?.codebaseIndexServer?.health?.status===`healthy`?`text-success`:i.system?.codebaseIndexServer?.status===`unresponsive`||i.system?.codebaseIndexServer?.status===`error`?`text-destructive`:`text-warning`}),(0,_.jsx)(v,{title:`Index RAM (RSS)`,value:b(i.system?.codebaseIndexServer?.health?.server?.memory.rss??0),subtitle:`Heap ${b(i.system?.codebaseIndexServer?.health?.server?.memory.heapUsed??0)} / ${b(i.system?.codebaseIndexServer?.health?.server?.memory.heapTotal??0)}`,icon:a,color:`text-primary`}),(0,_.jsx)(v,{title:`Index Workload`,value:`${i.system?.codebaseIndexServer?.health?.server?.activeRequests??0} requests`,subtitle:`${i.system?.codebaseIndexServer?.health?.server?.activeWrites??0} writes · ${i.system?.codebaseIndexServer?.health?.server?.queuedWrites??0} queued`,icon:t,color:`text-primary`}),(0,_.jsx)(v,{title:`Index Watcher`,value:i.system?.codebaseIndexServer?.health?.server?.watchingExternal?`Active`:`Off`,subtitle:`${i.system?.codebaseIndexServer?.health?.server?.watchingClients??0} owners · ${i.system?.codebaseIndexServer?.health?.server?.pendingExternalFiles??0} pending`,icon:o,color:i.system?.codebaseIndexServer?.health?.server?.watchingExternal?`text-success`:`text-muted-foreground`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(p,{className:`h-4 w-4 text-primary`}),e(`activity:debug.rawData`)]}),(0,_.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,_.jsx)(`pre`,{className:`overflow-x-auto text-xs font-mono text-muted-foreground`,children:JSON.stringify({fileWatcher:i.fileWatcher,serverPid:i.system?.pid,serverMemory:i.system?.memoryUsage,serverHeapLimit:i.system?.heapLimit,serverUptime:i.system?.uptime,processes:i.system?.processes,codebaseIndexServer:i.system?.codebaseIndexServer},null,2)})})]})]})})}function b(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/t**r).toFixed(1)} ${n[r]}`}function x(e){return e===void 0?`—`:`${e>0?`+`:e<0?`−`:``}${b(Math.abs(e))}/h`}function S(e){return e<60?`${e.toFixed(0)}s`:e<3600?`${(e/60).toFixed(1)}m`:`${(e/3600).toFixed(1)}h`}export{y as DebugDashboard};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Bi as t,Jr as n,Sa as r,Sr as i,Vr as a,et as o,hi as s,ji as c,on as l,pa as u,qt as d,wa as f,ya as p,yt as m}from"./vendor-BTTkQ9Tn.js";import"./i18n-2wGPPdl_.js";import{c as h}from"./index-x6-rLl5H.js";var g=e(f(),1),_=o();function v({title:e,value:t,subtitle:n,icon:r,color:i=`text-primary`,trend:a}){let{t:o}=p();return(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,_.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium`,children:e}),(0,_.jsx)(`p`,{className:`mt-1 truncate text-xl font-semibold tabular-nums sm:text-2xl ${i}`,children:t}),n&&(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:n})]}),(0,_.jsx)(`div`,{className:`shrink-0 rounded-lg bg-muted/70 p-2 ${i}`,children:(0,_.jsx)(r,{className:`w-5 h-5`})})]}),a&&(0,_.jsxs)(`div`,{className:`mt-2 flex items-center gap-1`,children:[a===`up`&&(0,_.jsx)(m,{className:`w-3 h-3 text-success`}),a===`down`&&(0,_.jsx)(m,{className:`w-3 h-3 rotate-180 text-destructive`}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:o(a===`up`?`activity:debug.trendUp`:a===`down`?`activity:debug.trendDown`:`activity:debug.trendStable`)})]})]})}function y(){let{t:e}=p(),[o,f]=(0,g.useState)({fileWatcher:null,system:null,lastUpdated:null,error:null}),[y,C]=(0,g.useState)(!0),[w,T]=(0,g.useState)(2e3),E=(0,g.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch(`/debug/watcher-metrics`),fetch(`/debug/system`,{cache:`no-store`})]),n=null,r=e.headers.get(`content-type`)??``;if(e.ok&&r.includes(`application/json`)&&(n=await e.json()),!t.ok)throw Error(`System metrics request failed (${t.status})`);let i=await t.json();f({fileWatcher:n,system:i,lastUpdated:new Date,error:null})}catch(e){f(t=>({...t,error:e instanceof Error?e.message:r.t(`activity:debug.fetchFailed`)}))}finally{C(!1)}},[]);return(0,g.useEffect)(()=>{E();let e=setInterval(E,w);return()=>clearInterval(e)},[E,w]),(0,_.jsx)(`div`,{ref:h(`debug`),className:`h-full min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,_.jsxs)(`div`,{className:`mx-auto flex max-w-7xl flex-col gap-5`,children:[(0,_.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-semibold sm:text-xl`,children:[(0,_.jsx)(t,{className:`h-5 w-5 text-primary`}),e(`activity:debug.heading`)]}),(0,_.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e(`activity:debug.subtitle`)})]}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,_.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-sm`,children:[(0,_.jsx)(l,{className:`w-4 h-4 text-muted-foreground`}),(0,_.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e(`activity:debug.refreshLabel`)}),(0,_.jsxs)(`select`,{value:w,onChange:e=>T(Number(e.target.value)),className:`h-9 rounded-md border border-border/70 bg-background/70 px-2 text-sm`,children:[(0,_.jsx)(`option`,{value:1e3,children:`1s`}),(0,_.jsx)(`option`,{value:2e3,children:`2s`}),(0,_.jsx)(`option`,{value:5e3,children:`5s`}),(0,_.jsx)(`option`,{value:1e4,children:`10s`})]})]}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>{C(!0),E()},disabled:y,className:`inline-flex h-9 items-center justify-center gap-2 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 disabled:opacity-50`,children:[(0,_.jsx)(l,{className:`w-4 h-4 ${y?`animate-spin`:``}`}),e(`common:action.refresh`)]})]})]})}),o.lastUpdated&&(0,_.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border/60 bg-card/55 px-3 py-2 text-sm text-muted-foreground`,children:[(0,_.jsx)(s,{className:`w-4 h-4`}),e(`activity:debug.lastUpdated`,{time:o.lastUpdated.toLocaleTimeString()})]}),o.error&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-destructive/25 bg-destructive/10 p-4 text-destructive`,children:[(0,_.jsx)(c,{className:`w-5 h-5 flex-shrink-0`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`p`,{className:`font-medium`,children:e(`activity:debug.fetchFailed`)}),(0,_.jsx)(`p`,{className:`text-sm opacity-80`,children:o.error})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(n,{className:`h-4 w-4 text-primary`}),e(`activity:debug.fileWatcher`)]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:e(`activity:debug.watcherStatus`),value:o.fileWatcher?.watcherActive?e(`activity:debug.running`):e(`activity:debug.stopped`),icon:d,color:o.fileWatcher?.watcherActive?`text-success`:`text-destructive`}),(0,_.jsx)(v,{title:e(`activity:debug.activeProjects`),value:o.fileWatcher?.activeProjects??0,subtitle:e(`activity:debug.projectsWatched`),icon:a,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.fileChanges`),value:o.fileWatcher?.fileChangesDetected??0,subtitle:e(`activity:debug.totalDetected`),icon:u,color:`text-primary`,trend:`neutral`}),(0,_.jsx)(v,{title:e(`activity:debug.filesProcessed`),value:o.fileWatcher?.filesProcessed??0,subtitle:e(`activity:debug.afterHash`),icon:i,color:`text-success`})]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mt-4`,children:[(0,_.jsx)(v,{title:e(`activity:debug.broadcastsSent`),value:o.fileWatcher?.broadcastsSent??0,subtitle:e(`activity:debug.toClients`),icon:m,color:`text-success`}),(0,_.jsx)(v,{title:e(`activity:debug.debounceResets`),value:o.fileWatcher?.debounceResets??0,subtitle:e(`activity:debug.rapidWrites`),icon:l,color:`text-warning`}),(0,_.jsx)(v,{title:e(`activity:debug.avgDebounce`),value:`${(o.fileWatcher?.averageDebounceDelayMs??0).toFixed(1)}ms`,subtitle:e(`activity:debug.actualDelay`),icon:s,color:`text-warning`}),(0,_.jsx)(v,{title:e(`activity:debug.totalDelay`),value:`${(o.fileWatcher?.totalDebounceDelayMs??0).toFixed(0)}ms`,subtitle:e(`activity:debug.sumDelays`),icon:t,color:`text-primary`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(i,{className:`h-4 w-4 text-primary`}),`WebUI Server Process`]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:`Process RAM (RSS)`,value:b(o.system?.memoryUsage?.rss??0),subtitle:o.system?`PID ${o.system.pid}`:void 0,icon:d,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.heapUsed`),value:b(o.system?.memoryUsage?.heapUsed??0),subtitle:e(`activity:debug.jsHeap`),icon:t,color:`text-primary`}),(0,_.jsx)(v,{title:e(`activity:debug.heapTotal`),value:b(o.system?.memoryUsage?.heapTotal??0),subtitle:e(`activity:debug.totalHeap`),icon:t,color:`text-success`}),(0,_.jsx)(v,{title:`V8 Heap Limit`,value:b(o.system?.heapLimit??0),subtitle:`Configured old-space ceiling`,icon:i,color:`text-warning`}),(0,_.jsx)(v,{title:`Server Uptime`,value:S(o.system?.uptime??0),subtitle:`Since process start`,icon:s,color:`text-primary`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(u,{className:`h-4 w-4 text-primary`}),`Live WrongStack Processes`]}),(0,_.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-border/70 bg-card/75 shadow-sm`,children:(0,_.jsxs)(`table`,{className:`w-full min-w-[980px] text-left text-xs`,children:[(0,_.jsx)(`thead`,{className:`border-b border-border/70 bg-muted/35 text-muted-foreground`,children:(0,_.jsxs)(`tr`,{children:[(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Surface`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Memory`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Growth / signal`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Workload`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`HQ offline queue`}),(0,_.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Resources / hotspot`})]})}),(0,_.jsxs)(`tbody`,{children:[(o.system?.processes??[]).map(e=>{let t=[e.workload.messages===void 0?void 0:`${e.workload.messages} msgs`,e.workload.messageEstimatedTokens===void 0?void 0:`${e.workload.messageEstimatedTokens.toLocaleString()} ctx tokens`,e.workload.historyEntries===void 0?void 0:`${e.workload.historyMountedEntries??0}/${e.workload.historyEntries} history mounted`,e.workload.appRenders===void 0?void 0:`${e.workload.appRenders} renders`,e.workload.metricsDroppedObservations?`${e.workload.metricsDroppedObservations} metric drops`:void 0,e.workload.kanbanSyncActive?`kanban sync active`:void 0,e.workload.kanbanSyncPendingBoards?`${e.workload.kanbanSyncPendingBoards} kanban pending`:void 0,e.workload.kanbanSyncFullRescanPending?`kanban full rescan pending`:void 0,e.workload.kanbanSyncRemoteApplyQueued?`${e.workload.kanbanSyncPendingRemoteBoards??0} remote boards queued`:void 0,e.workload.kanbanSyncCoalescedRefreshes?`${e.workload.kanbanSyncCoalescedRefreshes} kanban coalesced`:void 0,e.workload.kanbanSupervisorSnapshots?`${e.workload.kanbanSupervisorSnapshots} supervised boards`:void 0,e.workload.kanbanSupervisorScheduledBoards?`${e.workload.kanbanSupervisorScheduledBoards} supervisor schedules`:void 0].filter(Boolean).join(` · `);return(0,_.jsxs)(`tr`,{className:`border-b border-border/50 align-top last:border-b-0`,children:[(0,_.jsxs)(`td`,{className:`px-3 py-3`,children:[(0,_.jsx)(`div`,{className:`font-medium text-foreground`,children:e.surface}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`PID `,e.pid]}),(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:new Date(e.ts).toLocaleTimeString()})]}),(0,_.jsxs)(`td`,{className:`px-3 py-3 tabular-nums`,children:[(0,_.jsxs)(`div`,{children:[`RSS `,b(e.memory.rss)]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`heap `,b(e.memory.heapUsed),e.memory.retainedHeapUsed===void 0?``:` · retained ${b(e.memory.retainedHeapUsed)}`]}),e.memory.nativeResidual===void 0?null:(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`native `,b(e.memory.nativeResidual)]}),e.memory.external===void 0?null:(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`external `,b(e.memory.external),e.memory.arrayBuffers===void 0?``:` · buffers ${b(e.memory.arrayBuffers)}`]})]}),(0,_.jsxs)(`td`,{className:`px-3 py-3 tabular-nums`,children:[(0,_.jsx)(`div`,{className:e.signal===`stable`?`text-success`:e.signal?`text-warning`:`text-muted-foreground`,children:e.signal??`sampling`}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`heap `,x(e.heapGrowthBytesPerHour)]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`RSS `,x(e.rssGrowthBytesPerHour)]})]}),(0,_.jsx)(`td`,{className:`px-3 py-3 text-muted-foreground`,children:t||`—`}),(0,_.jsx)(`td`,{className:`px-3 py-3 tabular-nums`,children:e.hqQueue?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{children:[e.hqQueue.entries,` frames ·`,` `,b(e.hqQueue.bytes),` /`,` `,b(e.hqQueue.maxBytes)]}),(0,_.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[e.hqQueue.coalescedFrames,` coalesced ·`,` `,e.hqQueue.droppedFrames,` dropped`]}),e.hqSnapshot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`snapshot`,` `,e.hqSnapshot.inFlight?`in-flight`:e.hqSnapshot.pending?`pending`:e.hqSnapshot.timerScheduled?`scheduled`:`idle`]}),(0,_.jsxs)(`div`,{className:`text-muted-foreground`,children:[`events`,` `,e.hqSnapshot.eventInFlight?`in-flight`:`idle`,` ·`,` `,e.hqSnapshot.pendingEvents,` pending ·`,` `,e.hqSnapshot.coalescedEvents,` coalesced ·`,` `,e.hqSnapshot.droppedEvents,` dropped`]})]}):null]}):(0,_.jsx)(`span`,{className:`text-muted-foreground`,children:`—`})}),(0,_.jsxs)(`td`,{className:`max-w-[360px] px-3 py-3 text-muted-foreground`,children:[(0,_.jsxs)(`div`,{children:[e.resources.active??0,` active`,e.resources.types?` · ${e.resources.types}`:``]}),e.profileTopStack?(0,_.jsxs)(`div`,{className:`mt-1 truncate`,title:e.profileTopStack,children:[e.profileTopStackBytes===void 0?``:`${b(e.profileTopStackBytes)} · `,e.profileTopStack]}):null]})]},e.pid)}),(o.system?.processes?.length??0)===0?(0,_.jsx)(`tr`,{children:(0,_.jsx)(`td`,{className:`px-3 py-5 text-muted-foreground`,colSpan:6,children:`Waiting for heap flight-recorder samples…`})}):null]})]})})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(d,{className:`h-4 w-4 text-primary`}),`Codebase Index Server`]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,_.jsx)(v,{title:`Connection`,value:o.system?.codebaseIndexServer?.health?.status??o.system?.codebaseIndexServer?.status??`unknown`,subtitle:o.system?.codebaseIndexServer?.pid?`PID ${o.system.codebaseIndexServer.pid} · RTT ${o.system.codebaseIndexServer.health?.latencyMs??`—`}ms`:`No connected project server`,icon:u,color:o.system?.codebaseIndexServer?.health?.status===`healthy`?`text-success`:o.system?.codebaseIndexServer?.status===`unresponsive`||o.system?.codebaseIndexServer?.status===`error`?`text-destructive`:`text-warning`}),(0,_.jsx)(v,{title:`Index RAM (RSS)`,value:b(o.system?.codebaseIndexServer?.health?.server?.memory.rss??0),subtitle:`Heap ${b(o.system?.codebaseIndexServer?.health?.server?.memory.heapUsed??0)} / ${b(o.system?.codebaseIndexServer?.health?.server?.memory.heapTotal??0)}`,icon:t,color:`text-primary`}),(0,_.jsx)(v,{title:`Index Workload`,value:`${o.system?.codebaseIndexServer?.health?.server?.activeRequests??0} requests`,subtitle:`${o.system?.codebaseIndexServer?.health?.server?.activeWrites??0} writes · ${o.system?.codebaseIndexServer?.health?.server?.queuedWrites??0} queued`,icon:i,color:`text-primary`}),(0,_.jsx)(v,{title:`Index Watcher`,value:o.system?.codebaseIndexServer?.health?.server?.watchingExternal?`Active`:`Off`,subtitle:`${o.system?.codebaseIndexServer?.health?.server?.watchingClients??0} owners · ${o.system?.codebaseIndexServer?.health?.server?.pendingExternalFiles??0} pending`,icon:n,color:o.system?.codebaseIndexServer?.health?.server?.watchingExternal?`text-success`:`text-muted-foreground`})]})]}),(0,_.jsxs)(`section`,{children:[(0,_.jsxs)(`h2`,{className:`mb-3 flex items-center gap-2 text-sm font-semibold text-muted-foreground`,children:[(0,_.jsx)(u,{className:`h-4 w-4 text-primary`}),e(`activity:debug.rawData`)]}),(0,_.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,_.jsx)(`pre`,{className:`overflow-x-auto text-xs font-mono text-muted-foreground`,children:JSON.stringify({fileWatcher:o.fileWatcher,serverPid:o.system?.pid,serverMemory:o.system?.memoryUsage,serverHeapLimit:o.system?.heapLimit,serverUptime:o.system?.uptime,processes:o.system?.processes,codebaseIndexServer:o.system?.codebaseIndexServer},null,2)})})]})]})})}function b(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/t**r).toFixed(1)} ${n[r]}`}function x(e){return e===void 0?`—`:`${e>0?`+`:e<0?`−`:``}${b(Math.abs(e))}/h`}function S(e){return e<60?`${e.toFixed(0)}s`:e<3600?`${(e/60).toFixed(1)}m`:`${(e/3600).toFixed(1)}h`}export{y as DebugDashboard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Sa as t,Tn as n,Ut as r,Zt as i,_a as a,at as o,ba as s,et as c,ni as l,zi as u}from"./vendor-2VBBgNb5.js";import"./i18n-1BkaqMgr.js";import{t as d}from"./useWebSocket-Dh3aAFDE.js";import{t as f}from"./utils-CN2sfDVP.js";import{o as p}from"./view-navigation-Cgy5xh9q.js";import{b as m}from"./index-BPfIz78e.js";var h=e(t(),1);function g(e,t,n){return e<t?t:e>n?n:e}function _(e){let t=/^oklch\(\s*([^)]+)\)$/i.exec(e.trim());if(!t?.[1])return null;let n=(t[1].split(`/`)[0]??``).trim().split(/\s+/);if(n.length<3||!n[0]||!n[1]||!n[2])return null;let r=n[0].endsWith(`%`)?Number.parseFloat(n[0])/100:Number.parseFloat(n[0]),i=n[1].endsWith(`%`)?Number.parseFloat(n[1])/100*.4:Number.parseFloat(n[1]),a=Number.parseFloat(n[2].replace(/deg$/i,``));return[r,i,a].every(Number.isFinite)?[g(r,0,1),Math.max(0,i),a]:null}function v(e){return g(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,0,1)}function y(e){return Math.round(e*255).toString(16).padStart(2,`0`)}function b(e){let t=_(e);if(!t)return null;let[n,r,i]=t,a=i*Math.PI/180,o=r*Math.cos(a),s=r*Math.sin(a),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return`#${y(v(m))}${y(v(h))}${y(v(g))}`}function x(e){let t=e.trim(),n=b(t);if(n)return n.toLowerCase();let r=/^#([0-9a-f]{6})([0-9a-f]{2})?$/i.exec(t);if(r?.[1])return`#${r[1].toLowerCase()}`;let i=/^#([0-9a-f]{3})$/i.exec(t);return i?.[1]?`#${i[1].split(``).map(e=>e+e).join(``).toLowerCase()}`:null}var S=c(),C=[`web`,`react-native`,`flutter`,`swiftui`,`compose`],w=[`primary`,`accent`,`bg`,`surface`,`fg`,`border`];function T(e,t,n){let r={...e};for(let[e,i]of Object.entries(t))e.startsWith(`light.`)?n===`light`&&(r[e.slice(6)]=i):e.startsWith(`dark.`)?n===`dark`&&(r[e.slice(5)]=i):r[e]=i;return r}function E({t:e,label:t}){let n=e.bg??`#fff`,r=e.surface??n,i=e.fg??`#111`,a=e.muted??i,o=e.primary??`#3b82f6`,s=e.accent??o,c=e.border??a,l=e[`radius-md`]??e.radius??`0.5rem`,u=e[`font-sans`]??e.fontSans??`system-ui, sans-serif`,d=e[`font-display`]??e.fontDisplay??u,f=e[`shadow-2`]??(e.shadow&&e.shadow!==`none`?e.shadow:void 0);return(0,S.jsxs)(`div`,{style:{background:n,color:i,fontFamily:u},className:`flex min-w-0 flex-col gap-2 overflow-hidden p-3`,children:[(0,S.jsx)(`div`,{className:`text-[9px] uppercase tracking-wide`,style:{color:a},children:t}),(0,S.jsxs)(`div`,{style:{background:r,border:`1px solid ${c}`,borderRadius:l,boxShadow:f},className:`flex min-w-0 flex-col gap-2 p-3`,children:[(0,S.jsx)(`div`,{style:{fontFamily:d},className:`text-base font-bold leading-tight`,children:`Aa Heading`}),(0,S.jsx)(`div`,{className:`text-[11px] leading-snug`,style:{color:a},children:`The quick brown fox jumps over the lazy dog.`}),(0,S.jsxs)(`div`,{className:`mt-1 flex min-w-0 items-center gap-1.5`,children:[(0,S.jsx)(`span`,{style:{background:o,color:n,borderRadius:l},className:`shrink-0 px-2.5 py-1 text-[10px] font-semibold`,children:`Primary`}),(0,S.jsx)(`span`,{style:{border:`1px solid ${c}`,color:i,borderRadius:l},className:`shrink-0 px-2 py-1 text-[10px]`,children:`Ghost`}),(0,S.jsx)(`span`,{style:{background:s,color:n,borderRadius:`999px`},className:`ml-auto shrink-0 px-2 py-0.5 text-[9px] font-semibold`,children:`Badge`})]}),(0,S.jsx)(`div`,{style:{border:`1px solid ${c}`,borderRadius:l,color:a},className:`text-[10px] px-2 py-1.5 mt-1`,children:`Input field…`})]})]})}function D({kit:e,overrides:t,onSet:n}){let[r,i]=(0,h.useState)(`light`),{t:o}=a(),s=T(r===`light`?e.light:e.dark,t,r);return(0,S.jsxs)(`div`,{className:`mt-1 rounded-lg border border-border/60 p-2 bg-muted/30`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,S.jsx)(`span`,{className:`text-[10px] font-semibold uppercase text-muted-foreground`,children:o(`activity:design.colors`)}),(0,S.jsx)(`div`,{className:`ml-auto inline-flex rounded border border-border/60 overflow-hidden`,children:[`light`,`dark`].map(e=>(0,S.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:f(`text-[10px] px-1.5 py-0.5`,r===e?`bg-primary text-primary-foreground`:`text-muted-foreground`),children:e},e))})]}),(0,S.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:w.filter(e=>s[e]).map(e=>{let t=x(s[e]??``)??`#000000`;return(0,S.jsxs)(`label`,{className:`flex min-w-[2rem] flex-col items-center gap-0.5`,title:`${e}: ${s[e]}`,children:[(0,S.jsx)(`input`,{type:`color`,value:t,onChange:t=>n(`${r}.${e}`,t.target.value),className:`w-6 h-6 rounded cursor-pointer bg-transparent border border-border/60 p-0`}),(0,S.jsx)(`span`,{className:`text-[8px] text-muted-foreground`,children:e})]},e)})})]})}function O({onTune:e}){let[t,n]=(0,h.useState)(``),r=({label:t,knob:n,values:r})=>(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-16 shrink-0 text-[9px] uppercase text-muted-foreground`,children:t}),(0,S.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:r.map(t=>(0,S.jsx)(`button`,{type:`button`,onClick:()=>e({[n]:t}),className:`rounded border border-border/60 px-1.5 py-0.5 text-[10px] hover:bg-primary hover:text-primary-foreground`,children:t},t))})]});return(0,S.jsxs)(`div`,{className:`mt-1 flex flex-col gap-1.5 rounded-lg border border-border/60 bg-muted/30 p-2`,children:[(0,S.jsx)(`span`,{className:`text-[10px] font-semibold uppercase text-muted-foreground`,children:`Tune`}),(0,S.jsx)(r,{label:`Radius`,knob:`radius`,values:[`none`,`sm`,`md`,`lg`,`xl`,`full`]}),(0,S.jsx)(r,{label:`Density`,knob:`density`,values:[`compact`,`cozy`,`comfortable`]}),(0,S.jsx)(r,{label:`Motion`,knob:`motion`,values:[`snappy`,`smooth`,`none`]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-16 shrink-0 text-[9px] uppercase text-muted-foreground`,children:`Font`}),(0,S.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),onKeyDown:n=>{n.key===`Enter`&&t.trim()&&e({font:t.trim()})},placeholder:`Space Grotesk…`,className:`h-6 min-w-0 flex-1 rounded border border-border/60 bg-background/70 px-1.5 text-[10px]`}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>t.trim()&&e({font:t.trim()}),className:`rounded border border-border/60 px-1.5 py-0.5 text-[10px] hover:bg-muted`,children:`Set`})]})]})}function k({className:e}){let{client:t}=d(),{t:c}=a(),[g,_]=(0,h.useState)([]),[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)({}),[w,k]=(0,h.useState)(`web`),[A,j]=(0,h.useState)(``),[M,N]=(0,h.useState)(null);(0,h.useEffect)(()=>{if(!t)return;let e=e=>{let t=e.payload;_(t?.kits??[]),y(t?.activeKit??null),x(t?.overrides??{})},n=e=>{let t=e.payload;t?.ok&&t.kit&&(y(t.kit),x(t.overrides??{}))},r=e=>{let t=e.payload;t?.ok&&t.overrides&&x(t.overrides)},i=e=>{let t=e.payload;t?.ok&&t.overrides?(x(t.overrides),N(`Tuned`)):t?.error&&N(`Tune failed: ${t.error}`)},a=e=>{let t=e.payload;t?.ok&&t.kit&&(y(t.kit),x(t.overrides??{}),N(`Swapped to ${t.kit}`))},o=e=>{let t=e.payload;N(t?.ok?s.t(`activity:design.wrote`,{path:t.path}):s.t(`activity:design.materializeFailed`,{error:t?.error??`error`}))},c=e=>{let t=e.payload;if(!t?.ok){N(s.t(`activity:design.verifyError`,{error:t?.error??`error`}));return}let n=Math.round((t.score??1)*100);N(t.violationCount?s.t(`activity:design.verifyOffPalette`,{pct:n,count:t.violationCount,files:t.filesScanned}):s.t(`activity:design.verifyClean`,{files:t.filesScanned}))};return t.on(`design.list`,e),t.on(`design.use`,n),t.on(`design.set`,r),t.on(`design.tune`,i),t.on(`design.swap`,a),t.on(`design.materialize`,o),t.on(`design.verify`,c),t.send({type:`design.list`}),()=>{t.off(`design.list`,e),t.off(`design.use`,n),t.off(`design.set`,r),t.off(`design.tune`,i),t.off(`design.swap`,a),t.off(`design.materialize`,o),t.off(`design.verify`,c)}},[t]);let P=(0,h.useCallback)(e=>t?.send({type:`design.use`,payload:{kit:e,stack:w}}),[t,w]),F=(0,h.useCallback)((e,n)=>{x(t=>({...t,[e]:n})),t?.send({type:`design.set`,payload:{overrides:{[e]:n}}})},[t]),I=(0,h.useCallback)(e=>t?.send({type:`design.tune`,payload:{tune:e}}),[t]),L=(0,h.useCallback)(()=>{N(s.t(`activity:design.writing`)),t?.send({type:`design.materialize`,payload:{stack:w}})},[t,w]),R=(0,h.useCallback)(()=>{N(s.t(`activity:design.scanning`)),t?.send({type:`design.verify`})},[t]),z=(0,h.useMemo)(()=>{let e=A.trim().toLowerCase();return[...e?g.filter(t=>t.id.includes(e)||t.name.toLowerCase().includes(e)||t.aesthetic.toLowerCase().includes(e)||t.tags.some(t=>t.includes(e))):g].sort((e,t)=>e.name.localeCompare(t.name))},[g,A]);return(0,S.jsxs)(`div`,{className:f(`flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-[hsl(var(--surface-2)/0.45)]`,e),children:[(0,S.jsx)(`div`,{className:`border-b border-border/60 p-3`,children:(0,S.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-3 shadow-sm`,children:(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,S.jsx)(n,{className:`h-4 w-4`})}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`h2`,{className:`truncate text-sm font-semibold`,children:c(`activity:design.heading`)}),(0,S.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c(`activity:design.kitsCount`,{count:z.length})})]})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center lg:justify-end`,children:[(0,S.jsxs)(`label`,{className:`relative min-w-0 flex-1 sm:max-w-xs`,children:[(0,S.jsx)(i,{className:`pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/70`}),(0,S.jsx)(`input`,{value:A,onChange:e=>j(e.target.value),placeholder:c(`activity:design.searchPlaceholder`),className:`h-9 w-full rounded-md border border-border/70 bg-background/70 pl-8 pr-3 text-sm shadow-sm outline-none transition focus:border-primary/40 focus:ring-2 focus:ring-ring/30`})]}),(0,S.jsx)(`select`,{value:w,onChange:e=>k(e.target.value),className:`h-9 rounded-md border border-border/70 bg-background/70 px-2 text-sm shadow-sm`,title:c(`activity:design.stackTitle`),children:C.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))}),M&&(0,S.jsx)(`span`,{className:`min-w-0 truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground sm:max-w-56`,children:M}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>p(`chat`),className:`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground`,title:c(`common:action.close`),children:(0,S.jsx)(o,{className:`h-4 w-4`})})]})]})})}),(0,S.jsx)(`div`,{ref:m(`design-gallery`),className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain p-3 sm:p-4`,children:z.length===0?(0,S.jsxs)(`div`,{className:`ws-surface mx-auto mt-8 flex max-w-md flex-col items-center gap-3 rounded-xl p-6 text-center text-muted-foreground`,children:[(0,S.jsx)(n,{className:`h-8 w-8 text-primary/60`}),(0,S.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:c(`activity:design.kitsCount`,{count:0})}),(0,S.jsx)(`p`,{className:`text-xs`,children:c(`activity:design.searchPlaceholder`)})]}):(0,S.jsx)(`div`,{className:`grid gap-4 [grid-template-columns:repeat(auto-fill,minmax(min(100%,20rem),1fr))]`,children:z.map(e=>{let t=v===e.id,n=t?b:{};return(0,S.jsxs)(`div`,{className:f(`flex min-w-0 flex-col overflow-hidden rounded-xl border bg-card/75 shadow-sm`,t?`border-primary/60 ring-1 ring-primary/30`:`border-border/70`),children:[(0,S.jsxs)(`div`,{className:`grid min-h-[12rem] grid-cols-1 sm:grid-cols-2`,children:[(0,S.jsx)(E,{t:T(e.light,n,`light`),label:c(`activity:designStudio.light`)}),(0,S.jsx)(E,{t:T(e.dark,n,`dark`),label:c(`activity:designStudio.dark`)})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2 border-t border-border/60 bg-card p-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`h3`,{className:`text-sm font-semibold truncate`,children:e.name}),(0,S.jsx)(`code`,{className:`text-[10px] text-muted-foreground`,children:e.id}),t&&(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 text-[9px] font-semibold uppercase text-primary ml-auto`,children:[(0,S.jsx)(u,{className:`w-3 h-3`}),` `,c(`activity:design.active`)]})]}),(0,S.jsx)(`p`,{className:`text-[11px] text-muted-foreground leading-snug`,children:e.aesthetic}),(0,S.jsxs)(`div`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>P(e.id),className:f(`rounded-md px-2.5 py-1 text-[11px] font-medium transition`,t?`bg-primary/10 text-primary`:`bg-primary text-primary-foreground hover:opacity-90`),children:c(t?`activity:design.reapply`:`activity:design.use`)}),t&&(0,S.jsxs)(`button`,{type:`button`,onClick:L,className:`inline-flex items-center gap-1 rounded-md border border-border/60 px-2 py-1 text-[11px] font-medium hover:bg-muted`,title:c(`activity:design.materializeTitle`,{stack:w}),children:[(0,S.jsx)(l,{className:`w-3 h-3`}),` `,c(`activity:design.materialize`)]}),t&&(0,S.jsxs)(`button`,{type:`button`,onClick:R,className:`inline-flex items-center gap-1 rounded-md border border-border/60 px-2 py-1 text-[11px] font-medium hover:bg-muted`,title:c(`activity:design.verifyTitle`),children:[(0,S.jsx)(r,{className:`w-3 h-3`}),` `,c(`activity:design.verify`)]}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[10px] text-muted-foreground`,children:e.bestFor})]}),t&&(0,S.jsx)(D,{kit:e,overrides:n,onSet:F}),t&&(0,S.jsx)(O,{onTune:I})]})]},e.id)})})})]})}export{k as DesignGalleryView};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Ri as t,Sa as n,Vt as r,Yt as i,et as a,nt as o,ti as s,wa as c,wn as l,ya as u}from"./vendor-BTTkQ9Tn.js";import"./i18n-2wGPPdl_.js";import{t as d}from"./useWebSocket-BVFPigcY.js";import{t as f}from"./utils-CwJvjOcH.js";import{o as p}from"./view-navigation-BMRzqGbq.js";import{c as m}from"./index-x6-rLl5H.js";var h=e(c(),1);function g(e,t,n){return e<t?t:e>n?n:e}function _(e){let t=/^oklch\(\s*([^)]+)\)$/i.exec(e.trim());if(!t?.[1])return null;let n=(t[1].split(`/`)[0]??``).trim().split(/\s+/);if(n.length<3||!n[0]||!n[1]||!n[2])return null;let r=n[0].endsWith(`%`)?Number.parseFloat(n[0])/100:Number.parseFloat(n[0]),i=n[1].endsWith(`%`)?Number.parseFloat(n[1])/100*.4:Number.parseFloat(n[1]),a=Number.parseFloat(n[2].replace(/deg$/i,``));return[r,i,a].every(Number.isFinite)?[g(r,0,1),Math.max(0,i),a]:null}function v(e){return g(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,0,1)}function y(e){return Math.round(e*255).toString(16).padStart(2,`0`)}function b(e){let t=_(e);if(!t)return null;let[n,r,i]=t,a=i*Math.PI/180,o=r*Math.cos(a),s=r*Math.sin(a),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return`#${y(v(m))}${y(v(h))}${y(v(g))}`}function x(e){let t=e.trim(),n=b(t);if(n)return n.toLowerCase();let r=/^#([0-9a-f]{6})([0-9a-f]{2})?$/i.exec(t);if(r?.[1])return`#${r[1].toLowerCase()}`;let i=/^#([0-9a-f]{3})$/i.exec(t);return i?.[1]?`#${i[1].split(``).map(e=>e+e).join(``).toLowerCase()}`:null}var S=a(),C=[`web`,`react-native`,`flutter`,`swiftui`,`compose`],w=[`primary`,`accent`,`bg`,`surface`,`fg`,`border`];function T(e,t,n){let r={...e};for(let[e,i]of Object.entries(t))e.startsWith(`light.`)?n===`light`&&(r[e.slice(6)]=i):e.startsWith(`dark.`)?n===`dark`&&(r[e.slice(5)]=i):r[e]=i;return r}function E({t:e,label:t}){let n=e.bg??`#fff`,r=e.surface??n,i=e.fg??`#111`,a=e.muted??i,o=e.primary??`#3b82f6`,s=e.accent??o,c=e.border??a,l=e[`radius-md`]??e.radius??`0.5rem`,u=e[`font-sans`]??e.fontSans??`system-ui, sans-serif`,d=e[`font-display`]??e.fontDisplay??u,f=e[`shadow-2`]??(e.shadow&&e.shadow!==`none`?e.shadow:void 0);return(0,S.jsxs)(`div`,{style:{background:n,color:i,fontFamily:u},className:`flex min-w-0 flex-col gap-2 overflow-hidden p-3`,children:[(0,S.jsx)(`div`,{className:`text-[9px] uppercase tracking-wide`,style:{color:a},children:t}),(0,S.jsxs)(`div`,{style:{background:r,border:`1px solid ${c}`,borderRadius:l,boxShadow:f},className:`flex min-w-0 flex-col gap-2 p-3`,children:[(0,S.jsx)(`div`,{style:{fontFamily:d},className:`text-base font-bold leading-tight`,children:`Aa Heading`}),(0,S.jsx)(`div`,{className:`text-[11px] leading-snug`,style:{color:a},children:`The quick brown fox jumps over the lazy dog.`}),(0,S.jsxs)(`div`,{className:`mt-1 flex min-w-0 items-center gap-1.5`,children:[(0,S.jsx)(`span`,{style:{background:o,color:n,borderRadius:l},className:`shrink-0 px-2.5 py-1 text-[10px] font-semibold`,children:`Primary`}),(0,S.jsx)(`span`,{style:{border:`1px solid ${c}`,color:i,borderRadius:l},className:`shrink-0 px-2 py-1 text-[10px]`,children:`Ghost`}),(0,S.jsx)(`span`,{style:{background:s,color:n,borderRadius:`999px`},className:`ml-auto shrink-0 px-2 py-0.5 text-[9px] font-semibold`,children:`Badge`})]}),(0,S.jsx)(`div`,{style:{border:`1px solid ${c}`,borderRadius:l,color:a},className:`text-[10px] px-2 py-1.5 mt-1`,children:`Input field…`})]})]})}function D({kit:e,overrides:t,onSet:n}){let[r,i]=(0,h.useState)(`light`),{t:a}=u(),o=T(r===`light`?e.light:e.dark,t,r);return(0,S.jsxs)(`div`,{className:`mt-1 rounded-lg border border-border/60 p-2 bg-muted/30`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,S.jsx)(`span`,{className:`text-[10px] font-semibold uppercase text-muted-foreground`,children:a(`activity:design.colors`)}),(0,S.jsx)(`div`,{className:`ml-auto inline-flex rounded border border-border/60 overflow-hidden`,children:[`light`,`dark`].map(e=>(0,S.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:f(`text-[10px] px-1.5 py-0.5`,r===e?`bg-primary text-primary-foreground`:`text-muted-foreground`),children:e},e))})]}),(0,S.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:w.filter(e=>o[e]).map(e=>{let t=x(o[e]??``)??`#000000`;return(0,S.jsxs)(`label`,{className:`flex min-w-[2rem] flex-col items-center gap-0.5`,title:`${e}: ${o[e]}`,children:[(0,S.jsx)(`input`,{type:`color`,value:t,onChange:t=>n(`${r}.${e}`,t.target.value),className:`w-6 h-6 rounded cursor-pointer bg-transparent border border-border/60 p-0`}),(0,S.jsx)(`span`,{className:`text-[8px] text-muted-foreground`,children:e})]},e)})})]})}function O({onTune:e}){let[t,n]=(0,h.useState)(``),r=({label:t,knob:n,values:r})=>(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-16 shrink-0 text-[9px] uppercase text-muted-foreground`,children:t}),(0,S.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:r.map(t=>(0,S.jsx)(`button`,{type:`button`,onClick:()=>e({[n]:t}),className:`rounded border border-border/60 px-1.5 py-0.5 text-[10px] hover:bg-primary hover:text-primary-foreground`,children:t},t))})]});return(0,S.jsxs)(`div`,{className:`mt-1 flex flex-col gap-1.5 rounded-lg border border-border/60 bg-muted/30 p-2`,children:[(0,S.jsx)(`span`,{className:`text-[10px] font-semibold uppercase text-muted-foreground`,children:`Tune`}),(0,S.jsx)(r,{label:`Radius`,knob:`radius`,values:[`none`,`sm`,`md`,`lg`,`xl`,`full`]}),(0,S.jsx)(r,{label:`Density`,knob:`density`,values:[`compact`,`cozy`,`comfortable`]}),(0,S.jsx)(r,{label:`Motion`,knob:`motion`,values:[`snappy`,`smooth`,`none`]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-16 shrink-0 text-[9px] uppercase text-muted-foreground`,children:`Font`}),(0,S.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),onKeyDown:n=>{n.key===`Enter`&&t.trim()&&e({font:t.trim()})},placeholder:`Space Grotesk…`,className:`h-6 min-w-0 flex-1 rounded border border-border/60 bg-background/70 px-1.5 text-[10px]`}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>t.trim()&&e({font:t.trim()}),className:`rounded border border-border/60 px-1.5 py-0.5 text-[10px] hover:bg-muted`,children:`Set`})]})]})}function k({className:e}){let{client:a}=d(),{t:c}=u(),[g,_]=(0,h.useState)([]),[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)({}),[w,k]=(0,h.useState)(`web`),[A,j]=(0,h.useState)(``),[M,N]=(0,h.useState)(null);(0,h.useEffect)(()=>{if(!a)return;let e=e=>{let t=e.payload;_(t?.kits??[]),y(t?.activeKit??null),x(t?.overrides??{})},t=e=>{let t=e.payload;t?.ok&&t.kit&&(y(t.kit),x(t.overrides??{}))},r=e=>{let t=e.payload;t?.ok&&t.overrides&&x(t.overrides)},i=e=>{let t=e.payload;t?.ok&&t.overrides?(x(t.overrides),N(`Tuned`)):t?.error&&N(`Tune failed: ${t.error}`)},o=e=>{let t=e.payload;t?.ok&&t.kit&&(y(t.kit),x(t.overrides??{}),N(`Swapped to ${t.kit}`))},s=e=>{let t=e.payload;N(t?.ok?n.t(`activity:design.wrote`,{path:t.path}):n.t(`activity:design.materializeFailed`,{error:t?.error??`error`}))},c=e=>{let t=e.payload;if(!t?.ok){N(n.t(`activity:design.verifyError`,{error:t?.error??`error`}));return}let r=Math.round((t.score??1)*100);N(t.violationCount?n.t(`activity:design.verifyOffPalette`,{pct:r,count:t.violationCount,files:t.filesScanned}):n.t(`activity:design.verifyClean`,{files:t.filesScanned}))};return a.on(`design.list`,e),a.on(`design.use`,t),a.on(`design.set`,r),a.on(`design.tune`,i),a.on(`design.swap`,o),a.on(`design.materialize`,s),a.on(`design.verify`,c),a.send({type:`design.list`}),()=>{a.off(`design.list`,e),a.off(`design.use`,t),a.off(`design.set`,r),a.off(`design.tune`,i),a.off(`design.swap`,o),a.off(`design.materialize`,s),a.off(`design.verify`,c)}},[a]);let P=(0,h.useCallback)(e=>a?.send({type:`design.use`,payload:{kit:e,stack:w}}),[a,w]),F=(0,h.useCallback)((e,t)=>{x(n=>({...n,[e]:t})),a?.send({type:`design.set`,payload:{overrides:{[e]:t}}})},[a]),I=(0,h.useCallback)(e=>a?.send({type:`design.tune`,payload:{tune:e}}),[a]),L=(0,h.useCallback)(()=>{N(n.t(`activity:design.writing`)),a?.send({type:`design.materialize`,payload:{stack:w}})},[a,w]),R=(0,h.useCallback)(()=>{N(n.t(`activity:design.scanning`)),a?.send({type:`design.verify`})},[a]),z=(0,h.useMemo)(()=>{let e=A.trim().toLowerCase();return[...e?g.filter(t=>t.id.includes(e)||t.name.toLowerCase().includes(e)||t.aesthetic.toLowerCase().includes(e)||t.tags.some(t=>t.includes(e))):g].sort((e,t)=>e.name.localeCompare(t.name))},[g,A]);return(0,S.jsxs)(`div`,{className:f(`flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-[hsl(var(--surface-2)/0.45)]`,e),children:[(0,S.jsx)(`div`,{className:`border-b border-border/60 p-3`,children:(0,S.jsx)(`div`,{className:`rounded-xl border border-border/70 bg-card/75 p-3 shadow-sm`,children:(0,S.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,S.jsx)(l,{className:`h-4 w-4`})}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`h2`,{className:`truncate text-sm font-semibold`,children:c(`activity:design.heading`)}),(0,S.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c(`activity:design.kitsCount`,{count:z.length})})]})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center lg:justify-end`,children:[(0,S.jsxs)(`label`,{className:`relative min-w-0 flex-1 sm:max-w-xs`,children:[(0,S.jsx)(i,{className:`pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/70`}),(0,S.jsx)(`input`,{value:A,onChange:e=>j(e.target.value),placeholder:c(`activity:design.searchPlaceholder`),className:`h-9 w-full rounded-md border border-border/70 bg-background/70 pl-8 pr-3 text-sm shadow-sm outline-none transition focus:border-primary/40 focus:ring-2 focus:ring-ring/30`})]}),(0,S.jsx)(`select`,{value:w,onChange:e=>k(e.target.value),className:`h-9 rounded-md border border-border/70 bg-background/70 px-2 text-sm shadow-sm`,title:c(`activity:design.stackTitle`),children:C.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))}),M&&(0,S.jsx)(`span`,{className:`min-w-0 truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground sm:max-w-56`,children:M}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>p(`chat`),className:`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground`,title:c(`common:action.close`),children:(0,S.jsx)(o,{className:`h-4 w-4`})})]})]})})}),(0,S.jsx)(`div`,{ref:m(`design-gallery`),className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain p-3 sm:p-4`,children:z.length===0?(0,S.jsxs)(`div`,{className:`ws-surface mx-auto mt-8 flex max-w-md flex-col items-center gap-3 rounded-xl p-6 text-center text-muted-foreground`,children:[(0,S.jsx)(l,{className:`h-8 w-8 text-primary/60`}),(0,S.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:c(`activity:design.kitsCount`,{count:0})}),(0,S.jsx)(`p`,{className:`text-xs`,children:c(`activity:design.searchPlaceholder`)})]}):(0,S.jsx)(`div`,{className:`grid gap-4 [grid-template-columns:repeat(auto-fill,minmax(min(100%,20rem),1fr))]`,children:z.map(e=>{let n=v===e.id,i=n?b:{};return(0,S.jsxs)(`div`,{className:f(`flex min-w-0 flex-col overflow-hidden rounded-xl border bg-card/75 shadow-sm`,n?`border-primary/60 ring-1 ring-primary/30`:`border-border/70`),children:[(0,S.jsxs)(`div`,{className:`grid min-h-[12rem] grid-cols-1 sm:grid-cols-2`,children:[(0,S.jsx)(E,{t:T(e.light,i,`light`),label:c(`activity:designStudio.light`)}),(0,S.jsx)(E,{t:T(e.dark,i,`dark`),label:c(`activity:designStudio.dark`)})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2 border-t border-border/60 bg-card p-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`h3`,{className:`text-sm font-semibold truncate`,children:e.name}),(0,S.jsx)(`code`,{className:`text-[10px] text-muted-foreground`,children:e.id}),n&&(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 text-[9px] font-semibold uppercase text-primary ml-auto`,children:[(0,S.jsx)(t,{className:`w-3 h-3`}),` `,c(`activity:design.active`)]})]}),(0,S.jsx)(`p`,{className:`text-[11px] text-muted-foreground leading-snug`,children:e.aesthetic}),(0,S.jsxs)(`div`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>P(e.id),className:f(`rounded-md px-2.5 py-1 text-[11px] font-medium transition`,n?`bg-primary/10 text-primary`:`bg-primary text-primary-foreground hover:opacity-90`),children:c(n?`activity:design.reapply`:`activity:design.use`)}),n&&(0,S.jsxs)(`button`,{type:`button`,onClick:L,className:`inline-flex items-center gap-1 rounded-md border border-border/60 px-2 py-1 text-[11px] font-medium hover:bg-muted`,title:c(`activity:design.materializeTitle`,{stack:w}),children:[(0,S.jsx)(s,{className:`w-3 h-3`}),` `,c(`activity:design.materialize`)]}),n&&(0,S.jsxs)(`button`,{type:`button`,onClick:R,className:`inline-flex items-center gap-1 rounded-md border border-border/60 px-2 py-1 text-[11px] font-medium hover:bg-muted`,title:c(`activity:design.verifyTitle`),children:[(0,S.jsx)(r,{className:`w-3 h-3`}),` `,c(`activity:design.verify`)]}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[10px] text-muted-foreground`,children:e.bestFor})]}),n&&(0,S.jsx)(D,{kit:e,overrides:i,onSet:F}),n&&(0,S.jsx)(O,{onTune:I})]})]},e.id)})})})]})}export{k as DesignGalleryView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./chat-store-B2CjP2Zl.js";import{$t as n,At as r,Gn as i,Sa as a,_n as o,bi as s,dn as c,et as l,fn as u,gt as d,hi as f,ki as p,nn as m,nt as h,pt as g,rn as _,rr as v,tt as y,ui as b,wa as x,xi as S,ya as C}from"./vendor-BTTkQ9Tn.js";import"./i18n-2wGPPdl_.js";import{t as w}from"./useWebSocket-BVFPigcY.js";import{t as T}from"./utils-CwJvjOcH.js";import{m as E,p as D,t as O}from"./stores-DyQOSkkD.js";import{o as k}from"./view-navigation-BMRzqGbq.js";import{t as A}from"./button-BMECp1cg.js";import{h as j,m as ee,p as te,y as M}from"./index-x6-rLl5H.js";var N=e(x(),1),P=l(),F={pending:{icon:(0,P.jsx)(s,{className:`w-4 h-4`}),color:`text-muted-foreground`,label:`Pending`},in_progress:{icon:(0,P.jsx)(f,{className:`w-4 h-4 animate-spin`}),color:`text-primary`,label:`In Progress`},blocked:{icon:(0,P.jsx)(o,{className:`w-4 h-4`}),color:`text-warning`,label:`Blocked`},failed:{icon:(0,P.jsx)(S,{className:`w-4 h-4`}),color:`text-destructive`,label:`Failed`},review:{icon:(0,P.jsx)(m,{className:`w-4 h-4`}),color:`text-info`,label:`Review`},completed:{icon:(0,P.jsx)(p,{className:`w-4 h-4`}),color:`text-success`,label:`Done`}},I={critical:`bg-destructive/15 text-destructive`,high:`bg-warning/15 text-warning`,medium:`bg-info/15 text-info`,low:`bg-muted text-muted-foreground`},L={feature:`bg-success/15 text-success`,bugfix:`bg-destructive/15 text-destructive`,refactor:`bg-primary/15 text-primary`,docs:`bg-info/15 text-info`,test:`bg-primary/15 text-primary`,chore:`bg-muted text-muted-foreground`};function R(e){if(!e)return``;let t=Math.floor(e/6e4);if(t<60)return`${t}m`;let n=Math.floor(t/60),r=t%60;return r>0?`${n}h ${r}m`:`${n}h`}function z({task:e,onStatusChange:t,onRetry:n,agents:r,onAssign:i,compact:a,className:o}){let{t:s}=C(),c=F[e.status],[l,u]=(0,N.useState)(!1),d=e.status===`in_progress`;return(0,P.jsxs)(`div`,{className:T(`w-full text-left rounded-lg border p-3 transition-all hover:shadow-sm`,d?`border-primary/40 bg-primary/5`:e.status===`completed`?`border-success/35 bg-success/6`:e.status===`failed`?`border-destructive/40 bg-destructive/5`:`border-border bg-card`,o),children:[(0,P.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,P.jsx)(`span`,{className:T(`mt-0.5`,c.color),role:`img`,"aria-label":d?s(`common:status.inProgress`):void 0,children:c.icon}),(0,P.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,P.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),(0,P.jsx)(`span`,{className:T(`px-1.5 py-0.5 rounded text-[10px] font-medium`,I[e.priority]),children:e.priority}),(0,P.jsx)(`span`,{className:T(`px-1.5 py-0.5 rounded text-[10px] font-medium`,L[e.type]),children:e.type})]}),e.description&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 line-clamp-2`,children:e.description})]})]}),e.assignee&&(0,P.jsxs)(`div`,{className:T(`mt-2 inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium`,d?`bg-primary/15 text-primary`:`bg-muted text-muted-foreground`),children:[d&&(0,P.jsx)(f,{className:`w-3 h-3 animate-spin`,"aria-label":s(`common:status.working`)}),(0,P.jsx)(`span`,{children:e.assignee})]}),(0,P.jsxs)(`div`,{className:`flex items-center gap-3 mt-2 text-xs text-muted-foreground`,children:[e.estimateHours?(0,P.jsxs)(`span`,{children:[`~`,e.estimateHours,`h`]}):null,e.actualHours?(0,P.jsxs)(`span`,{children:[`• `,e.actualHours,`h`]}):null,e.startedAt?(0,P.jsxs)(`span`,{children:[`• `,R(Date.now()-e.startedAt)]}):null]}),e.tags.length>0&&(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:e.tags.map(e=>(0,P.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-[10px] bg-muted text-muted-foreground`,children:e},e))}),!a&&(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 mt-2`,children:[t&&e.status!==`in_progress`&&e.status!==`completed`&&(0,P.jsx)(`button`,{type:`button`,onClick:()=>t(e.id,`in_progress`),className:`px-2 py-0.5 text-[10px] rounded bg-primary/15 text-primary hover:bg-primary/25 transition-colors`,children:s(`activity:task.start`)}),t&&e.status===`in_progress`&&(0,P.jsx)(`button`,{type:`button`,onClick:()=>t(e.id,`completed`),className:`px-2 py-0.5 text-[10px] rounded bg-success/15 text-success hover:bg-success/25 transition-colors`,children:s(`activity:task.complete`)}),n&&(e.status===`failed`||e.status===`completed`)&&(0,P.jsxs)(`button`,{type:`button`,onClick:()=>n(e.id),className:`px-2 py-0.5 text-[10px] rounded bg-muted text-muted-foreground hover:bg-muted/70 transition-colors inline-flex items-center gap-1`,children:[(0,P.jsx)(m,{className:`w-3 h-3`}),` `,s(`activity:task.retry`)]}),i&&r&&r.length>0&&(l?(0,P.jsxs)(`select`,{defaultValue:e.assignee??``,onChange:t=>{i(e.id,t.target.value),u(!1)},onBlur:()=>u(!1),className:`px-1 py-0.5 text-[10px] rounded border border-border bg-card`,children:[(0,P.jsx)(`option`,{value:``,children:s(`activity:task.unassigned`)}),r.map(e=>(0,P.jsx)(`option`,{value:e,children:e},e))]}):(0,P.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),className:`px-2 py-0.5 text-[10px] rounded bg-muted text-muted-foreground hover:bg-muted/70 transition-colors inline-flex items-center gap-1`,title:s(`activity:task.assignTitle`),children:[(0,P.jsx)(g,{className:`w-3 h-3`}),` `,s(`activity:task.assign`)]}))]})]})}var B=[{key:`pending`,label:`Pending`,match:[`pending`,`blocked`]},{key:`in_progress`,label:`In Progress`,match:[`in_progress`]},{key:`review`,label:`Review`,match:[`review`]},{key:`failed`,label:`Failed`,match:[`failed`]},{key:`completed`,label:`Done`,match:[`completed`]}],V={pending:`bg-muted text-muted-foreground`,ready:`bg-info/15 text-info`,running:`bg-primary/15 text-primary`,paused:`bg-warning/15 text-warning`,completed:`bg-success/15 text-success`,failed:`bg-destructive/15 text-destructive`,skipped:`bg-muted text-muted-foreground`};function ne(){let{client:e}=w(),{t}=C(),r=D(e=>e.phases),i=D(e=>e.multiBoard),[a,o]=(0,N.useState)(`phase`),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(0),p=Math.min(d,Math.max(0,r.length-1)),m=i?r[p]:void 0,h=(0,N.useMemo)(()=>r.flatMap(e=>(e.tasks??[]).map(t=>({...t,phaseId:e.id}))),[r]),g=(0,N.useMemo)(()=>[...new Set(h.map(e=>e.assignee).filter(e=>!!e))],[h]),_=(0,N.useCallback)(t=>e?.send?.(t),[e]),v=(0,N.useCallback)((e,t)=>_({type:`goal.taskStatus`,payload:{taskId:e,status:t}}),[_]),y=(0,N.useCallback)(e=>_({type:`goal.retryTask`,payload:{taskId:e}}),[_]),x=(0,N.useCallback)((e,t)=>_({type:`goal.assignTask`,payload:{taskId:e,agentName:t||void 0}}),[_]),S=(0,N.useCallback)(e=>{M({title:t(`activity:board.newTaskTitle`),placeholder:t(`activity:board.newTaskPlaceholder`),confirmLabel:t(`activity:board.addTask`)}).then(t=>{t&&_({type:`goal.addTask`,payload:{phaseId:e,title:t}})})},[_]),E=(0,N.useCallback)(e=>{s&&_({type:`goal.moveTask`,payload:{taskId:s,toPhaseId:e}}),c(null),u(null)},[s,_]),O=(0,N.useCallback)(e=>{s&&_({type:`goal.taskStatus`,payload:{taskId:s,status:e}}),c(null),u(null)},[s,_]),k={onStatusChange:v,onRetry:y,agents:g,onAssign:x};function A(e){return{draggable:!0,onDragStart:t=>{c(e),t.dataTransfer.effectAllowed=`move`},onDragEnd:()=>{c(null),u(null)}}}function j(e,t){return{onDragOver:t=>{t.preventDefault(),t.dataTransfer.dropEffect=`move`,l!==e&&u(e)},onDragLeave:()=>u(t=>t===e?null:t),onDrop:e=>{e.preventDefault(),t()},"data-hover":l===e||void 0}}return r.length===0?(0,P.jsx)(`div`,{className:`flex h-full min-h-0 min-w-0 items-center justify-center text-muted-foreground`,children:(0,P.jsx)(`p`,{className:`text-sm`,children:t(`activity:board.empty`)})}):(0,P.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-4 py-2`,children:[(0,P.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`activity:board.summary`,{phases:r.length,tasks:h.length})}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:[(0,P.jsxs)(`button`,{type:`button`,onClick:()=>o(`phase`),className:T(`inline-flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors`,a===`phase`?`bg-primary/15 text-primary`:`text-muted-foreground hover:text-foreground`),children:[(0,P.jsx)(b,{className:`h-3.5 w-3.5`}),` `,t(`activity:board.phases`)]}),(0,P.jsxs)(`button`,{type:`button`,onClick:()=>o(`status`),className:T(`inline-flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors`,a===`status`?`bg-primary/15 text-primary`:`text-muted-foreground hover:text-foreground`),children:[(0,P.jsx)(n,{className:`h-3.5 w-3.5`}),` `,t(`activity:board.statusTab`)]})]})]}),i&&m?(0,P.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,P.jsx)(`div`,{className:`flex shrink-0 gap-1 overflow-x-auto border-b border-border px-3 py-1.5`,children:r.map((e,t)=>(0,P.jsxs)(`button`,{type:`button`,onClick:()=>f(t),className:T(`shrink-0 rounded-t px-3 py-1.5 text-xs font-medium transition-colors`,t===p?`border-primary/40 bg-primary/10 text-primary`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,P.jsx)(`span`,{className:`truncate`,children:e.name}),(0,P.jsxs)(`span`,{className:`ml-1.5 text-[10px] text-muted-foreground`,children:[e.completedTasks,`/`,e.taskCount]})]},e.id))}),(0,P.jsx)(W,{phase:m,allTasks:h,layout:a,dragId:s,hoverKey:l,callbacks:k,draggable:A,dropZone:j,dropToPhase:E,dropToStatus:O,onAddTask:S})]}):(0,P.jsx)(U,{phases:r,allTasks:h,layout:a,dragId:s,hoverKey:l,callbacks:k,draggable:A,dropZone:j,dropToPhase:E,dropToStatus:O,onAddTask:S})]})}function H({phase:e,phaseTasks:t,callbacks:n,draggable:r,dropZone:i,dropToPhase:a,onAddTask:o,dragId:s,hoverKey:l}){let{t:u}=C();return(0,P.jsxs)(`div`,{...i(`phase:${e.id}`,()=>a(e.id)),className:T(`flex min-h-0 w-80 shrink-0 flex-col rounded-lg border bg-muted/30 transition-colors`,l===`phase:${e.id}`?`border-primary/60 bg-primary/5`:`border-border`),children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-2`,children:[(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,P.jsx)(`span`,{className:T(`rounded px-1.5 py-0.5 text-[10px] font-medium capitalize`,V[e.status]),children:e.status})]}),(0,P.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[e.completedTasks,`/`,e.taskCount,` · `,e.progressPercent,`%`]})]}),(0,P.jsx)(`button`,{type:`button`,onClick:()=>o(e.id),title:u(`activity:board.addTask`),className:`rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground`,children:(0,P.jsx)(c,{className:`h-4 w-4`})})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto overscroll-contain p-2`,children:t.length===0?(0,P.jsx)(`p`,{className:`px-1 py-4 text-center text-[11px] text-muted-foreground`,children:u(`activity:board.dropHere`)}):t.map(e=>(0,P.jsx)(`div`,{...r(e.id),className:T(s===e.id&&`opacity-50`),children:(0,P.jsx)(z,{task:e,...n})},e.id))})]})}function U({phases:e,allTasks:t,layout:n,dragId:r,hoverKey:i,callbacks:a,draggable:o,dropZone:s,dropToPhase:c,dropToStatus:l,onAddTask:u}){return(0,P.jsx)(P.Fragment,{children:n===`phase`?(0,P.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 gap-3 overflow-x-auto p-3`,children:e.map(e=>(0,P.jsx)(H,{phase:e,phaseTasks:t.filter(t=>t.phaseId===e.id),callbacks:a,draggable:o,dropZone:s,dropToPhase:c,onAddTask:u,dragId:r,hoverKey:i},e.id))}):(0,P.jsx)(G,{phases:e,allTasks:t,dragId:r,hoverKey:i,callbacks:a,draggable:o,dropZone:s,dropToStatus:l})})}function W({phase:e,allTasks:t,layout:n,dragId:r,hoverKey:i,callbacks:a,draggable:o,dropZone:s,dropToPhase:c,dropToStatus:l,onAddTask:u}){let d=t.filter(t=>t.phaseId===e.id),{t:f}=C();return n===`phase`?(0,P.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 gap-3 overflow-x-auto p-3`,children:(0,P.jsx)(H,{phase:e,phaseTasks:d,callbacks:a,draggable:o,dropZone:s,dropToPhase:c,onAddTask:u,dragId:r,hoverKey:i})}):(0,P.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain p-3`,children:(0,P.jsxs)(`div`,{className:`grid min-w-[900px] gap-2`,style:{gridTemplateColumns:`9rem repeat(${B.length}, minmax(0, 1fr))`},children:[(0,P.jsx)(`div`,{}),B.map(e=>(0,P.jsx)(`div`,{className:`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:f(`activity:board.status.${e.key}`)},e.key)),(0,P.jsxs)(K,{children:[(0,P.jsx)(`div`,{className:`flex items-center pr-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.name}),(0,P.jsx)(`span`,{className:T(`mt-0.5 inline-block rounded px-1.5 py-0.5 text-[10px] capitalize`,V[e.status]),children:e.status})]})}),B.map(t=>{let n=d.filter(e=>t.match.includes(e.status)),c=`cell:${e.id}:${t.key}`;return(0,P.jsx)(`div`,{...s(c,()=>l(t.key)),className:T(`min-h-[4rem] space-y-2 rounded-md border p-1.5 transition-colors`,i===c?`border-primary/60 bg-primary/5`:`border-border bg-muted/20`),children:n.map(e=>(0,P.jsx)(`div`,{...o(e.id),className:T(r===e.id&&`opacity-50`),children:(0,P.jsx)(z,{task:e,compact:!0,...a})},e.id))},t.key)})]},e.id)]})})}function G({phases:e,allTasks:t,dragId:n,hoverKey:r,callbacks:i,draggable:a,dropZone:o,dropToStatus:s}){let{t:c}=C();return(0,P.jsxs)(`div`,{className:`grid min-w-[900px] gap-2`,style:{gridTemplateColumns:`9rem repeat(${B.length}, minmax(0, 1fr))`},children:[(0,P.jsx)(`div`,{}),B.map(e=>(0,P.jsx)(`div`,{className:`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:c(`activity:board.status.${e.key}`)},e.key)),e.map(e=>(0,P.jsxs)(K,{children:[(0,P.jsx)(`div`,{className:`flex items-center pr-2`,children:(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.name}),(0,P.jsx)(`span`,{className:T(`mt-0.5 inline-block rounded px-1.5 py-0.5 text-[10px] capitalize`,V[e.status]),children:e.status})]})}),B.map(c=>{let l=t.filter(t=>t.phaseId===e.id&&c.match.includes(t.status)),u=`cell:${e.id}:${c.key}`;return(0,P.jsx)(`div`,{...o(u,()=>s(c.key)),className:T(`min-h-[4rem] space-y-2 rounded-md border p-1.5 transition-colors`,r===u?`border-primary/60 bg-primary/5`:`border-border bg-muted/20`),children:l.map(e=>(0,P.jsx)(`div`,{...a(e.id),className:T(n===e.id&&`opacity-50`),children:(0,P.jsx)(z,{task:e,compact:!0,...i})},e.id))},c.key)})]},e.id))]})}function K({children:e}){return(0,P.jsx)(P.Fragment,{children:e})}function q({onClose:e}){let{client:n}=w(),{t:s}=C(),l=D(e=>e.phases),f=D(e=>e.overallPercent),p=D(e=>e.autonomous),m=D(e=>e.title),g=D(e=>e.goal),b=D(e=>e.status),x=D(e=>e.lastError),S=D(e=>e.graphs);(0,N.useEffect)(()=>{n?.send?.({type:`goal.list`}),n?.send?.({type:`goal.state`})},[n]);let M=O(e=>e.worktrees),F=O(e=>e.baseBranch),[I,L]=(0,N.useState)(``),[R,z]=(0,N.useState)(null),[B,V]=(0,N.useState)(!1),[H,U]=(0,N.useState)(!0),[W,G]=(0,N.useState)(!1),[K,q]=(0,N.useState)(!1),[J,re]=(0,N.useState)(!1),Y=E(e=>e.result),X=E(e=>e.loading),Z=(0,N.useRef)(null);(0,N.useEffect)(()=>{if(Z.current&&clearTimeout(Z.current),!I.trim()){E.getState().clear();return}return Z.current=setTimeout(()=>{E.getState().setLoading();let e=E.getState().nextSeq();n?.send?.({type:`goal.assess`,payload:{goal:I,seq:e}})},800),()=>{Z.current&&clearTimeout(Z.current)}},[I,n]),(0,N.useEffect)(()=>{!I.trim()&&!R&&E.getState().clear()},[I,R]);let Q=l.length>0,ie=R!=null&&!Q;(0,N.useEffect)(()=>{Q&&z(null)},[Q]);let ae=(0,N.useCallback)(()=>{let e=I.trim();if(!e||R!=null)return;let r=t.getState();r.addMessage({role:`user`,content:e}),r.addMessage({role:`assistant`,content:a.t(`activity:goalRun.planningAck`)}),z(e),L(``),n?.send?.({type:`goal.start`,payload:{title:e,autonomous:!0,worktrees:H,multiBoard:W,verifyTasks:K,chimeraReview:J}}),k(`chat`)},[I,R,n,H]),oe=(0,N.useCallback)(()=>{n?.send?.({type:`goal.stop`,payload:{}}),z(null)},[n]),se=(0,N.useCallback)(()=>{n?.send?.({type:`goal.toggleAutonomous`,payload:{}})},[n]),ce=(0,N.useCallback)(()=>{n?.send?.(b===`paused`?{type:`goal.resume`,payload:{}}:{type:`goal.pause`,payload:{}})},[n,b]),le=(0,N.useCallback)(()=>{n?.send?.({type:`goal.stop`,payload:{}})},[n]),ue=(0,N.useCallback)(()=>{n?.send?.({type:`goal.clear`,payload:{}}),D.getState().clear(),z(null),L(``)},[n]),[de,$]=(0,N.useState)(!1),fe=(0,N.useCallback)(()=>{n?.send?.({type:`goal.revert`,payload:{}}),$(!1)},[n]),pe=b===`running`||b===`paused`,me=b===`stopped`||b===`completed`||b===`failed`,he=(0,N.useCallback)(e=>{e&&n?.send?.({type:`goal.load`,payload:{graphId:e}})},[n]);return(0,P.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,P.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-2 border-b bg-card px-4 py-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,P.jsx)(v,{className:`h-5 w-5 text-muted-foreground`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h1`,{className:`text-lg font-semibold`,children:Q&&m||`Goal`}),Q&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s(`activity:goalRun.summary`,{count:l.length,pct:f})})]}),Q&&(0,P.jsx)(`span`,{className:T(`rounded border px-2 py-0.5 text-[11px] font-medium capitalize`,b===`failed`?`border-destructive/40 bg-destructive/10 text-destructive`:b===`paused`||b===`stopped`?`border-warning/40 bg-warning/10 text-warning`:b===`completed`?`border-success/40 bg-success/10 text-success`:`border-primary/30 bg-primary/10 text-primary`),title:x??void 0,children:b})]}),(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2 sm:justify-end`,children:[S.length>0&&(0,P.jsxs)(`select`,{value:Q?S.find(e=>e.title===m)?.id??``:``,onChange:e=>he(e.target.value),title:s(`activity:goalRun.switchBoard`),className:`min-w-0 flex-1 rounded border border-border bg-card px-2 py-1 text-xs text-foreground sm:w-72 sm:flex-none`,children:[(0,P.jsx)(`option`,{value:``,disabled:!0,children:s(`activity:goalRun.boardsCount`,{count:S.length})}),S.map(e=>(0,P.jsxs)(`option`,{value:e.id,children:[e.title,` · `,e.status]},e.id))]}),Q&&(0,P.jsxs)(`button`,{type:`button`,onClick:se,title:s(`activity:goalRun.toggleAutonomousTitle`),className:T(`inline-flex items-center gap-1 rounded border px-2 py-1 text-xs transition-colors`,p?`border-primary/30 bg-primary/10 text-primary`:`border-border text-muted-foreground hover:text-foreground`),children:[(0,P.jsx)(y,{className:`h-3.5 w-3.5`}),` `,s(p?`activity:goalRun.autonomous`:`activity:goalRun.manual`)]}),pe&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`button`,{type:`button`,onClick:ce,title:s(b===`paused`?`activity:goalRun.resumeTitle`:`activity:goalRun.pauseTitle`),className:`inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground`,children:[b===`paused`?(0,P.jsx)(u,{className:`h-3.5 w-3.5`}):(0,P.jsx)(o,{className:`h-3.5 w-3.5`}),s(b===`paused`?`activity:goalRun.resume`:`activity:goalRun.pause`)]}),(0,P.jsxs)(`button`,{type:`button`,onClick:le,title:s(`activity:goalRun.stopTitle`),className:`inline-flex items-center gap-1 rounded border border-destructive/40 bg-destructive/10 px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/20`,children:[(0,P.jsx)(r,{className:`h-3.5 w-3.5 fill-current`}),` `,s(`activity:goalRun.stop`)]})]}),Q&&me&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`button`,{type:`button`,onClick:ue,title:s(`activity:goalRun.newTitle`),className:`inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-2 py-1 text-xs font-medium text-primary transition-colors hover:bg-primary/20`,children:[(0,P.jsx)(c,{className:`h-3.5 w-3.5`}),` `,s(`activity:goalRun.newLabel`)]}),de?(0,P.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded border border-warning/40 bg-warning/10 px-1.5 py-0.5 text-xs`,children:[(0,P.jsx)(`span`,{className:`text-warning`,children:s(`activity:goalRun.revertConfirm`)}),(0,P.jsx)(`button`,{type:`button`,onClick:fe,className:`rounded bg-destructive/15 px-1.5 py-0.5 font-medium text-destructive hover:bg-destructive/25`,children:s(`common:action.yes`)}),(0,P.jsx)(`button`,{type:`button`,onClick:()=>$(!1),className:`rounded px-1.5 py-0.5 text-muted-foreground hover:text-foreground`,children:s(`common:action.no`)})]}):(0,P.jsxs)(`button`,{type:`button`,onClick:()=>$(!0),title:s(`activity:goalRun.revertTitle`),className:`inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground`,children:[(0,P.jsx)(d,{className:`h-3.5 w-3.5`}),` `,s(`activity:goalRun.revert`)]})]}),(0,P.jsx)(A,{variant:`ghost`,size:`icon`,onClick:e,children:(0,P.jsx)(h,{className:`h-4 w-4`})})]})]}),Q&&g&&(0,P.jsxs)(`div`,{className:`shrink-0 border-b border-border/60 bg-muted/20 px-4 py-2.5`,children:[(0,P.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[(0,P.jsx)(_,{className:`h-3 w-3`}),` `,s(`activity:goalRun.goal`)]}),(0,P.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-foreground/90`,children:g})]}),Q?(0,P.jsx)(`div`,{className:`flex min-h-0 flex-1`,children:(0,P.jsx)(ne,{})}):ie?(0,P.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,P.jsxs)(`div`,{className:`max-w-lg w-full space-y-5 text-center`,children:[(0,P.jsx)(i,{className:`h-10 w-10 mx-auto animate-spin text-primary/70`}),(0,P.jsxs)(`div`,{className:`space-y-1`,children:[(0,P.jsx)(`h2`,{className:`text-xl font-semibold`,children:s(`activity:goalRun.planning`)}),(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`activity:goalRun.planningBody`)})]}),(0,P.jsxs)(`div`,{className:`rounded-lg border border-border bg-card px-4 py-3 text-left`,children:[(0,P.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[(0,P.jsx)(_,{className:`h-3 w-3`}),` `,s(`activity:goalRun.goal`)]}),(0,P.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-foreground/90`,children:R})]}),(0,P.jsxs)(A,{variant:`outline`,onClick:oe,className:`gap-2`,children:[(0,P.jsx)(r,{className:`h-4 w-4 fill-current`}),` `,s(`common:action.cancel`)]})]})}):(0,P.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,P.jsxs)(`div`,{className:`max-w-lg w-full space-y-6`,children:[(0,P.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,P.jsx)(_,{className:`h-10 w-10 mx-auto text-primary/60`}),(0,P.jsx)(`h2`,{className:`text-xl font-semibold`,children:s(`activity:goalRun.startHeading`)}),(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`activity:goalRun.startBody`)})]}),(0,P.jsx)(`textarea`,{value:I,onChange:e=>L(e.target.value),placeholder:s(`activity:goalRun.startPlaceholder`),rows:5,className:`w-full rounded-lg border border-border bg-card px-4 py-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary/30 placeholder:text-muted-foreground/70`,onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),ae())}}),X&&(0,P.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,P.jsx)(i,{className:`h-3 w-3 animate-spin`}),s(`activity:goalRun.assess.analyzing`)]}),!X&&Y&&!Y.parseFailed&&(0,P.jsxs)(`div`,{className:T(`rounded-lg border px-3 py-2 text-xs space-y-1.5`,Y.realistic?`border-success/40 bg-success/10`:`border-warning/40 bg-warning/10`),children:[(0,P.jsx)(`div`,{className:`flex items-center gap-1.5 font-medium`,children:Y.realistic?(0,P.jsx)(`span`,{className:`text-success`,children:s(`activity:goalRun.assess.realistic`)}):(0,P.jsx)(`span`,{className:`text-warning`,children:s(`activity:goalRun.assess.durationConcern`)})}),Y.durationClaimed&&(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:s(`activity:goalRun.assess.durationClaimed`,{duration:Y.durationClaimed})}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:Y.explanation}),Y.recommendedDuration&&(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:s(`activity:goalRun.assess.recommendation`,{duration:Y.recommendedDuration})}),Y.concerns.length>0&&(0,P.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,P.jsx)(`p`,{className:`font-medium text-foreground/80`,children:s(`activity:goalRun.assess.concerns`)}),(0,P.jsx)(`ul`,{className:`list-disc pl-4 space-y-0.5 text-muted-foreground`,children:Y.concerns.map((e,t)=>(0,P.jsx)(`li`,{children:e},t))})]})]}),!X&&Y?.parseFailed&&(0,P.jsx)(`div`,{className:`rounded-lg border border-border/40 bg-muted/20 px-3 py-2 text-xs text-muted-foreground`,children:s(`activity:goalRun.assess.analysisFailed`)}),(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center justify-center gap-2 text-xs text-muted-foreground`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:H,onChange:e=>U(e.target.checked),className:`h-3.5 w-3.5 accent-primary`}),s(`activity:goalRun.isolateLabel`)]}),(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-3 text-xs text-muted-foreground`,children:[(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:W,onChange:e=>G(e.target.checked),className:`h-3.5 w-3.5 accent-primary`}),s(`activity:goalRun.multiBoardLabel`)]}),(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:K,onChange:e=>q(e.target.checked),className:`h-3.5 w-3.5 accent-primary`}),s(`activity:goalRun.verifyTasksLabel`)]}),(0,P.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:J,onChange:e=>re(e.target.checked),className:`h-3.5 w-3.5 accent-primary`}),s(`activity:goalRun.chimeraReviewLabel`)]})]}),(0,P.jsxs)(`div`,{className:`flex items-center gap-3`,children:[!X&&Y&&!Y.realistic&&!Y.parseFailed&&(0,P.jsx)(`button`,{type:`button`,onClick:()=>E.getState().clear(),className:`shrink-0 rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,title:s(`activity:goalRun.assess.overrideTitle`),children:s(`activity:goalRun.assess.override`)}),(0,P.jsxs)(A,{onClick:ae,disabled:!I.trim()||R!=null||X||!X&&Y!=null&&!Y.parseFailed&&!Y.realistic,className:`flex-1 gap-2`,title:I.trim()&&!X&&Y&&!Y.parseFailed&&!Y.realistic?s(`activity:goalRun.assess.disableTitle`):``,children:[(0,P.jsx)(u,{className:`h-4 w-4`}),s(`activity:goalRun.startButton`)]})]}),(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground text-center`,children:[s(`activity:goalRun.ctrlHint`),` ·`,` `,s(H?`activity:goalRun.isolateOn`:`activity:goalRun.isolateOff`)]})]})}),M.length>0&&(0,P.jsxs)(`div`,{className:`border-t bg-card/50 shrink-0`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-4 pt-2 text-xs`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:()=>V(!1),className:T(`rounded px-2 py-0.5 border transition-colors`,B?`border-border text-muted-foreground hover:text-foreground`:`bg-primary/10 border-primary/30 text-primary`),children:s(`activity:goalRun.lanes`)}),(0,P.jsx)(`button`,{type:`button`,onClick:()=>V(!0),className:T(`rounded px-2 py-0.5 border transition-colors`,B?`bg-primary/10 border-primary/30 text-primary`:`border-border text-muted-foreground hover:text-foreground`),children:s(`activity:goalRun.graph`)})]}),(0,P.jsxs)(`div`,{className:`space-y-2 px-4 pb-3`,children:[(0,P.jsx)(te,{}),B?(0,P.jsx)(j,{worktrees:M,baseBranch:F}):(0,P.jsx)(ee,{worktrees:M,baseBranch:F})]})]})]})}export{q as GoalView};
|