@deepseek-harness-tui/dsh-tui 0.8.8 → 0.9.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/README.md +60 -238
- package/bin/dsh-tui.js +172 -5
- package/cordis.patch.yml +16 -4
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/cc/hyperlink.d.ts +7 -1
- package/lib/types/cc/hyperlink.d.ts.map +1 -1
- package/lib/types/cc/hyperlink.js +3 -2
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +33 -3
- package/lib/types/cc/sessionColors.d.ts +27 -0
- package/lib/types/cc/sessionColors.d.ts.map +1 -0
- package/lib/types/cc/sessionColors.js +39 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +10 -2
- package/lib/types/components/ActivityPicker.d.ts +4 -1
- package/lib/types/components/ActivityPicker.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.js +2 -2
- package/lib/types/components/AutoRecapRow.d.ts +23 -0
- package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
- package/lib/types/components/AutoRecapRow.js +23 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +1 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts +2 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +11 -3
- package/lib/types/components/ColorPicker.d.ts +17 -0
- package/lib/types/components/ColorPicker.d.ts.map +1 -0
- package/lib/types/components/ColorPicker.js +20 -0
- package/lib/types/components/CommandSuggestions.d.ts +23 -4
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +41 -14
- package/lib/types/components/ContextBarView.d.ts +33 -0
- package/lib/types/components/ContextBarView.d.ts.map +1 -0
- package/lib/types/components/ContextBarView.js +46 -0
- package/lib/types/components/EffortInputBorder.d.ts +12 -1
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +22 -5
- package/lib/types/components/EffortSlider.d.ts +4 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +4 -2
- package/lib/types/components/ExtensionDialog.js +6 -2
- package/lib/types/components/FileActionsPanel.d.ts +22 -0
- package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
- package/lib/types/components/FileActionsPanel.js +28 -0
- package/lib/types/components/FileSuggestions.d.ts +26 -7
- package/lib/types/components/FileSuggestions.d.ts.map +1 -1
- package/lib/types/components/FileSuggestions.js +39 -12
- package/lib/types/components/GoalTodoPanel.d.ts +26 -2
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +86 -17
- package/lib/types/components/HelpMenu.d.ts +7 -1
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +12 -4
- package/lib/types/components/HistorySearchDialog.d.ts +4 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +2 -2
- package/lib/types/components/LangPicker.d.ts +14 -0
- package/lib/types/components/LangPicker.d.ts.map +1 -0
- package/lib/types/components/LangPicker.js +17 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +3 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +12 -3
- package/lib/types/components/MessageList.d.ts +45 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +560 -41
- package/lib/types/components/ModelPicker.d.ts +27 -2
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +26 -6
- package/lib/types/components/PermissionsPicker.d.ts +21 -0
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
- package/lib/types/components/PermissionsPicker.js +27 -0
- package/lib/types/components/PlanPicker.d.ts +15 -0
- package/lib/types/components/PlanPicker.d.ts.map +1 -0
- package/lib/types/components/PlanPicker.js +18 -0
- package/lib/types/components/PresetPicker.d.ts +4 -1
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +2 -2
- package/lib/types/components/PromptInput.d.ts +4 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +602 -75
- package/lib/types/components/RecapPanel.d.ts +25 -0
- package/lib/types/components/RecapPanel.d.ts.map +1 -0
- package/lib/types/components/RecapPanel.js +55 -0
- package/lib/types/components/RewindPicker.d.ts +12 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +6 -4
- package/lib/types/components/ScrollbarGutter.d.ts +28 -0
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
- package/lib/types/components/ScrollbarGutter.js +119 -0
- package/lib/types/components/Select.d.ts +8 -1
- package/lib/types/components/Select.d.ts.map +1 -1
- package/lib/types/components/Select.js +4 -2
- package/lib/types/components/SkillsPicker.d.ts +4 -1
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +2 -2
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +9 -2
- package/lib/types/components/SubagentDashboard.d.ts +4 -0
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +9 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +5 -4
- package/lib/types/components/SuggestionCard.d.ts +65 -0
- package/lib/types/components/SuggestionCard.d.ts.map +1 -0
- package/lib/types/components/SuggestionCard.js +77 -0
- package/lib/types/components/ThemePicker.d.ts +4 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +2 -2
- package/lib/types/components/ThinkingToggle.d.ts +4 -1
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +2 -2
- package/lib/types/components/TimelineRail.d.ts +53 -0
- package/lib/types/components/TimelineRail.d.ts.map +1 -0
- package/lib/types/components/TimelineRail.js +197 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts +6 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -2
- package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
- package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceMenuPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +4 -1
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -1
- package/lib/types/components/WorkspacePicker.js +2 -2
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +5 -1
- package/lib/types/components/design-system/ListItem.d.ts +8 -1
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +8 -3
- package/lib/types/components/design-system/ThemeProvider.d.ts +7 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +2 -1
- package/lib/types/components/messages/AssistantTextMessage.d.ts +5 -2
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantTextMessage.js +6 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +10 -4
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +15 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +37 -7
- package/lib/types/components/messages/UserPromptMessage.d.ts +2 -1
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +7 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +75 -11
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +13 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +4 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +4 -2
- package/lib/types/components/trajectory/HotspotView.d.ts +7 -1
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -1
- package/lib/types/components/trajectory/HotspotView.js +8 -2
- package/lib/types/components/trajectory/Ledger.d.ts +9 -1
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +23 -5
- package/lib/types/components/trajectory/WaveBand.d.ts +10 -1
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -1
- package/lib/types/components/trajectory/WaveBand.js +7 -2
- package/lib/types/dsh-adapter/channel.d.ts +117 -7
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +1301 -122
- package/lib/types/dsh-adapter/compat/index.d.ts +8 -6
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +8 -6
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +150 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +518 -41
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +1 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +1 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.d.ts +20 -2
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +9 -1
- package/lib/types/dsh-adapter/plugin.d.ts +0 -9
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +453 -14
- package/lib/types/dsh-adapter/presets.d.ts +18 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +31 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +29 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +89 -5
- package/lib/types/dsh-adapter/questions.d.ts +19 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +53 -10
- package/lib/types/dsh-adapter/recap.d.ts +49 -0
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
- package/lib/types/dsh-adapter/recap.js +121 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +314 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessionTree.js +954 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +15 -44
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +28 -165
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/herdr.js +1 -1
- package/lib/types/i18n.d.ts +770 -181
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +257 -80
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +13 -1
- package/lib/types/ink/components/App.d.ts +12 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +101 -4
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -1
- package/lib/types/ink/components/ClockContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +170 -91
- package/lib/types/ink/constants.d.ts +9 -0
- package/lib/types/ink/constants.d.ts.map +1 -1
- package/lib/types/ink/constants.js +9 -0
- package/lib/types/ink/events/click-event.d.ts +7 -16
- package/lib/types/ink/events/click-event.d.ts.map +1 -1
- package/lib/types/ink/events/click-event.js +16 -19
- package/lib/types/ink/events/event-handlers.d.ts +11 -1
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -1
- package/lib/types/ink/events/event-handlers.js +2 -0
- package/lib/types/ink/events/input-event.d.ts +9 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +4 -0
- package/lib/types/ink/events/pointer-event.d.ts +61 -0
- package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
- package/lib/types/ink/events/pointer-event.js +61 -0
- package/lib/types/ink/events/wheel-event.d.ts +17 -0
- package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
- package/lib/types/ink/events/wheel-event.js +20 -0
- package/lib/types/ink/geometry-trace.d.ts +51 -0
- package/lib/types/ink/geometry-trace.d.ts.map +1 -0
- package/lib/types/ink/geometry-trace.js +83 -0
- package/lib/types/ink/hit-test.d.ts +56 -1
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +146 -8
- package/lib/types/ink/ink.d.ts +58 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +230 -29
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +21 -0
- package/lib/types/ink/node-cache.d.ts +5 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.d.ts +8 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +101 -12
- package/lib/types/ink/render-node-to-output.d.ts +10 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +111 -18
- package/lib/types/ink/timeline-rail.d.ts +138 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -0
- package/lib/types/ink/timeline-rail.js +179 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +47 -5
- package/lib/types/migrationPrefs.d.ts +60 -0
- package/lib/types/migrationPrefs.d.ts.map +1 -0
- package/lib/types/migrationPrefs.js +97 -0
- package/lib/types/modelGroups.d.ts +72 -0
- package/lib/types/modelGroups.d.ts.map +1 -0
- package/lib/types/modelGroups.js +97 -0
- package/lib/types/modelRecents.d.ts +39 -0
- package/lib/types/modelRecents.d.ts.map +1 -0
- package/lib/types/modelRecents.js +97 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +11 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +31 -1
- package/lib/types/oauth.d.ts +15 -0
- package/lib/types/oauth.d.ts.map +1 -0
- package/lib/types/oauth.js +14 -0
- package/lib/types/reload.d.ts +109 -0
- package/lib/types/reload.d.ts.map +1 -0
- package/lib/types/reload.js +118 -0
- package/lib/types/screens/Chat.d.ts +3 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1377 -371
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionBrowser.js +56 -29
- package/lib/types/screens/SessionTree.d.ts +27 -0
- package/lib/types/screens/SessionTree.d.ts.map +1 -0
- package/lib/types/screens/SessionTree.js +555 -0
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +64 -22
- package/lib/types/screens/StatusLine.d.ts +0 -8
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +224 -45
- package/lib/types/screens/StatusMetrics.d.ts +35 -3
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +63 -8
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +81 -14
- package/lib/types/screens/chatOverlay.d.ts +237 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -0
- package/lib/types/screens/chatOverlay.js +116 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +64 -10
- package/lib/types/tuiDisplayPrefs.d.ts +15 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +9 -0
- package/lib/types/update.d.ts +139 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +382 -30
- package/lib/types/utils/debug.d.ts +10 -0
- package/lib/types/utils/debug.d.ts.map +1 -1
- package/lib/types/utils/debug.js +24 -0
- package/lib/types/utils/fileTarget.d.ts +46 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -0
- package/lib/types/utils/fileTarget.js +178 -0
- package/lib/types/utils/keymap.d.ts +134 -0
- package/lib/types/utils/keymap.d.ts.map +1 -0
- package/lib/types/utils/keymap.js +311 -0
- package/lib/types/utils/mentions.d.ts +25 -2
- package/lib/types/utils/mentions.d.ts.map +1 -1
- package/lib/types/utils/mentions.js +69 -10
- package/lib/types/utils/openExternal.d.ts +50 -0
- package/lib/types/utils/openExternal.d.ts.map +1 -0
- package/lib/types/utils/openExternal.js +170 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +1 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +140 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +11 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.d.ts +14 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.js +67 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +64 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.js +170 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +79 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +196 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +193 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.d.ts +32 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.js +101 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +31 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.d.ts +69 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +129 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +70 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +19 -5
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/instruction-hint.mjs +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -168,11 +168,22 @@ export function PlanReviewPanel({ question, onAnswer, onCancel, }) {
|
|
|
168
168
|
}
|
|
169
169
|
}, { isActive: true });
|
|
170
170
|
const cursorChar = cursor < feedback.length ? feedback[cursor] : ' ';
|
|
171
|
+
/** Mouse: click a decision row = focus it + submit (same as Enter). */
|
|
172
|
+
const [hoverIndex, setHoverIndex] = React.useState(-1);
|
|
173
|
+
const clickOption = (index) => {
|
|
174
|
+
setFocusIndex(index);
|
|
175
|
+
submitOption(index);
|
|
176
|
+
};
|
|
177
|
+
/** Mouse: click the feedback row to focus it. */
|
|
178
|
+
const focusFeedbackRow = () => {
|
|
179
|
+
setFocusIndex(options.length);
|
|
180
|
+
setError(null);
|
|
181
|
+
};
|
|
171
182
|
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 2, paddingRight: 2, width: "100%", children: [_jsx(Divider, { color: "permission", title: ` ${question.header ?? t('plan-review-fallback-header')} `, padding: 4 }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, wrap: "wrap", children: question.question }), question.detail !== undefined && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(Markdown, { children: question.detail }) }))] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [options.map((option, index) => {
|
|
172
183
|
const focused = index === focusIndex;
|
|
173
184
|
const isApprove = option.label === approveLabel;
|
|
174
|
-
return (_jsxs(Box, { flexDirection: "row", marginTop: focused ? 1 : 0, children: [_jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: focused ? 'claude' : undefined, bold: focused, children: focused ? POINTER : ' ' }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 1, children: [_jsxs(Text, { bold: focused, color: focused || isApprove ? 'claude' : undefined, wrap: "wrap", children: [index + 1, ". ", option.label] }), option.description !== undefined && (_jsx(Text, { dimColor: true, wrap: "wrap", children: option.description }))] })] }, option.label));
|
|
175
|
-
}), _jsxs(Box, { flexDirection: "row", marginTop: inputFocused ? 1 : 0, children: [_jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: inputFocused ? 'claude' : undefined, bold: inputFocused, children: inputFocused ? POINTER : ' ' }) }), _jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: inputFocused ? 'claude' : 'suggestion', children: PENCIL }) }), _jsx(Box, { flexDirection: "row", marginLeft: 1, children: feedback === '' && !inputFocused ? (_jsx(Text, { ref: caretRef, dimColor: true, children: t('plan-review-feedback-placeholder') })) : (_jsxs(_Fragment, { children: [_jsx(Text, { wrap: "wrap", children: feedback.slice(0, cursor) }), inputFocused
|
|
185
|
+
return (_jsxs(Box, { flexDirection: "row", marginTop: focused ? 1 : 0, onClick: () => clickOption(index), onMouseEnter: () => setHoverIndex(index), onMouseLeave: () => setHoverIndex(current => (current === index ? -1 : current)), backgroundColor: hoverIndex === index && !focused ? 'userMessageBackgroundHover' : undefined, children: [_jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: focused ? 'claude' : undefined, bold: focused, children: focused ? POINTER : ' ' }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 1, children: [_jsxs(Text, { bold: focused, color: focused || isApprove ? 'claude' : undefined, wrap: "wrap", children: [index + 1, ". ", option.label] }), option.description !== undefined && (_jsx(Text, { dimColor: true, wrap: "wrap", children: option.description }))] })] }, option.label));
|
|
186
|
+
}), _jsxs(Box, { flexDirection: "row", marginTop: inputFocused ? 1 : 0, onClick: focusFeedbackRow, onMouseEnter: () => setHoverIndex(options.length), onMouseLeave: () => setHoverIndex(current => (current === options.length ? -1 : current)), backgroundColor: hoverIndex === options.length && !inputFocused ? 'userMessageBackgroundHover' : undefined, children: [_jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: inputFocused ? 'claude' : undefined, bold: inputFocused, children: inputFocused ? POINTER : ' ' }) }), _jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: inputFocused ? 'claude' : 'suggestion', children: PENCIL }) }), _jsx(Box, { flexDirection: "row", marginLeft: 1, children: feedback === '' && !inputFocused ? (_jsx(Text, { ref: caretRef, dimColor: true, children: t('plan-review-feedback-placeholder') })) : (_jsxs(_Fragment, { children: [_jsx(Text, { wrap: "wrap", children: feedback.slice(0, cursor) }), inputFocused
|
|
176
187
|
? _jsx(Text, { ref: caretRef, inverse: true, children: cursorChar })
|
|
177
188
|
: _jsx(Text, { ref: caretRef, color: "suggestion", children: "\u258F" }), _jsx(Text, { wrap: "wrap", children: feedback.slice(inputFocused ? cursor + 1 : cursor) })] })) })] })] }), error !== null && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: t('plan-review-hint') }) })] }));
|
|
178
189
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ClickEvent } from '../../ink/events/click-event.js';
|
|
2
3
|
import type { SessionSummary } from '../../dsh-adapter/sessions/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* One session in the browser's list: a title line and a metadata line.
|
|
@@ -13,7 +14,7 @@ import type { SessionSummary } from '../../dsh-adapter/sessions/index.js';
|
|
|
13
14
|
* stay exactly two lines at every terminal width, and a row that wraps
|
|
14
15
|
* destroys the alignment that lets the eye scan a list at all.
|
|
15
16
|
*/
|
|
16
|
-
export declare function SessionListRow({ session, width, depth, focused, now, }: {
|
|
17
|
+
export declare function SessionListRow({ session, width, depth, focused, now, onClick, }: {
|
|
17
18
|
session: SessionSummary;
|
|
18
19
|
/** Columns available to the row, indentation included. */
|
|
19
20
|
width: number;
|
|
@@ -22,5 +23,7 @@ export declare function SessionListRow({ session, width, depth, focused, now, }:
|
|
|
22
23
|
focused: boolean;
|
|
23
24
|
/** Epoch ms used for every relative time in this render pass. */
|
|
24
25
|
now: number;
|
|
26
|
+
/** 鼠标点击行(fullscreen):恢复该会话(与 Enter 同路径)。 */
|
|
27
|
+
onClick?(event: ClickEvent): void;
|
|
25
28
|
}): React.ReactNode;
|
|
26
29
|
//# sourceMappingURL=SessionListRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionListRow.d.ts","sourceRoot":"","sources":["../../../../src/components/sessions/SessionListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SessionListRow.d.ts","sourceRoot":"","sources":["../../../../src/components/sessions/SessionListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEzE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,GAAG,EACH,OAAO,GACR,EAAE;IACD,OAAO,EAAE,cAAc,CAAA;IACvB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAA;IACX,4CAA4C;IAC5C,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CAClC,GAAG,KAAK,CAAC,SAAS,CA4ClB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Box, Text } from '../../ui.js';
|
|
3
4
|
import { t } from '../../i18n.js';
|
|
4
5
|
import { formatBytes, formatWhen, kindMark, titleColor, truncateWidth, } from '../../sessions/format.js';
|
|
@@ -15,11 +16,12 @@ import { formatBytes, formatWhen, kindMark, titleColor, truncateWidth, } from '.
|
|
|
15
16
|
* stay exactly two lines at every terminal width, and a row that wraps
|
|
16
17
|
* destroys the alignment that lets the eye scan a list at all.
|
|
17
18
|
*/
|
|
18
|
-
export function SessionListRow({ session, width, depth, focused, now, }) {
|
|
19
|
+
export function SessionListRow({ session, width, depth, focused, now, onClick, }) {
|
|
19
20
|
const indent = depth * 2;
|
|
20
21
|
// Two cells for the focus marker, plus the indent for a nested run.
|
|
21
22
|
const body = Math.max(8, width - 2 - indent);
|
|
22
23
|
const mark = kindMark(session.kind);
|
|
24
|
+
const [hovered, setHovered] = useState(false);
|
|
23
25
|
const facts = [formatWhen(session.updatedAt, now)];
|
|
24
26
|
if (session.branch !== undefined)
|
|
25
27
|
facts.push(session.branch);
|
|
@@ -31,5 +33,5 @@ export function SessionListRow({ session, width, depth, focused, now, }) {
|
|
|
31
33
|
if (session.childCount > 0 && depth === 0) {
|
|
32
34
|
facts.push(t('session-children', { n: session.childCount }));
|
|
33
35
|
}
|
|
34
|
-
return (_jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsxs(Box, { children: [_jsx(Text, { color: focused ? 'suggestion' : 'subtle', children: `${' '.repeat(indent)}${focused ? '❯ ' : ' '}` }), mark !== undefined && _jsx(Text, { color: mark.color, children: `${mark.glyph} ` }), _jsx(Text, { color: titleColor(session.title.source, focused), bold: focused, children: truncateWidth(session.label ?? session.title.text, body - (mark === undefined ? 0 : 2)) })] }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: `${' '.repeat(indent + 2)}${truncateWidth(facts.join(' · '), body)}` }) })] }));
|
|
36
|
+
return (_jsxs(Box, { flexDirection: "column", flexShrink: 0, onClick: onClick, onMouseEnter: onClick !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onClick !== undefined ? () => setHovered(false) : undefined, backgroundColor: hovered && !focused ? 'userMessageBackgroundHover' : undefined, children: [_jsxs(Box, { children: [_jsx(Text, { color: focused ? 'suggestion' : 'subtle', children: `${' '.repeat(indent)}${focused ? '❯ ' : ' '}` }), mark !== undefined && _jsx(Text, { color: mark.color, children: `${mark.glyph} ` }), _jsx(Text, { color: titleColor(session.title.source, focused), bold: focused, children: truncateWidth(session.label ?? session.title.text, body - (mark === undefined ? 0 : 2)) })] }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: `${' '.repeat(indent + 2)}${truncateWidth(facts.join(' · '), body)}` }) })] }));
|
|
35
37
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { HotspotRow, HotspotSort, TrajAggregate } from '../../dsh-adapter/types.js';
|
|
3
3
|
/** Flatten the three sections into the single list the cursor walks. */
|
|
4
4
|
export declare function hotspotRows(agg: TrajAggregate): HotspotRow[];
|
|
5
|
-
export declare function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, }: {
|
|
5
|
+
export declare function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, onRowClick, }: {
|
|
6
6
|
agg: TrajAggregate;
|
|
7
7
|
sort: HotspotSort;
|
|
8
8
|
width: number;
|
|
@@ -10,5 +10,11 @@ export declare function HotspotView({ agg, sort, width, height, cursor, tick, sw
|
|
|
10
10
|
cursor: number;
|
|
11
11
|
tick: number;
|
|
12
12
|
switchTick: number;
|
|
13
|
+
/**
|
|
14
|
+
* Mouse pick (fullscreen): reports the clicked row's cursor index — the
|
|
15
|
+
* scene jumps back to the timeline positioned on the group's first member
|
|
16
|
+
* (same path as the keyboard Enter). Hover shows a dim `▸` pointer.
|
|
17
|
+
*/
|
|
18
|
+
onRowClick?: (cursorIndex: number) => void;
|
|
13
19
|
}): React.ReactNode;
|
|
14
20
|
//# sourceMappingURL=HotspotView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotspotView.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/HotspotView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AA6CxF,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,EAAE,CAE5D;AAOD,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,GACX,EAAE;IACD,GAAG,EAAE,aAAa,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"HotspotView.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/HotspotView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AA6CxF,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,EAAE,CAE5D;AAOD,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,EACV,UAAU,GACX,EAAE;IACD,GAAG,EAAE,aAAa,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,GAAG,KAAK,CAAC,SAAS,CA6FlB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Box, Text, useTheme } from '../../ui.js';
|
|
3
4
|
import { getTheme } from '../../theme.js';
|
|
4
5
|
import { formatDuration, formatTokens, truncateWidth } from '../../trajectory/format.js';
|
|
@@ -40,9 +41,10 @@ export function hotspotRows(agg) {
|
|
|
40
41
|
function valueOf(row, sort) {
|
|
41
42
|
return sort === 'count' ? row.count : sort === 'tokens' ? row.tokens : row.totalMs;
|
|
42
43
|
}
|
|
43
|
-
export function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, }) {
|
|
44
|
+
export function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, onRowClick, }) {
|
|
44
45
|
const [themeName] = useTheme();
|
|
45
46
|
const theme = getTheme(themeName);
|
|
47
|
+
const [hoverIndex, setHoverIndex] = React.useState(-1);
|
|
46
48
|
const labelWidth = Math.min(18, Math.max(10, Math.floor(width * 0.16)));
|
|
47
49
|
const barWidth = Math.max(6, Math.min(30, width - labelWidth - 34));
|
|
48
50
|
// Build the flat list once, tagging each row with its section's scale.
|
|
@@ -72,12 +74,16 @@ export function HotspotView({ agg, sort, width, height, cursor, tick, switchTick
|
|
|
72
74
|
}
|
|
73
75
|
const { row, max, colorKey } = entry;
|
|
74
76
|
const focused = entry.cursorIndex === cursor;
|
|
77
|
+
// 鼠标:行点击跳回 timeline 定位;悬停轻指示(dim ▸,不刷背景)
|
|
78
|
+
const hovered = onRowClick !== undefined && hoverIndex === entry.cursorIndex;
|
|
75
79
|
// Stagger the settle by row so a section reads top-down on switch.
|
|
76
80
|
const dim = reproject(tick - offset, switchTick);
|
|
77
81
|
const base = row.error === true ? theme.error : theme[colorKey];
|
|
78
82
|
const stats = `${row.count}×` +
|
|
79
83
|
(row.tokens > 0 ? ` · ${formatTokens(row.tokens)}` : '') +
|
|
80
84
|
(row.count > 0 && row.totalMs > 0 ? ` · ⌀${formatDuration(row.totalMs / row.count)}` : '');
|
|
81
|
-
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1,
|
|
85
|
+
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1, onClick: onRowClick === undefined ? undefined : () => onRowClick(entry.cursorIndex), onMouseEnter: onRowClick === undefined ? undefined : () => setHoverIndex(entry.cursorIndex), onMouseLeave: onRowClick === undefined
|
|
86
|
+
? undefined
|
|
87
|
+
: () => setHoverIndex(previous => (previous === entry.cursorIndex ? -1 : previous)), children: [_jsx(Box, { flexShrink: 0, width: 2, children: _jsx(Text, { color: focused ? 'suggestion' : 'inactive', children: focused || hovered ? '▸' : ' ' }) }), _jsx(Box, { flexShrink: 0, width: labelWidth, children: _jsx(Text, { color: focused ? 'suggestion' : row.error === true ? 'error' : undefined, children: truncateWidth(row.label, labelWidth) }) }), _jsx(Box, { flexShrink: 0, width: barWidth, children: _jsx(Text, { color: mix(base, theme.background, dim), children: bar(valueOf(row, sort), max, barWidth) }) }), _jsx(Box, { flexShrink: 0, width: 8, justifyContent: "flex-end", children: _jsx(Text, { bold: true, color: row.error === true ? 'error' : undefined, children: formatDuration(row.totalMs) }) }), _jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsx(Text, { color: "subtle", children: truncateWidth(stats, Math.max(4, width - labelWidth - barWidth - 16)) }) })] }, `r${entry.cursorIndex}`));
|
|
82
88
|
}) }));
|
|
83
89
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ClickEvent } from '../../ink/events/click-event.js';
|
|
2
3
|
import type { TrajNode } from '../../dsh-adapter/types.js';
|
|
3
|
-
export declare function Ledger({ rows, start, height, cursor, width, tick, arrivalTick, arrivalFrom, }: {
|
|
4
|
+
export declare function Ledger({ rows, start, height, cursor, width, tick, arrivalTick, arrivalFrom, onRowClick, }: {
|
|
4
5
|
/** The (possibly filtered) ledger. */
|
|
5
6
|
rows: readonly TrajNode[];
|
|
6
7
|
/** Index of the first visible row. */
|
|
@@ -16,5 +17,12 @@ export declare function Ledger({ rows, start, height, cursor, width, tick, arriv
|
|
|
16
17
|
arrivalTick: number;
|
|
17
18
|
/** Rows at or after this index are the ones that just arrived. */
|
|
18
19
|
arrivalFrom: number;
|
|
20
|
+
/**
|
|
21
|
+
* Mouse pick (fullscreen): reports the clicked row's absolute index — the
|
|
22
|
+
* scene jumps the cursor to it (same semantics as the keyboard jumps).
|
|
23
|
+
* Hover on a non-focused row shows a dim `▸` pointer — light indication,
|
|
24
|
+
* no background wash (the ledger is content, not a menu).
|
|
25
|
+
*/
|
|
26
|
+
onRowClick?: (index: number, event: ClickEvent) => void;
|
|
19
27
|
}): React.ReactNode;
|
|
20
28
|
//# sourceMappingURL=Ledger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ledger.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/Ledger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Ledger.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/Ledger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAgBjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AA6C1D,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,GACX,EAAE;IACD,sCAAsC;IACtC,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;CACxD,GAAG,KAAK,CAAC,SAAS,CAsKlB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Box, Text, useTheme } from '../../ui.js';
|
|
3
4
|
import { burstDurationMs, burstErrors, previewText } from '../../dsh-adapter/trajectory/index.js';
|
|
4
5
|
import { costGlyph, formatDuration, formatClock, heatColor, KIND_BADGE, KIND_BADGE_BG, KIND_FG, KIND_GLYPH, ledgerLayout, } from '../../trajectory/format.js';
|
|
@@ -46,9 +47,10 @@ function spineGlyph(rows, index) {
|
|
|
46
47
|
return SPINE.close;
|
|
47
48
|
return SPINE.mid;
|
|
48
49
|
}
|
|
49
|
-
export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick, arrivalFrom, }) {
|
|
50
|
+
export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick, arrivalFrom, onRowClick, }) {
|
|
50
51
|
const [themeName] = useTheme();
|
|
51
52
|
const theme = getTheme(themeName);
|
|
53
|
+
const [hoverIndex, setHoverIndex] = React.useState(-1);
|
|
52
54
|
const layout = ledgerLayout(width);
|
|
53
55
|
const visible = rows.slice(start, start + height);
|
|
54
56
|
const arriving = arrive(tick, arrivalTick);
|
|
@@ -65,6 +67,22 @@ export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick,
|
|
|
65
67
|
const running = node.status === 'running';
|
|
66
68
|
const isNew = index >= arrivalFrom && arriving > 0;
|
|
67
69
|
const duration = node.burst === undefined ? node.durationMs : burstDurationMs(node.burst);
|
|
70
|
+
// 鼠标:行点击跳光标;悬停在非焦点行亮出 dim ▸(轻指示,不刷背景)
|
|
71
|
+
const hovered = onRowClick !== undefined && hoverIndex === index;
|
|
72
|
+
const pointer = focused || hovered ? '▸' : ' ';
|
|
73
|
+
const rowEvents = onRowClick === undefined
|
|
74
|
+
? undefined
|
|
75
|
+
: {
|
|
76
|
+
onClick: (event) => {
|
|
77
|
+
onRowClick(index, event);
|
|
78
|
+
},
|
|
79
|
+
onMouseEnter: () => {
|
|
80
|
+
setHoverIndex(index);
|
|
81
|
+
},
|
|
82
|
+
onMouseLeave: () => {
|
|
83
|
+
setHoverIndex(previous => (previous === index ? -1 : previous));
|
|
84
|
+
},
|
|
85
|
+
};
|
|
68
86
|
// ── structural rows are RULES, not rows ────────────────────────────
|
|
69
87
|
//
|
|
70
88
|
// A ledger with five hundred entries needs chapters. Turn and step
|
|
@@ -82,7 +100,7 @@ export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick,
|
|
|
82
100
|
// attention than the work between them. Only the turn, which is the
|
|
83
101
|
// session's actual chapter break, gets a rule.
|
|
84
102
|
if (!isTurn) {
|
|
85
|
-
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { color: "subtle", children: `${
|
|
103
|
+
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1, ...rowEvents, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { color: "subtle", children: `${pointer}╵` }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { color: focused ? 'suggestion' : 'subtle', wrap: "truncate", children: node.label }) }), _jsx(Box, { flexShrink: 0, children: _jsx(Text, { color: heatColor(duration), children: costGlyph(duration) }) }), _jsx(Box, { flexShrink: 0, justifyContent: "flex-end", width: 7, children: _jsx(Text, { color: heatColor(duration), children: right }) })] }, `${node.seq}:step`));
|
|
86
104
|
}
|
|
87
105
|
const tone = failed ? 'error' : running ? 'success' : 'inactiveShimmer';
|
|
88
106
|
// Idle before a turn is wall-clock the session spent waiting on the
|
|
@@ -92,9 +110,9 @@ export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick,
|
|
|
92
110
|
const previous = rows[index - 1];
|
|
93
111
|
const idle = previous === undefined ? 0 : node.time - (previous.time + (previous.durationMs ?? 0));
|
|
94
112
|
const idleText = idle >= IDLE_FLOOR_MS ? ` ⋯ ${formatDuration(idle)}` : '';
|
|
95
|
-
const head = `${
|
|
113
|
+
const head = `${pointer}━━ ${node.label}${idleText} `;
|
|
96
114
|
const fill = Math.max(2, width - stringWidth(head) - stringWidth(right) - 2);
|
|
97
|
-
return (_jsx(Box, { width: "100%", height: 1, flexShrink: 0, children: _jsxs(Text, { color: tone, bold: true, children: [`${
|
|
115
|
+
return (_jsx(Box, { width: "100%", height: 1, flexShrink: 0, ...rowEvents, children: _jsxs(Text, { color: tone, bold: true, children: [`${pointer}━━ ${node.label}`, _jsx(Text, { color: "subtle", children: idleText }), _jsx(Text, { color: "inactive", children: ` ${'━'.repeat(fill)} ` }), _jsx(Text, { color: failed ? 'error' : heatColor(duration), children: right })] }) }, `${node.seq}:turn`));
|
|
98
116
|
}
|
|
99
117
|
const spineColor = failed ? 'error' : running ? 'success' : node.seed === true ? 'subtle' : 'inactive';
|
|
100
118
|
const badgeBg = KIND_BADGE_BG[node.kind];
|
|
@@ -107,6 +125,6 @@ export function Ledger({ rows, start, height, cursor, width, tick, arrivalTick,
|
|
|
107
125
|
const outcome = layout.outcome && node.outcome !== undefined && node.outcome !== ''
|
|
108
126
|
? previewText(node.outcome, Math.max(8, Math.floor(layout.detail * 0.3)))
|
|
109
127
|
: '';
|
|
110
|
-
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1, children: [_jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: spineColor, children: [
|
|
128
|
+
return (_jsxs(Box, { flexDirection: "row", width: "100%", height: 1, flexShrink: 0, gap: 1, ...rowEvents, children: [_jsx(Box, { flexShrink: 0, children: _jsxs(Text, { color: spineColor, children: [pointer, spineGlyph(rows, index)] }) }), layout.index && (_jsx(Box, { flexShrink: 0, width: 8, children: _jsx(Text, { color: "subtle", children: formatClock(node.time) }) })), _jsx(Box, { flexShrink: 0, children: _jsx(Text, { color: isNew ? mix(theme[KIND_FG[node.kind]], theme.text, arriving) : KIND_FG[node.kind], backgroundColor: badgeBg, bold: true, children: badge }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate", color: focused ? 'suggestion' : node.seed === true ? 'subtle' : undefined, children: [label, detail === '' ? '' : ' ', _jsx(Text, { color: focused ? 'suggestion' : 'inactive', children: detail }), outcome === '' ? '' : _jsx(Text, { color: "subtle", children: ` → ${outcome}` })] }) }), _jsx(Box, { flexShrink: 0, children: _jsx(Text, { color: running ? 'success' : heatColor(duration), children: costGlyph(duration) }) }), _jsx(Box, { flexShrink: 0, justifyContent: "flex-end", width: 7, children: _jsx(Text, { color: running ? 'success' : heatColor(duration), children: running ? '…' : duration === undefined ? '' : formatDuration(duration) }) })] }, `${node.seq}:${node.kind}`));
|
|
111
129
|
}) }));
|
|
112
130
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ClickEvent } from '../../ink/events/click-event.js';
|
|
2
3
|
import type { WaveBand as Band } from '../../dsh-adapter/types.js';
|
|
3
|
-
export declare function WaveBand({ band, width, cursorColumn, viewportStart, viewportEnd, matches, tick, alertTick, }: {
|
|
4
|
+
export declare function WaveBand({ band, width, cursorColumn, viewportStart, viewportEnd, matches, tick, alertTick, onColumnClick, }: {
|
|
4
5
|
band: Band;
|
|
5
6
|
/** Rendered width in cells; equals `band.buckets.length`. */
|
|
6
7
|
width: number;
|
|
@@ -19,6 +20,14 @@ export declare function WaveBand({ band, width, cursorColumn, viewportStart, vie
|
|
|
19
20
|
tick: number;
|
|
20
21
|
/** Tick the most recent alert was triggered on. */
|
|
21
22
|
alertTick: number;
|
|
23
|
+
/**
|
|
24
|
+
* Mouse pick (fullscreen): reports the clicked column (0-based within the
|
|
25
|
+
* band; the ruler row counts too — its ▐▌ bracket is the seek affordance).
|
|
26
|
+
* The scene jumps to that column's nearest event via bucket.firstIndex,
|
|
27
|
+
* which empty columns inherit from their predecessor for exactly this
|
|
28
|
+
* purpose. No hover: column density makes per-cell indication noise.
|
|
29
|
+
*/
|
|
30
|
+
onColumnClick?: (column: number, event: ClickEvent) => void;
|
|
22
31
|
}): React.ReactNode;
|
|
23
32
|
/**
|
|
24
33
|
* Convert a theme colour to the `#rrggbb` form chalk needs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WaveBand.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/WaveBand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"WaveBand.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/WaveBand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAIjE,OAAO,KAAK,EAAE,QAAQ,IAAI,IAAI,EAAe,MAAM,4BAA4B,CAAA;AAmD/E,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,OAAO,EACP,IAAI,EACJ,SAAS,EACT,aAAa,GACd,EAAE;IACD,IAAI,EAAE,IAAI,CAAA;IACV,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC7B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;CAC5D,GAAG,KAAK,CAAC,SAAS,CA2GlB;AAED;;;;;;GAMG;AACH,iBAAS,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMrC;AAED,6EAA6E;AAC7E,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,CAAA"}
|
|
@@ -50,7 +50,7 @@ function channelColor(channel, theme) {
|
|
|
50
50
|
default: return theme.subtle;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
export function WaveBand({ band, width, cursorColumn, viewportStart, viewportEnd, matches, tick, alertTick, }) {
|
|
53
|
+
export function WaveBand({ band, width, cursorColumn, viewportStart, viewportEnd, matches, tick, alertTick, onColumnClick, }) {
|
|
54
54
|
const [themeName] = useTheme();
|
|
55
55
|
const theme = getTheme(themeName);
|
|
56
56
|
if (band.buckets.length === 0) {
|
|
@@ -123,7 +123,12 @@ export function WaveBand({ band, width, cursorColumn, viewportStart, viewportEnd
|
|
|
123
123
|
? chalk.hex(toHex(theme.permission))(glyph)
|
|
124
124
|
: chalk.hex(toHex(theme.subtle))(glyph);
|
|
125
125
|
}
|
|
126
|
-
return (_jsxs(Box, { flexDirection: "column", flexShrink: 0,
|
|
126
|
+
return (_jsxs(Box, { flexDirection: "column", flexShrink: 0, onClick: onColumnClick === undefined
|
|
127
|
+
? undefined
|
|
128
|
+
: (event) => {
|
|
129
|
+
const column = Math.max(0, Math.min(band.buckets.length - 1, event.localCol));
|
|
130
|
+
onColumnClick(column, event);
|
|
131
|
+
}, children: [_jsx(Text, { children: wave }), _jsx(Text, { children: rulerText })] }));
|
|
127
132
|
}
|
|
128
133
|
/**
|
|
129
134
|
* Convert a theme colour to the `#rrggbb` form chalk needs.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { type Agent, type AgentHandle, type AgentStatus } from '@deepseek-ai/dsh-agent';
|
|
2
|
-
import type { LlmModelInfo } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import type { LlmModelInfo, LlmProviderInfo } from '@deepseek-ai/dsh-llm';
|
|
3
3
|
import { type ContentBlock } from '@deepseek-ai/dsh-llm';
|
|
4
|
+
import { type RecapOutcome } from './recap.js';
|
|
4
5
|
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
5
6
|
import type { Context } from '@deepseek-ai/cordis';
|
|
6
7
|
import { type CommandCompletion, type LocalCommand } from '../commands.js';
|
|
8
|
+
import { type SessionTreeData } from './sessionTree.js';
|
|
7
9
|
import { type PreviewEntry, type SessionSummary } from './sessions/index.js';
|
|
8
10
|
import { type FileCandidate } from '../utils/fileSuggestions.js';
|
|
9
|
-
import type { ProviderSetupHost } from './providerWizard.js';
|
|
11
|
+
import type { OAuthProviderStatus, ProviderSetupHost } from './providerWizard.js';
|
|
10
12
|
import { type SessionModeSpec } from '../sessionModes.js';
|
|
11
|
-
import { type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
13
|
+
import { type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
12
14
|
import { type SubagentState } from './subagents.js';
|
|
13
15
|
export type { SubagentState } from './subagents.js';
|
|
14
16
|
import type { SpinnerMode } from '../components/Spinner/spinnerMode.js';
|
|
@@ -316,11 +318,32 @@ export interface Channel {
|
|
|
316
318
|
readonly rows: readonly ChatRow[];
|
|
317
319
|
readonly status: AgentStatus | 'starting' | 'disposed';
|
|
318
320
|
readonly sessionTitle: string;
|
|
321
|
+
/** Per-session accent color name (`/color`), '' when unset — persisted via
|
|
322
|
+
* a `session/color` log event so it survives resume/rewind. Renders as
|
|
323
|
+
* the prompt-input border + session label chip accent (cc/sessionColors). */
|
|
324
|
+
readonly sessionColor: string;
|
|
319
325
|
readonly agentId: string;
|
|
326
|
+
/** `dsh-tui.recapOnOpen` (default on): auto-summarize the session tail
|
|
327
|
+
* into the dim AutoRecapRow when the session opens/resumes. Read live
|
|
328
|
+
* (settings service), so a `/settings` change applies on the next
|
|
329
|
+
* session switch; absent settings service → on. */
|
|
330
|
+
readonly autoRecapOnOpen: boolean;
|
|
320
331
|
/** Resolved model id (from the plugin config). */
|
|
321
332
|
readonly model: string;
|
|
322
333
|
/** Provider route of the live agent. */
|
|
323
334
|
readonly provider: string;
|
|
335
|
+
/** Raw cordis.yml `provider` key (undefined when unset) — the boot-time
|
|
336
|
+
* pin `/reload` must never override. */
|
|
337
|
+
readonly configuredProvider: string | undefined;
|
|
338
|
+
/** Raw cordis.yml `model` key (undefined when unset). */
|
|
339
|
+
readonly configuredModel: string | undefined;
|
|
340
|
+
/** Explicit cordis.yml `preset` (undefined = roster default wins) — `/reload`
|
|
341
|
+
* must not override a static deployment choice. */
|
|
342
|
+
readonly configuredPreset: string | undefined;
|
|
343
|
+
/** Explicit cordis.yml `activityFrames` (undefined = pref/default wins). */
|
|
344
|
+
readonly configuredActivityFrames: string | undefined;
|
|
345
|
+
/** Explicit cordis.yml `lang` (undefined = settings/lang.json wins). */
|
|
346
|
+
readonly configuredLang: string | undefined;
|
|
324
347
|
/** Running token totals across the session's assistant messages. */
|
|
325
348
|
readonly tokens: TokenUsage;
|
|
326
349
|
/** Working directory of the session. */
|
|
@@ -376,6 +399,13 @@ export interface Channel {
|
|
|
376
399
|
readonly thinkingFold: 'preview' | 'full';
|
|
377
400
|
/** Live tool-card background treatment. */
|
|
378
401
|
readonly toolBackground: ToolBackground;
|
|
402
|
+
/** What the fullscreen transcript's right gutter shows (settings
|
|
403
|
+
* `dsh-tui.scrollGutter`: turn timeline / proportional scrollbar /
|
|
404
|
+
* nothing). */
|
|
405
|
+
readonly scrollGutter: ScrollGutterMode;
|
|
406
|
+
/** Whether the session-name chip shows on the prompt top border's right
|
|
407
|
+
* side (settings `dsh-tui.promptSessionLabel`; off by default). */
|
|
408
|
+
readonly promptSessionLabel: boolean;
|
|
379
409
|
/** Live status-footer visibility and compactness preferences. */
|
|
380
410
|
readonly statusBar: Readonly<StatusBarConfig>;
|
|
381
411
|
/** Whether the header's pixel whale art shows (settings `dsh-tui.whale`). */
|
|
@@ -390,10 +420,11 @@ export interface Channel {
|
|
|
390
420
|
readonly contextBarEnabled: boolean;
|
|
391
421
|
/**
|
|
392
422
|
* Current same-session goal projection, when a goal exists. Derived live
|
|
393
|
-
* from the durable
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
423
|
+
* from the durable goal events in the session log — top-level
|
|
424
|
+
* `goal/change` snapshots (every goal mutation appends one) plus the
|
|
425
|
+
* goal-sourced continuation rounds that advance the counter — so this
|
|
426
|
+
* snapshot tracks create/edit/pause/resume/complete/block/clear in real
|
|
427
|
+
* time and replays correctly on resume/rewind.
|
|
397
428
|
*/
|
|
398
429
|
readonly goal: ChannelGoal | undefined;
|
|
399
430
|
/**
|
|
@@ -500,6 +531,25 @@ export interface Channel {
|
|
|
500
531
|
promptRewind(row: ChatRow): Promise<{
|
|
501
532
|
modes: readonly TuiRewindMode[];
|
|
502
533
|
} | 'cancel' | null>;
|
|
534
|
+
/**
|
|
535
|
+
* The session family tree for the /tree screen (pi's Session Tree): the
|
|
536
|
+
* live session's whole lineage — ancestors, siblings, descendants —
|
|
537
|
+
* stitched across fork sessions into one message-level tree. `null` (with
|
|
538
|
+
* a notify) when session persistence is unavailable or the live session
|
|
539
|
+
* swapped while the family loaded.
|
|
540
|
+
*/
|
|
541
|
+
buildSessionTree(): Promise<SessionTreeData | null>;
|
|
542
|
+
/**
|
|
543
|
+
* Session-tree fork: `rewind` drops the picked user turn (its prompt comes
|
|
544
|
+
* back as the returned text), `fork` keeps the picked entry. `seq` is the
|
|
545
|
+
* tree entry's source event seq inside `sessionId`'s log; `sessionId` may
|
|
546
|
+
* be any family member (adopting a dead branch forks IT at the picked
|
|
547
|
+
* point). Null = refused (the channel notified why).
|
|
548
|
+
*/
|
|
549
|
+
rewindToNode(sessionId: string, seq: number, mode?: 'rewind' | 'fork'): Promise<string | null>;
|
|
550
|
+
/** `/fork`: fork the current session at its tip into a persisted copy the
|
|
551
|
+
* user enters via `/resume` — the live session keeps running untouched. */
|
|
552
|
+
forkSession(): Promise<boolean>;
|
|
503
553
|
/** Switch the live agent to a persisted session, replaying its history. */
|
|
504
554
|
resumeTo(sessionId: string): Promise<ResumeResult>;
|
|
505
555
|
/** Start a fresh conversation (`/new`): a brand-new agent + session, the
|
|
@@ -570,6 +620,8 @@ export interface Channel {
|
|
|
570
620
|
setActivityFrames(name: string): boolean;
|
|
571
621
|
/** Advertised models across every registered provider route (empty when the LLM service is absent). */
|
|
572
622
|
listModels(): Promise<readonly LlmModelInfo[]>;
|
|
623
|
+
/** Provider display identities for the same routes (picker group labels). */
|
|
624
|
+
listProviders(): Promise<readonly LlmProviderInfo[]>;
|
|
573
625
|
/** The live agent's full skill catalog for `/skills` (issue #204) — name,
|
|
574
626
|
* description, invocation flags and source bucket. Undefined on a failed
|
|
575
627
|
* or incomplete registry read (the picker shows an error); empty only
|
|
@@ -581,6 +633,9 @@ export interface Channel {
|
|
|
581
633
|
* credentials / llm seams; undefined when the composition lacks them
|
|
582
634
|
* (bare cordis.yml start without the dsh-base services). */
|
|
583
635
|
providerSetup(): ProviderSetupHost | undefined;
|
|
636
|
+
/** OAuth sign-in states from a mounted dsh-auth-style plugin; undefined
|
|
637
|
+
* without the plugin, so `/login` renders exactly what it did before. */
|
|
638
|
+
oauthProviderStatuses(): Promise<readonly OAuthProviderStatus[] | undefined>;
|
|
584
639
|
/**
|
|
585
640
|
* Runtime capabilities for the `/settings` screen, over the settings /
|
|
586
641
|
* credentials seams; undefined when the composition lacks the settings
|
|
@@ -610,6 +665,17 @@ export interface Channel {
|
|
|
610
665
|
/** Rename the current session (CC's /rename): appends a `session/title`
|
|
611
666
|
* event, which the status line and the /resume picker both read. */
|
|
612
667
|
renameSession(title: string): void;
|
|
668
|
+
/** Set the current session's accent color (`/color <name>`): appends a
|
|
669
|
+
* `session/color` event; '' clears it back to the theme default. */
|
|
670
|
+
setSessionColor(color: string): void;
|
|
671
|
+
/** Generate a recap of the session's recent activity (`/recap`): one
|
|
672
|
+
* tool-less LLM call over the tail exchanges, returning a one-line
|
|
673
|
+
* summary plus an optional proposed title. The answer is pure UI state
|
|
674
|
+
* and never enters the session log. */
|
|
675
|
+
recapRecent(options?: {
|
|
676
|
+
signal?: AbortSignal;
|
|
677
|
+
onText?: (delta: string) => void;
|
|
678
|
+
}): Promise<RecapOutcome>;
|
|
613
679
|
/** Delete a persisted session (`/resume` picker ctrl+d): removes its log
|
|
614
680
|
* directory, its last-used entry, and the resume marker when it points
|
|
615
681
|
* here. False for the live session or a missing/unwritable log. */
|
|
@@ -696,6 +762,8 @@ export interface ChannelState {
|
|
|
696
762
|
rows: ChatRow[];
|
|
697
763
|
status: AgentStatus | 'starting' | 'disposed';
|
|
698
764
|
sessionTitle: string;
|
|
765
|
+
sessionColor: string;
|
|
766
|
+
autoRecapOnOpen: boolean;
|
|
699
767
|
agentId: string;
|
|
700
768
|
model: string;
|
|
701
769
|
provider: string;
|
|
@@ -734,12 +802,22 @@ export interface ChannelState {
|
|
|
734
802
|
workingActivity: ActivityStatus | undefined;
|
|
735
803
|
/** Working-activity indicator preset (see the public Channel type). */
|
|
736
804
|
activityFrames: string | undefined;
|
|
805
|
+
/** Raw cordis.yml pins `/reload` must respect (see the public Channel type). */
|
|
806
|
+
configuredProvider: string | undefined;
|
|
807
|
+
configuredModel: string | undefined;
|
|
808
|
+
configuredPreset: string | undefined;
|
|
809
|
+
configuredActivityFrames: string | undefined;
|
|
810
|
+
configuredLang: string | undefined;
|
|
737
811
|
/** Diff presentation preference (see the public Channel type). */
|
|
738
812
|
diffLayout: 'auto' | 'split' | 'unified';
|
|
739
813
|
/** Thinking-block display (see the public Channel type). */
|
|
740
814
|
thinkingFold: 'preview' | 'full';
|
|
741
815
|
/** Tool-card background treatment (see the public Channel type). */
|
|
742
816
|
toolBackground: ToolBackground;
|
|
817
|
+
/** Transcript gutter mode (see the public Channel type). */
|
|
818
|
+
scrollGutter: ScrollGutterMode;
|
|
819
|
+
/** Session-name chip on the prompt border (see the public Channel type). */
|
|
820
|
+
promptSessionLabel: boolean;
|
|
743
821
|
/** Status-footer preferences (see the public Channel type). */
|
|
744
822
|
statusBar: StatusBarConfig;
|
|
745
823
|
/** Apply a diff-layout change (see the public Channel type). */
|
|
@@ -748,6 +826,10 @@ export interface ChannelState {
|
|
|
748
826
|
setThinkingFold(mode: 'preview' | 'full'): void;
|
|
749
827
|
/** Apply a tool-card background change. */
|
|
750
828
|
setToolBackground(background: ToolBackground): void;
|
|
829
|
+
/** Apply a transcript gutter mode change. */
|
|
830
|
+
setScrollGutter(mode: ScrollGutterMode): void;
|
|
831
|
+
/** Apply a prompt session-name chip change. */
|
|
832
|
+
setPromptSessionLabel(enabled: boolean): void;
|
|
751
833
|
/** Apply status-footer preference changes. */
|
|
752
834
|
setStatusBar(config: Partial<StatusBarConfig>): void;
|
|
753
835
|
/** Whale header art switch (see the public Channel type). */
|
|
@@ -778,6 +860,13 @@ export interface ChannelState {
|
|
|
778
860
|
answer: string | null;
|
|
779
861
|
error?: string;
|
|
780
862
|
}>;
|
|
863
|
+
/** 会话 recap(见 public Channel.recapRecent)。 */
|
|
864
|
+
recapRecent(options?: {
|
|
865
|
+
signal?: AbortSignal;
|
|
866
|
+
onText?: (delta: string) => void;
|
|
867
|
+
}): Promise<RecapOutcome>;
|
|
868
|
+
/** 会话强调色(见 public Channel.setSessionColor)。 */
|
|
869
|
+
setSessionColor(color: string): void;
|
|
781
870
|
/** Effective slash commands (see the public Channel type). */
|
|
782
871
|
commandList: readonly LocalCommand[];
|
|
783
872
|
/** Context-aware slash completions (see the public Channel type). */
|
|
@@ -820,6 +909,12 @@ export interface ChannelState {
|
|
|
820
909
|
promptRewind(row: ChatRow): Promise<{
|
|
821
910
|
modes: readonly TuiRewindMode[];
|
|
822
911
|
} | 'cancel' | null>;
|
|
912
|
+
/** @internal session-tree assembly (see the public Channel.buildSessionTree). */
|
|
913
|
+
buildSessionTree(): Promise<SessionTreeData | null>;
|
|
914
|
+
/** @internal tree-entry rewind/fork (see the public Channel.rewindToNode). */
|
|
915
|
+
rewindToNode(sessionId: string, seq: number, mode?: 'rewind' | 'fork'): Promise<string | null>;
|
|
916
|
+
/** @internal tip fork (see the public Channel.forkSession). */
|
|
917
|
+
forkSession(): Promise<boolean>;
|
|
823
918
|
/** Switch the live agent to a persisted session, replaying its history. */
|
|
824
919
|
resumeTo(sessionId: string): Promise<ResumeResult>;
|
|
825
920
|
/** Start a fresh conversation (`/new`). */
|
|
@@ -861,12 +956,16 @@ export interface ChannelState {
|
|
|
861
956
|
/** Switch the working-activity indicator preset (see the public Channel). */
|
|
862
957
|
setActivityFrames(name: string): boolean;
|
|
863
958
|
listModels(): Promise<readonly LlmModelInfo[]>;
|
|
959
|
+
/** Provider display identities (see the public Channel type). */
|
|
960
|
+
listProviders(): Promise<readonly LlmProviderInfo[]>;
|
|
864
961
|
/** The live agent's skill catalog for `/skills` (see the public Channel type). */
|
|
865
962
|
listSkills(): Promise<readonly SkillInfo[] | undefined>;
|
|
866
963
|
/** Safe credential metadata for `/login` (see the public Channel type). */
|
|
867
964
|
describeCredential(ref: string): Promise<CredentialStatus | undefined>;
|
|
868
965
|
/** `/provider` wizard capabilities (see the public Channel type). */
|
|
869
966
|
providerSetup(): ProviderSetupHost | undefined;
|
|
967
|
+
/** OAuth sign-in states (see the public Channel type). */
|
|
968
|
+
oauthProviderStatuses(): Promise<readonly OAuthProviderStatus[] | undefined>;
|
|
870
969
|
/** `/settings` screen capabilities (see the public Channel type). */
|
|
871
970
|
settingsHost(): SettingsHost | undefined;
|
|
872
971
|
/** Plugin-declared settings sections (see the public Channel type). */
|
|
@@ -942,6 +1041,11 @@ export declare function createChannel(ctx: Context, initialAgent: Agent, options
|
|
|
942
1041
|
thinkingFold?: 'preview' | 'full';
|
|
943
1042
|
/** Tool-card background treatment; default `none`. */
|
|
944
1043
|
toolBackground?: ToolBackground;
|
|
1044
|
+
/** Transcript gutter mode; default `timeline` (settings `dsh-tui.scrollGutter`). */
|
|
1045
|
+
scrollGutter?: ScrollGutterMode;
|
|
1046
|
+
/** Session-name chip on the prompt top border; default off (settings
|
|
1047
|
+
* `dsh-tui.promptSessionLabel`). */
|
|
1048
|
+
promptSessionLabel?: boolean;
|
|
945
1049
|
/** Status-footer field visibility and compactness. */
|
|
946
1050
|
statusBar?: Partial<StatusBarConfig>;
|
|
947
1051
|
/** Show the header's pixel whale art; default on. */
|
|
@@ -960,6 +1064,12 @@ export declare function createChannel(ctx: Context, initialAgent: Agent, options
|
|
|
960
1064
|
* only route a resume overrides the target's own record with. */
|
|
961
1065
|
configuredProvider?: string;
|
|
962
1066
|
configuredModel?: string;
|
|
1067
|
+
/** cordis.yml's raw `lang` key, undefined when unset: `/reload` consults
|
|
1068
|
+
* it so a static deployment choice is never overridden by lang.json. */
|
|
1069
|
+
configuredLang?: string;
|
|
1070
|
+
/** cordis.yml's raw `activityFrames` key, undefined when unset: the
|
|
1071
|
+
* static choice `/reload` must not override. */
|
|
1072
|
+
configuredActivityFrames?: string;
|
|
963
1073
|
/** The preset the initial agent's session runs under (from resolveAgent). */
|
|
964
1074
|
agentPreset?: string;
|
|
965
1075
|
/** Shift+Tab session-mode cycle from cordis.yml `modes`; undefined →
|