@deepseek-harness-tui/dsh-tui 0.6.0 → 0.7.0
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 +74 -21
- package/bin/dsh-tui.js +115 -25
- package/cordis.patch.yml +69 -17
- package/cordis.yml +50 -12
- package/lib/types/activityPrefs.d.ts +1 -1
- package/lib/types/activityPrefs.js +3 -3
- package/lib/types/cc/figures.d.ts +27 -20
- package/lib/types/cc/figures.d.ts.map +1 -1
- package/lib/types/cc/figures.js +43 -34
- package/lib/types/cc/format.d.ts +18 -9
- package/lib/types/cc/format.d.ts.map +1 -1
- package/lib/types/cc/format.js +26 -18
- package/lib/types/cc/markdown.d.ts +31 -16
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +283 -260
- package/lib/types/cc/terminal.d.ts +10 -7
- package/lib/types/cc/terminal.d.ts.map +1 -1
- package/lib/types/cc/terminal.js +62 -50
- package/lib/types/command-trees.d.ts +3 -0
- package/lib/types/command-trees.d.ts.map +1 -0
- package/lib/types/command-trees.js +4 -0
- package/lib/types/commands.d.ts +37 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +68 -3
- package/lib/types/components/ActivityLine.d.ts +1 -1
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.js +3 -4
- package/lib/types/components/BtwPanel.d.ts +16 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -0
- package/lib/types/components/BtwPanel.js +47 -0
- package/lib/types/components/CommandSuggestions.d.ts +4 -2
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +2 -2
- package/lib/types/components/EffortSlider.d.ts +15 -0
- package/lib/types/components/EffortSlider.d.ts.map +1 -0
- package/lib/types/components/EffortSlider.js +17 -0
- package/lib/types/components/GoalTodoPanel.d.ts +1 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.d.ts +5 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +8 -3
- package/lib/types/components/HistorySearchDialog.d.ts +1 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +21 -10
- package/lib/types/components/InterruptedByUser.d.ts +2 -2
- package/lib/types/components/InterruptedByUser.d.ts.map +1 -1
- package/lib/types/components/InterruptedByUser.js +4 -3
- package/lib/types/components/LoadedContextPanel.d.ts +1 -1
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +2 -1
- package/lib/types/components/Markdown.d.ts +11 -11
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +63 -57
- package/lib/types/components/MarkdownTable.d.ts +1 -1
- package/lib/types/components/MarkdownTable.js +2 -2
- package/lib/types/components/MessageList.d.ts +10 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +17 -10
- package/lib/types/components/ModelPicker.d.ts +4 -1
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +16 -4
- package/lib/types/components/OverlayAbove.d.ts +20 -0
- package/lib/types/components/OverlayAbove.d.ts.map +1 -0
- package/lib/types/components/OverlayAbove.js +18 -0
- package/lib/types/components/PresetPicker.d.ts +1 -1
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +2 -3
- package/lib/types/components/PromptInput.d.ts +5 -4
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +186 -39
- package/lib/types/components/ResumePicker.d.ts +15 -4
- package/lib/types/components/ResumePicker.d.ts.map +1 -1
- package/lib/types/components/ResumePicker.js +25 -9
- package/lib/types/components/RewindPicker.d.ts +1 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +14 -5
- package/lib/types/components/SearchBox.d.ts +1 -1
- package/lib/types/components/SearchBox.js +1 -1
- package/lib/types/components/Spinner/GlimmerMessage.d.ts +1 -2
- package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -1
- package/lib/types/components/Spinner/GlimmerMessage.js +1 -2
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +1 -1
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +2 -2
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts +1 -1
- package/lib/types/components/Spinner/SpinnerGlyph.js +1 -1
- package/lib/types/components/Spinner/spinnerUtils.d.ts +13 -18
- package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -1
- package/lib/types/components/Spinner/spinnerUtils.js +67 -71
- package/lib/types/components/Spinner/useStalledAnimation.d.ts +1 -2
- package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -1
- package/lib/types/components/Spinner/useStalledAnimation.js +1 -2
- package/lib/types/components/StreamingMarkdown.d.ts +1 -1
- package/lib/types/components/StreamingMarkdown.js +1 -1
- package/lib/types/components/ThemePicker.d.ts +13 -9
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +21 -15
- package/lib/types/components/ThinkingToggle.d.ts +1 -1
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +8 -8
- package/lib/types/components/ToolUseLoader.d.ts +1 -1
- package/lib/types/components/ToolUseLoader.js +1 -1
- package/lib/types/components/WorkingSpinner.d.ts +2 -2
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/WorkspaceFlowPicker.d.ts +15 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceFlowPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +9 -0
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
- package/lib/types/components/WorkspacePicker.js +13 -0
- package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +2 -1
- package/lib/types/components/design-system/Byline.d.ts +1 -1
- package/lib/types/components/design-system/Byline.js +1 -1
- package/lib/types/components/design-system/Divider.d.ts +1 -1
- package/lib/types/components/design-system/Divider.js +1 -1
- package/lib/types/components/design-system/HintLine.d.ts +12 -0
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
- package/lib/types/components/design-system/HintLine.js +15 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +1 -1
- package/lib/types/components/design-system/KeyboardShortcutHint.js +1 -1
- package/lib/types/components/design-system/ListItem.d.ts +2 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +35 -3
- package/lib/types/components/design-system/LoadingState.d.ts +1 -2
- package/lib/types/components/design-system/LoadingState.d.ts.map +1 -1
- package/lib/types/components/design-system/LoadingState.js +1 -2
- package/lib/types/components/design-system/Pane.d.ts +2 -2
- package/lib/types/components/design-system/Pane.js +2 -2
- package/lib/types/components/design-system/ProgressBar.d.ts +1 -2
- package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -1
- package/lib/types/components/design-system/ProgressBar.js +1 -2
- package/lib/types/components/design-system/StatusIcon.d.ts +2 -2
- package/lib/types/components/design-system/StatusIcon.js +2 -2
- package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +87 -26
- package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
- package/lib/types/components/design-system/ThemedBox.js +1 -1
- package/lib/types/components/design-system/ThemedText.d.ts +2 -2
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/listWindow.d.ts +26 -0
- package/lib/types/components/listWindow.d.ts.map +1 -0
- package/lib/types/components/listWindow.js +47 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts +1 -2
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantTextMessage.js +1 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +6 -6
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +12 -4
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +9 -5
- package/lib/types/components/messages/MessageMetadata.d.ts +1 -1
- package/lib/types/components/messages/MessageMetadata.js +1 -1
- package/lib/types/components/messages/UserPromptMessage.d.ts +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +11 -9
- package/lib/types/components/questions/PlanReviewPanel.d.ts +1 -1
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -2
- package/lib/types/components/trajectory/HotspotView.d.ts +14 -0
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
- package/lib/types/components/trajectory/HotspotView.js +83 -0
- package/lib/types/components/trajectory/Inspector.d.ts +31 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
- package/lib/types/components/trajectory/Inspector.js +67 -0
- package/lib/types/components/trajectory/Ledger.d.ts +20 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
- package/lib/types/components/trajectory/Ledger.js +112 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
- package/lib/types/components/trajectory/MiniWake.js +99 -0
- package/lib/types/components/trajectory/WaveBand.d.ts +33 -0
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
- package/lib/types/components/trajectory/WaveBand.js +145 -0
- package/lib/types/customTheme.d.ts +6 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +15 -12
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
- package/lib/types/{channel.d.ts → dsh-adapter/channel.d.ts} +184 -43
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
- package/lib/types/{channel.js → dsh-adapter/channel.js} +972 -201
- package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
- package/lib/types/{childStderr.js → dsh-adapter/childStderr.js} +1 -1
- package/lib/types/dsh-adapter/command-trees.d.ts +27 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-trees.js +42 -0
- package/lib/types/dsh-adapter/compat/index.d.ts +22 -0
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
- package/lib/types/{compat → dsh-adapter/compat}/index.js +7 -4
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +86 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/sessionLog.js +347 -0
- package/lib/types/dsh-adapter/contract.d.ts +20 -0
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/contract.js +109 -0
- package/lib/types/dsh-adapter/index.d.ts +80 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/index.js +45 -0
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
- package/lib/types/dsh-adapter/packaged-skills.d.ts.map +1 -0
- package/lib/types/{plugin.d.ts → dsh-adapter/plugin.d.ts} +17 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
- package/lib/types/{plugin.js → dsh-adapter/plugin.js} +280 -80
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +91 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerWizard.js +332 -0
- package/lib/types/{questions.d.ts → dsh-adapter/questions.d.ts} +7 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
- package/lib/types/{questions.js → dsh-adapter/questions.js} +15 -7
- package/lib/types/dsh-adapter/sideQuestion.d.ts +38 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sideQuestion.js +69 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +46 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.js +207 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +177 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/guards.js +235 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/index.js +15 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +128 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/projection.js +653 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/types.js +70 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
- package/lib/types/dsh-adapter/types.d.ts +23 -0
- package/lib/types/dsh-adapter/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/types.js +1 -0
- package/lib/types/dsh-adapter/workspace.d.ts +22 -0
- package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspace.js +16 -0
- package/lib/types/dsh-adapter/workspaces.d.ts +118 -0
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspaces.js +290 -0
- package/lib/types/effortPrefs.d.ts +1 -1
- package/lib/types/effortPrefs.js +3 -3
- package/lib/types/history.js +2 -2
- package/lib/types/hooks/useBlink.d.ts +1 -1
- package/lib/types/hooks/useBlink.js +1 -1
- package/lib/types/i18n.d.ts +977 -36
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +307 -30
- package/lib/types/index.d.ts +1 -69
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +3 -31
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +33 -19
- package/lib/types/ink/dom.d.ts +15 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +32 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +8 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts +1 -1
- package/lib/types/ink/hooks/use-terminal-size.js +1 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +109 -28
- package/lib/types/ink/input-suppression.d.ts +20 -0
- package/lib/types/ink/input-suppression.d.ts.map +1 -0
- package/lib/types/ink/input-suppression.js +26 -0
- package/lib/types/ink/log-update.js +21 -6
- package/lib/types/ink/parse-keypress.d.ts +31 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +442 -8
- package/lib/types/ink/terminal-querier.d.ts +5 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +27 -3
- package/lib/types/ink/terminal.d.ts +18 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +32 -4
- package/lib/types/ink/termio/csi.d.ts +10 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +20 -0
- package/lib/types/ink/termio/tokenize.js +10 -0
- package/lib/types/modelPrefs.d.ts +1 -1
- package/lib/types/modelPrefs.js +3 -3
- package/lib/types/presetPrefs.d.ts +1 -1
- package/lib/types/presetPrefs.js +3 -3
- package/lib/types/screens/Chat.d.ts +20 -4
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +655 -55
- package/lib/types/screens/StatusLine.d.ts +17 -2
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +12 -4
- package/lib/types/screens/TrajectoryScene.d.ts +16 -0
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
- package/lib/types/screens/TrajectoryScene.js +305 -0
- package/lib/types/sessionHistory.d.ts +9 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +56 -16
- package/lib/types/sessionModes.d.ts +29 -0
- package/lib/types/sessionModes.d.ts.map +1 -0
- package/lib/types/sessionModes.js +45 -0
- package/lib/types/theme.d.ts +27 -3
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +48 -4
- package/lib/types/themePrefs.d.ts +3 -3
- package/lib/types/themePrefs.js +5 -5
- package/lib/types/trajectory/format.d.ts +100 -0
- package/lib/types/trajectory/format.d.ts.map +1 -0
- package/lib/types/trajectory/format.js +213 -0
- package/lib/types/trajectory/motion.d.ts +99 -0
- package/lib/types/trajectory/motion.d.ts.map +1 -0
- package/lib/types/trajectory/motion.js +143 -0
- package/lib/types/trajectory/query.d.ts +83 -0
- package/lib/types/trajectory/query.d.ts.map +1 -0
- package/lib/types/trajectory/query.js +187 -0
- package/lib/types/trajectoryPrefs.d.ts +36 -0
- package/lib/types/trajectoryPrefs.d.ts.map +1 -0
- package/lib/types/trajectoryPrefs.js +65 -0
- package/lib/types/update.d.ts +3 -3
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +18 -7
- package/lib/types/utils/clipboard.d.ts +101 -29
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +533 -55
- package/lib/types/utils/debug.d.ts +1 -1
- package/lib/types/utils/debug.js +2 -2
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -1
- package/lib/types/utils/execFileNoThrow.js +16 -6
- package/lib/types/utils/externalEditor.d.ts +115 -0
- package/lib/types/utils/externalEditor.d.ts.map +1 -0
- package/lib/types/utils/externalEditor.js +270 -0
- package/lib/types/utils/fullscreen.d.ts +2 -2
- package/lib/types/utils/fullscreen.js +3 -3
- package/lib/types/utils/loaded-context.d.ts +1 -1
- package/lib/types/utils/loaded-context.d.ts.map +1 -1
- package/lib/types/utils/modifiers.d.ts +24 -0
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +27 -0
- package/lib/types/utils/paths.d.ts +45 -0
- package/lib/types/utils/paths.d.ts.map +1 -0
- package/lib/types/utils/paths.js +69 -0
- package/lib/types/utils/shellQuote.d.ts +14 -0
- package/lib/types/utils/shellQuote.d.ts.map +1 -0
- package/lib/types/utils/shellQuote.js +39 -0
- package/lib/types/utils/workspaceRoot.d.ts +21 -0
- package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
- package/lib/types/utils/workspaceRoot.js +47 -0
- package/lib/types/workspaces.d.ts +3 -0
- package/lib/types/workspaces.d.ts.map +1 -0
- package/lib/types/workspaces.js +4 -0
- package/package.json +26 -8
- package/lib/types/approvals.d.ts.map +0 -1
- package/lib/types/channel.d.ts.map +0 -1
- package/lib/types/childStderr.d.ts.map +0 -1
- package/lib/types/compat/index.d.ts +0 -20
- package/lib/types/compat/index.d.ts.map +0 -1
- package/lib/types/compat/sessionLog.d.ts +0 -40
- package/lib/types/compat/sessionLog.d.ts.map +0 -1
- package/lib/types/compat/sessionLog.js +0 -226
- package/lib/types/invariant.d.ts.map +0 -1
- package/lib/types/packaged-skills.d.ts.map +0 -1
- package/lib/types/plugin.d.ts.map +0 -1
- package/lib/types/presets.d.ts.map +0 -1
- package/lib/types/questions.d.ts.map +0 -1
- /package/lib/types/{approvals.d.ts → dsh-adapter/approvals.d.ts} +0 -0
- /package/lib/types/{approvals.js → dsh-adapter/approvals.js} +0 -0
- /package/lib/types/{childStderr.d.ts → dsh-adapter/childStderr.d.ts} +0 -0
- /package/lib/types/{invariant.d.ts → dsh-adapter/invariant.d.ts} +0 -0
- /package/lib/types/{invariant.js → dsh-adapter/invariant.js} +0 -0
- /package/lib/types/{packaged-skills.d.ts → dsh-adapter/packaged-skills.d.ts} +0 -0
- /package/lib/types/{packaged-skills.js → dsh-adapter/packaged-skills.js} +0 -0
- /package/lib/types/{presets.d.ts → dsh-adapter/presets.d.ts} +0 -0
- /package/lib/types/{presets.js → dsh-adapter/presets.js} +0 -0
|
@@ -30,7 +30,7 @@ export type Props = BaseStylesWithoutColors & ThemedColorProps & {
|
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* Theme-aware Box component that resolves theme color keys to raw colors
|
|
33
|
-
* (
|
|
33
|
+
* (in the Claude Code visual language).
|
|
34
34
|
*/
|
|
35
35
|
declare function ThemedBox({ borderColor, borderTopColor, borderBottomColor, borderLeftColor, borderRightColor, backgroundColor, ...rest }: PropsWithChildren<Props>): React.ReactNode;
|
|
36
36
|
export default ThemedBox;
|
|
@@ -16,7 +16,7 @@ function resolveColor(color, theme) {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Theme-aware Box component that resolves theme color keys to raw colors
|
|
19
|
-
* (
|
|
19
|
+
* (in the Claude Code visual language).
|
|
20
20
|
*/
|
|
21
21
|
function ThemedBox({ borderColor, borderTopColor, borderBottomColor, borderLeftColor, borderRightColor, backgroundColor, ...rest }) {
|
|
22
22
|
const [themeName] = useTheme();
|
|
@@ -3,7 +3,7 @@ import type { Color, Styles } from '../../ink/styles.js';
|
|
|
3
3
|
import { type Theme } from '../../theme.js';
|
|
4
4
|
/**
|
|
5
5
|
* Colors uncolored ThemedText in the subtree. Precedence: explicit `color` >
|
|
6
|
-
* this > dimColor (
|
|
6
|
+
* this > dimColor (in the Claude Code visual language, where message rows
|
|
7
7
|
* set it to `text` on hover).
|
|
8
8
|
*/
|
|
9
9
|
export declare const TextHoverColorContext: React.Context<keyof Theme | undefined>;
|
|
@@ -49,7 +49,7 @@ export type Props = {
|
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* Theme-aware Text component that resolves theme color keys to raw colors
|
|
52
|
-
* (
|
|
52
|
+
* (in the Claude Code visual language). This is what lets every ported CC
|
|
53
53
|
* component use `color="subtle"`-style theme keys unchanged.
|
|
54
54
|
*/
|
|
55
55
|
export default function ThemedText({ color, backgroundColor, dimColor, bold, italic, underline, strikethrough, inverse, wrap, children, }: Props): React.ReactNode;
|
|
@@ -5,7 +5,7 @@ import { getTheme } from '../../theme.js';
|
|
|
5
5
|
import { useTheme } from './ThemeProvider.js';
|
|
6
6
|
/**
|
|
7
7
|
* Colors uncolored ThemedText in the subtree. Precedence: explicit `color` >
|
|
8
|
-
* this > dimColor (
|
|
8
|
+
* this > dimColor (in the Claude Code visual language, where message rows
|
|
9
9
|
* set it to `text` on hover).
|
|
10
10
|
*/
|
|
11
11
|
export const TextHoverColorContext = React.createContext(undefined);
|
|
@@ -25,7 +25,7 @@ function resolveColor(color, theme) {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Theme-aware Text component that resolves theme color keys to raw colors
|
|
28
|
-
* (
|
|
28
|
+
* (in the Claude Code visual language). This is what lets every ported CC
|
|
29
29
|
* component use `color="subtle"`-style theme keys unchanged.
|
|
30
30
|
*/
|
|
31
31
|
export default function ThemedText({ color, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = 'wrap', children, }) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 焦点居中的列表窗口:长列表只渲染焦点附近的一段,保证焦点行始终可见。
|
|
3
|
+
* 瞬态面板走 OverlayAbove 零高度浮层后,超高部分会被 overflow 裁掉且焦点
|
|
4
|
+
* 可能落在被裁区(P1 审查实证:30 行终端 30 个模型时焦点在索引 0 完全不
|
|
5
|
+
* 可见),窗口化是硬要求。
|
|
6
|
+
*
|
|
7
|
+
* 按**行**而非项数预算:ListItem 带 description 时占两行(正文 + 描述),
|
|
8
|
+
* 容器还可能有 gap 空行——只数项数会把焦点裁出屏外(二次审查实证:每项
|
|
9
|
+
* 一行描述时索引 0 仍不可见)。调用方须保证每项行高固定(ListItem 对字符
|
|
10
|
+
* 串内容 truncate + 压平换行后恒为 1 + (description ? 1 : 0) 行)。
|
|
11
|
+
*
|
|
12
|
+
* 扩展策略:从焦点项出发向两侧交替扩张,优先补累计行数较少的一侧(焦点
|
|
13
|
+
* 大致居中);任一侧再加会超预算或已到边界时停。焦点项本身超过 maxRows
|
|
14
|
+
* 时仍单独返回焦点项——焦点可见性优先于预算。
|
|
15
|
+
*
|
|
16
|
+
* @param heights - 每项的固定行高(≥1)。
|
|
17
|
+
* @param focusIndex - 键盘焦点项下标(越界自动 clamp)。
|
|
18
|
+
* @param maxRows - 列表区可用行数(终端高减去浮层预留与面板框架行)。
|
|
19
|
+
* @param gap - 相邻项之间的空行数(容器 gap,如 HistorySearchDialog 的 1)。
|
|
20
|
+
* @returns [start, end) 切片区间。
|
|
21
|
+
*/
|
|
22
|
+
export declare function listWindow(heights: readonly number[], focusIndex: number, maxRows: number, gap?: number): {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=listWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listWindow.d.ts","sourceRoot":"","sources":["../../../src/components/listWindow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,GAAG,SAAI,GACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAsBhC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 焦点居中的列表窗口:长列表只渲染焦点附近的一段,保证焦点行始终可见。
|
|
3
|
+
* 瞬态面板走 OverlayAbove 零高度浮层后,超高部分会被 overflow 裁掉且焦点
|
|
4
|
+
* 可能落在被裁区(P1 审查实证:30 行终端 30 个模型时焦点在索引 0 完全不
|
|
5
|
+
* 可见),窗口化是硬要求。
|
|
6
|
+
*
|
|
7
|
+
* 按**行**而非项数预算:ListItem 带 description 时占两行(正文 + 描述),
|
|
8
|
+
* 容器还可能有 gap 空行——只数项数会把焦点裁出屏外(二次审查实证:每项
|
|
9
|
+
* 一行描述时索引 0 仍不可见)。调用方须保证每项行高固定(ListItem 对字符
|
|
10
|
+
* 串内容 truncate + 压平换行后恒为 1 + (description ? 1 : 0) 行)。
|
|
11
|
+
*
|
|
12
|
+
* 扩展策略:从焦点项出发向两侧交替扩张,优先补累计行数较少的一侧(焦点
|
|
13
|
+
* 大致居中);任一侧再加会超预算或已到边界时停。焦点项本身超过 maxRows
|
|
14
|
+
* 时仍单独返回焦点项——焦点可见性优先于预算。
|
|
15
|
+
*
|
|
16
|
+
* @param heights - 每项的固定行高(≥1)。
|
|
17
|
+
* @param focusIndex - 键盘焦点项下标(越界自动 clamp)。
|
|
18
|
+
* @param maxRows - 列表区可用行数(终端高减去浮层预留与面板框架行)。
|
|
19
|
+
* @param gap - 相邻项之间的空行数(容器 gap,如 HistorySearchDialog 的 1)。
|
|
20
|
+
* @returns [start, end) 切片区间。
|
|
21
|
+
*/
|
|
22
|
+
export function listWindow(heights, focusIndex, maxRows, gap = 0) {
|
|
23
|
+
if (heights.length === 0)
|
|
24
|
+
return { start: 0, end: 0 };
|
|
25
|
+
const focus = Math.min(Math.max(focusIndex, 0), heights.length - 1);
|
|
26
|
+
let start = focus;
|
|
27
|
+
let end = focus + 1;
|
|
28
|
+
let upUsed = 0;
|
|
29
|
+
let downUsed = 0;
|
|
30
|
+
for (;;) {
|
|
31
|
+
const up = start > 0 ? gap + heights[start - 1] : Number.POSITIVE_INFINITY;
|
|
32
|
+
const down = end < heights.length ? gap + heights[end] : Number.POSITIVE_INFINITY;
|
|
33
|
+
const used = heights[focus] + upUsed + downUsed;
|
|
34
|
+
const canUp = used + up <= maxRows;
|
|
35
|
+
const canDown = used + down <= maxRows;
|
|
36
|
+
if (!canUp && !canDown)
|
|
37
|
+
return { start, end };
|
|
38
|
+
if (canUp && (!canDown || upUsed <= downUsed)) {
|
|
39
|
+
start -= 1;
|
|
40
|
+
upUsed += up;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
end += 1;
|
|
44
|
+
downUsed += down;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -10,8 +10,7 @@ type Props = {
|
|
|
10
10
|
onClick?(): void;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* Assistant text message: bullet + markdown body (
|
|
14
|
-
* leak's default branch).
|
|
13
|
+
* Assistant text message: bullet + markdown body (mirroring Claude Code's default branch).
|
|
15
14
|
*/
|
|
16
15
|
export declare function AssistantTextMessage({ text, addMargin, isSelected, isExpanded, onClick, }: Props): React.ReactNode;
|
|
17
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantTextMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantTextMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAA;IAClB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,IAAI,IAAI,CAAA;CACjB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"AssistantTextMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantTextMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAA;IAClB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,IAAI,IAAI,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,SAAS,EACT,UAAkB,EAClB,UAAkB,EAClB,OAAO,GACR,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CA2BzB"}
|
|
@@ -3,8 +3,7 @@ import { Box, NoSelect, Text } from '../../ui.js';
|
|
|
3
3
|
import { BLACK_CIRCLE } from '../../cc/figures.js';
|
|
4
4
|
import { Markdown } from '../Markdown.js';
|
|
5
5
|
/**
|
|
6
|
-
* Assistant text message: bullet + markdown body (
|
|
7
|
-
* leak's default branch).
|
|
6
|
+
* Assistant text message: bullet + markdown body (mirroring Claude Code's default branch).
|
|
8
7
|
*/
|
|
9
8
|
export function AssistantTextMessage({ text, addMargin, isSelected = false, isExpanded = false, onClick, }) {
|
|
10
9
|
return (_jsx(Box, { alignItems: "flex-start", flexDirection: "row", justifyContent: "space-between", marginTop: addMargin ? 1 : 0, width: "100%", backgroundColor: isSelected
|
|
@@ -13,8 +13,8 @@ type Props = {
|
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Thinking block: folded `∴ Thinking (ctrl+o to expand)`, expanded shows the
|
|
16
|
-
* full reasoning text indented under `∴ Thinking
|
|
17
|
-
* `messages/AssistantThinkingMessage.tsx
|
|
16
|
+
* full reasoning text indented under `∴ Thinking…`, mirroring Claude Code's
|
|
17
|
+
* `messages/AssistantThinkingMessage.tsx`. When the channel records the
|
|
18
18
|
* reasoning duration, the label carries it (`∴ Thinking · 12s …`) — dsh-tui's
|
|
19
19
|
* take on making thinking time visible in the transcript.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantThinkingMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantThinkingMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAA;IAClB,2EAA2E;IAC3E,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,IAAI,IAAI,CAAA;CACjB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,EACV,UAAkB,EAClB,OAAO,GACR,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"AssistantThinkingMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantThinkingMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAA;IAClB,2EAA2E;IAC3E,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,IAAI,IAAI,CAAA;CACjB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,EACV,UAAkB,EAClB,OAAO,GACR,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CAuCzB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from '../../ui.js';
|
|
3
|
-
import {
|
|
3
|
+
import { t } from '../../i18n.js';
|
|
4
4
|
import { Markdown } from '../Markdown.js';
|
|
5
5
|
import { formatDuration } from '../../cc/format.js';
|
|
6
6
|
/**
|
|
7
7
|
* Thinking block: folded `∴ Thinking (ctrl+o to expand)`, expanded shows the
|
|
8
|
-
* full reasoning text indented under `∴ Thinking
|
|
9
|
-
* `messages/AssistantThinkingMessage.tsx
|
|
8
|
+
* full reasoning text indented under `∴ Thinking…`, mirroring Claude Code's
|
|
9
|
+
* `messages/AssistantThinkingMessage.tsx`. When the channel records the
|
|
10
10
|
* reasoning duration, the label carries it (`∴ Thinking · 12s …`) — dsh-tui's
|
|
11
11
|
* take on making thinking time visible in the transcript.
|
|
12
12
|
*/
|
|
@@ -17,7 +17,7 @@ export function AssistantThinkingMessage({ thinking, addMargin, verbose, duratio
|
|
|
17
17
|
? ` · ${formatDuration(durationMs)}`
|
|
18
18
|
: '';
|
|
19
19
|
if (!verbose) {
|
|
20
|
-
return (_jsx(Box, { marginTop: addMargin ? 1 : 0, backgroundColor: isSelected ? 'messageActionsBackground' : undefined, onClick: onClick, children: _jsxs(Text, { dimColor: true, italic: true, children: ["\u2234
|
|
20
|
+
return (_jsx(Box, { marginTop: addMargin ? 1 : 0, backgroundColor: isSelected ? 'messageActionsBackground' : undefined, onClick: onClick, children: _jsxs(Text, { dimColor: true, italic: true, children: ["\u2234 ", t('thinking-label'), duration, " ", t('hint-expand-ctrl-o')] }) }));
|
|
21
21
|
}
|
|
22
|
-
return (_jsxs(Box, { flexDirection: "column", gap: 1, marginTop: addMargin ? 1 : 0, width: "100%", backgroundColor: isSelected ? 'messageActionsBackground' : undefined, onClick: onClick, children: [_jsxs(Text, { dimColor: true, italic: true, children: ["\u2234
|
|
22
|
+
return (_jsxs(Box, { flexDirection: "column", gap: 1, marginTop: addMargin ? 1 : 0, width: "100%", backgroundColor: isSelected ? 'messageActionsBackground' : undefined, onClick: onClick, children: [_jsxs(Text, { dimColor: true, italic: true, children: ["\u2234 ", t('thinking-label'), duration, "\u2026"] }), _jsx(Box, { paddingLeft: 2, children: _jsx(Markdown, { dimColor: true, children: thinking }) })] }));
|
|
23
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ToolRow } from '../../channel.js';
|
|
2
|
+
import type { ToolRow } from '../../dsh-adapter/channel.js';
|
|
3
3
|
type Props = {
|
|
4
4
|
tool: ToolRow;
|
|
5
5
|
/** Adds the top margin between messages (CC: addMargin). */
|
|
@@ -10,14 +10,22 @@ type Props = {
|
|
|
10
10
|
isSelected?: boolean;
|
|
11
11
|
/** Row expanded on its own (persistent hover-grey background, CC). */
|
|
12
12
|
isExpanded?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Trajectory pointer, rendered as one more `⎿` line under a failed call.
|
|
15
|
+
*
|
|
16
|
+
* It appears on the NEWEST unseen failure only, so a session with a dozen
|
|
17
|
+
* failed calls still shows exactly one pointer — the moment of failure is
|
|
18
|
+
* where the trajectory is worth mentioning, and mentioning it twelve times
|
|
19
|
+
* is worth less than mentioning it once.
|
|
20
|
+
*/
|
|
21
|
+
footnote?: string;
|
|
13
22
|
};
|
|
14
23
|
/**
|
|
15
24
|
* Tool-call card: `● Edit /path` header with a blinking status dot, then the
|
|
16
25
|
* structured body under a ` ⎿ ` gutter — diff hunks in red/green, terminal
|
|
17
|
-
* output, read content — instead of the raw result dump (
|
|
18
|
-
* leak's `AssistantToolUseMessage.tsx` + the dsh-tools presentation views the
|
|
26
|
+
* output, read content — instead of the raw result dump (mirroring Claude Code's `AssistantToolUseMessage.tsx` + the dsh-tools presentation views the
|
|
19
27
|
* channel captures per call).
|
|
20
28
|
*/
|
|
21
|
-
export declare function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected, isExpanded, }: Props): React.ReactNode;
|
|
29
|
+
export declare function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected, isExpanded, footnote, }: Props): React.ReactNode;
|
|
22
30
|
export {};
|
|
23
31
|
//# sourceMappingURL=AssistantToolUseMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAA8C,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AssistantToolUseMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantToolUseMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAA8C,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAIvG,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAA;IACb,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAA;IAChB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAsMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,SAAS,EACT,OAAO,EACP,UAAkB,EAClB,UAAkB,EAClB,QAAQ,GACT,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CAwGzB"}
|
|
@@ -160,11 +160,10 @@ function HeaderTitle({ name, title, isTerminal, displayArgs }) {
|
|
|
160
160
|
/**
|
|
161
161
|
* Tool-call card: `● Edit /path` header with a blinking status dot, then the
|
|
162
162
|
* structured body under a ` ⎿ ` gutter — diff hunks in red/green, terminal
|
|
163
|
-
* output, read content — instead of the raw result dump (
|
|
164
|
-
* leak's `AssistantToolUseMessage.tsx` + the dsh-tools presentation views the
|
|
163
|
+
* output, read content — instead of the raw result dump (mirroring Claude Code's `AssistantToolUseMessage.tsx` + the dsh-tools presentation views the
|
|
165
164
|
* channel captures per call).
|
|
166
165
|
*/
|
|
167
|
-
export function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected = false, isExpanded = false, }) {
|
|
166
|
+
export function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected = false, isExpanded = false, footnote, }) {
|
|
168
167
|
const isRunning = tool.status === 'running';
|
|
169
168
|
const isError = tool.status === 'error';
|
|
170
169
|
const displayArgs = verbose ? tool.argsFull ?? tool.argsText : tool.argsText;
|
|
@@ -205,16 +204,21 @@ export function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected =
|
|
|
205
204
|
}
|
|
206
205
|
}
|
|
207
206
|
const cap = view?.card === 'diff' ? DIFF_BODY_MAX_LINES : TEXT_BODY_MAX_LINES;
|
|
207
|
+
// The footnote rides OUTSIDE the cap: it is a pointer, not content, and a
|
|
208
|
+
// long error body must not be the reason it disappears.
|
|
208
209
|
const lines = capLines(body, cap, verbose);
|
|
210
|
+
const rendered = footnote === undefined ? lines : [...lines, { text: footnote, tone: 'hint' }];
|
|
209
211
|
return (_jsx(Box, { ref: viewportRef, flexDirection: "row", justifyContent: "space-between", marginTop: addMargin ? 1 : 0, width: "100%", backgroundColor: isSelected
|
|
210
212
|
? 'messageActionsBackground'
|
|
211
213
|
: isExpanded
|
|
212
214
|
? 'userMessageBackgroundHover'
|
|
213
|
-
: undefined, children: _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsxs(Box, { flexDirection: "row", flexWrap: "nowrap", minWidth: minWidth, children: [_jsx(ToolUseLoader, { shouldAnimate: isRunning, isUnresolved: isRunning, isError: isError }), _jsx(HeaderTitle, { name: name, title: headerTitle, isTerminal: headerIsTerminal, displayArgs: displayArgs }), !isRunning && (_jsx(Box, { flexWrap: "nowrap", children: _jsx(Text, { dimColor: true, children: elapsedText }) }))] }),
|
|
215
|
+
: undefined, children: _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsxs(Box, { flexDirection: "row", flexWrap: "nowrap", minWidth: minWidth, children: [_jsx(ToolUseLoader, { shouldAnimate: isRunning, isUnresolved: isRunning, isError: isError }), _jsx(HeaderTitle, { name: name, title: headerTitle, isTerminal: headerIsTerminal, displayArgs: displayArgs }), !isRunning && (_jsx(Box, { flexWrap: "nowrap", children: _jsx(Text, { dimColor: true, children: elapsedText }) }))] }), rendered.map((line, index) => (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: 5, flexShrink: 0, children: _jsx(Text, { dimColor: true, children: index === 0 ? GUTTER_FIRST : GUTTER_REST }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { color: line.tone === 'add'
|
|
214
216
|
? 'diffAddedWord'
|
|
215
217
|
: line.tone === 'del'
|
|
216
218
|
? 'diffRemovedWord'
|
|
217
219
|
: line.tone === 'error'
|
|
218
220
|
? 'error'
|
|
219
|
-
:
|
|
221
|
+
: line.tone === 'hint'
|
|
222
|
+
? 'subtle'
|
|
223
|
+
: undefined, dimColor: line.tone === 'dim', wrap: "wrap", children: line.text === '' ? ' ' : line.text }) })] }, index)))] }) }));
|
|
220
224
|
}
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Transcript-mode metadata row: `HH:MM · model`, right-aligned above the
|
|
10
|
-
* assistant text
|
|
10
|
+
* assistant text, mirroring Claude Code's MessageTimestamp + MessageModel,
|
|
11
11
|
* collapsed into one row).
|
|
12
12
|
*/
|
|
13
13
|
export declare function MessageMetadata({ timestamp, model, }: Props): React.ReactNode;
|
|
@@ -4,7 +4,7 @@ import Text from '../../ink/components/Text.js';
|
|
|
4
4
|
import { stringWidth } from '../../ink/stringWidth.js';
|
|
5
5
|
/**
|
|
6
6
|
* Transcript-mode metadata row: `HH:MM · model`, right-aligned above the
|
|
7
|
-
* assistant text
|
|
7
|
+
* assistant text, mirroring Claude Code's MessageTimestamp + MessageModel,
|
|
8
8
|
* collapsed into one row).
|
|
9
9
|
*/
|
|
10
10
|
export function MessageMetadata({ timestamp, model, }) {
|
|
@@ -11,7 +11,7 @@ type Props = {
|
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* User prompt bubble: `❯ text` on the theme's userMessageBackground grey
|
|
14
|
-
* (
|
|
14
|
+
* (mirroring Claude Code's `messages/UserPromptMessage.tsx` +
|
|
15
15
|
* `HighlightedThinkingText.tsx`, with the ultrathink rainbow removed).
|
|
16
16
|
*/
|
|
17
17
|
export declare function UserPromptMessage({ text, addMargin, isSelected, isExpanded, onClick, }: Props): React.ReactNode;
|
|
@@ -3,7 +3,7 @@ import { Box, Text } from '../../ui.js';
|
|
|
3
3
|
import { POINTER } from '../../cc/figures.js';
|
|
4
4
|
/**
|
|
5
5
|
* User prompt bubble: `❯ text` on the theme's userMessageBackground grey
|
|
6
|
-
* (
|
|
6
|
+
* (mirroring Claude Code's `messages/UserPromptMessage.tsx` +
|
|
7
7
|
* `HighlightedThinkingText.tsx`, with the ultrathink rainbow removed).
|
|
8
8
|
*/
|
|
9
9
|
export function UserPromptMessage({ text, addMargin, isSelected = false, isExpanded = false, onClick, }) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* the input row itself and typing gives a pure custom answer.
|
|
13
13
|
*/
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import type { QuestionSelection } from '../../questions.js';
|
|
15
|
+
import type { QuestionSelection } from '../../dsh-adapter/questions.js';
|
|
16
16
|
export type AskUserQuestionPanelProps = {
|
|
17
17
|
/** The question to render (from the QuestionStore snapshot). */
|
|
18
18
|
readonly question: {
|
|
@@ -24,6 +24,10 @@ export type AskUserQuestionPanelProps = {
|
|
|
24
24
|
readonly description?: string;
|
|
25
25
|
}>;
|
|
26
26
|
readonly multiSelect?: boolean;
|
|
27
|
+
/** Hide the trailing free-text input row for pure option questions
|
|
28
|
+
* (local wizards, e.g. /provider). Ignored when there are no options —
|
|
29
|
+
* a text-only question would otherwise be unanswerable. */
|
|
30
|
+
readonly hideCustomInput?: boolean;
|
|
27
31
|
/** Presentation intent tag (rc.6): 'plan-review' switches to the
|
|
28
32
|
* decision-card layout; an intent never changes the protocol. */
|
|
29
33
|
readonly intent?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskUserQuestionPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/AskUserQuestionPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AskUserQuestionPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/AskUserQuestionPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAQvE,MAAM,MAAM,yBAAyB,GAAG;IACtC,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAC3F,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;QAC9B;;oEAE4D;QAC5D,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;QAClC;0EACkE;QAClE,QAAQ,CAAC,MAAM,CAAC,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAA;KAC7E,CAAA;IACD,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACzD,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,yBAAyB,GAAG,KAAK,CAAC,SAAS,CAqT7C"}
|
|
@@ -18,6 +18,7 @@ import { Box, Text, useInput } from '../../ui.js';
|
|
|
18
18
|
import { Divider } from '../design-system/Divider.js';
|
|
19
19
|
import { POINTER } from '../../cc/figures.js';
|
|
20
20
|
import { PlanReviewPanel } from './PlanReviewPanel.js';
|
|
21
|
+
import { isPlainReturnInput } from '../../utils/modifiers.js';
|
|
21
22
|
const CHECKED = '◉';
|
|
22
23
|
const UNCHECKED = '○';
|
|
23
24
|
const PENCIL = '✎';
|
|
@@ -30,8 +31,9 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
30
31
|
}
|
|
31
32
|
const options = question.options ?? [];
|
|
32
33
|
const multiSelect = question.multiSelect === true;
|
|
34
|
+
const hideCustomInput = question.hideCustomInput === true && options.length > 0;
|
|
33
35
|
/** Rows: the real options plus the inline input row at the tail. */
|
|
34
|
-
const rowCount = options.length + 1;
|
|
36
|
+
const rowCount = options.length + (hideCustomInput ? 0 : 1);
|
|
35
37
|
const [focusIndex, setFocusIndex] = React.useState(0);
|
|
36
38
|
const [checked, setChecked] = React.useState(() => new Set());
|
|
37
39
|
const [customText, setCustomText] = React.useState('');
|
|
@@ -40,7 +42,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
40
42
|
* together with the custom text when the input row itself is Entered. */
|
|
41
43
|
const [attached, setAttached] = React.useState(null);
|
|
42
44
|
const [error, setError] = React.useState(null);
|
|
43
|
-
const inputFocused = focusIndex === options.length;
|
|
45
|
+
const inputFocused = !hideCustomInput && focusIndex === options.length;
|
|
44
46
|
const moveFocus = (delta) => {
|
|
45
47
|
if (rowCount <= 1)
|
|
46
48
|
return;
|
|
@@ -119,7 +121,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
119
121
|
moveFocus(1);
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
122
|
-
if (key
|
|
124
|
+
if (isPlainReturnInput(input, key)) {
|
|
123
125
|
submitInput();
|
|
124
126
|
return;
|
|
125
127
|
}
|
|
@@ -170,7 +172,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
170
172
|
moveFocus(1);
|
|
171
173
|
return;
|
|
172
174
|
}
|
|
173
|
-
if (key.tab) {
|
|
175
|
+
if (key.tab && !hideCustomInput) {
|
|
174
176
|
setFocusIndex(options.length);
|
|
175
177
|
setError(null);
|
|
176
178
|
return;
|
|
@@ -186,19 +188,19 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
186
188
|
});
|
|
187
189
|
return;
|
|
188
190
|
}
|
|
189
|
-
if (key
|
|
191
|
+
if (isPlainReturnInput(input, key)) {
|
|
190
192
|
submitOptions();
|
|
191
193
|
return;
|
|
192
194
|
}
|
|
193
195
|
if (key.backspace) {
|
|
194
196
|
// Edit the input row without leaving the option list.
|
|
195
|
-
if (customText !== '')
|
|
197
|
+
if (!hideCustomInput && customText !== '')
|
|
196
198
|
backspaceText();
|
|
197
199
|
return;
|
|
198
200
|
}
|
|
199
201
|
// Typing on an option appends into the input row; single-select also
|
|
200
202
|
// attaches this option's label so Enter carries label + text (#9).
|
|
201
|
-
if (!key.ctrl && !key.meta && !key.super && input) {
|
|
203
|
+
if (!hideCustomInput && !key.ctrl && !key.meta && !key.super && input) {
|
|
202
204
|
appendText(input);
|
|
203
205
|
if (!multiSelect)
|
|
204
206
|
setAttached(options[focusIndex]?.label ?? null);
|
|
@@ -214,7 +216,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
214
216
|
const focused = index === focusIndex;
|
|
215
217
|
const selected = multiSelect ? checked.has(index) : focused;
|
|
216
218
|
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 : ' ' }) }), _jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { color: focused ? 'claude' : undefined, bold: selected, children: selected ? (multiSelect ? CHECKED : '●') : UNCHECKED }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 1, children: [_jsx(Text, { bold: focused || selected, color: focused ? 'claude' : undefined, wrap: "wrap", children: option.label }), option.description !== undefined && (_jsx(Text, { dimColor: true, wrap: "wrap", children: option.description }))] })] }, option.label));
|
|
217
|
-
}), renderInputRow()] }));
|
|
219
|
+
}), hideCustomInput ? null : renderInputRow()] }));
|
|
218
220
|
const hintParts = inputFocused
|
|
219
221
|
? [
|
|
220
222
|
t('question-hint-type'),
|
|
@@ -226,7 +228,7 @@ export function AskUserQuestionPanel({ question, position, total, answered, onAn
|
|
|
226
228
|
: [
|
|
227
229
|
t('question-hint-select'),
|
|
228
230
|
...(multiSelect ? [t('question-hint-multi')] : []),
|
|
229
|
-
t('question-hint-attach'),
|
|
231
|
+
...(hideCustomInput ? [] : [t('question-hint-attach')]),
|
|
230
232
|
t('question-hint-enter'),
|
|
231
233
|
t('question-hint-esc'),
|
|
232
234
|
...(multiSelect && checked.size > 0 ? [t('question-hint-selected', { n: checked.size })] : []),
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* reads as "the user dismissed the review to speak instead".
|
|
16
16
|
*/
|
|
17
17
|
import React from 'react';
|
|
18
|
-
import type { QuestionSelection } from '../../questions.js';
|
|
18
|
+
import type { QuestionSelection } from '../../dsh-adapter/questions.js';
|
|
19
19
|
export type PlanReviewPanelProps = {
|
|
20
20
|
/** The plan-review question (intent.kind === 'plan-review'). */
|
|
21
21
|
readonly question: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanReviewPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/PlanReviewPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PlanReviewPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/questions/PlanReviewPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,MAAM,MAAM,oBAAoB,GAAG;IACjC,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;YAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAC3F,QAAQ,CAAC,MAAM,CAAC,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAA;KAC7E,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACzD,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAgOxC"}
|
|
@@ -21,6 +21,7 @@ import { Box, Text, useInput } from '../../ui.js';
|
|
|
21
21
|
import { Divider } from '../design-system/Divider.js';
|
|
22
22
|
import { Markdown } from '../Markdown.js';
|
|
23
23
|
import { POINTER } from '../../cc/figures.js';
|
|
24
|
+
import { isPlainReturnInput } from '../../utils/modifiers.js';
|
|
24
25
|
const PENCIL = '✎';
|
|
25
26
|
export function PlanReviewPanel({ question, onAnswer, onCancel, }) {
|
|
26
27
|
const options = question.options ?? [];
|
|
@@ -91,7 +92,7 @@ export function PlanReviewPanel({ question, onAnswer, onCancel, }) {
|
|
|
91
92
|
moveFocus(1);
|
|
92
93
|
return;
|
|
93
94
|
}
|
|
94
|
-
if (key
|
|
95
|
+
if (isPlainReturnInput(input, key)) {
|
|
95
96
|
submitFeedback();
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
@@ -137,7 +138,7 @@ export function PlanReviewPanel({ question, onAnswer, onCancel, }) {
|
|
|
137
138
|
moveFocus(1);
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
|
-
if (key
|
|
141
|
+
if (isPlainReturnInput(input, key)) {
|
|
141
142
|
submitOption(focusIndex);
|
|
142
143
|
return;
|
|
143
144
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HotspotRow, HotspotSort, TrajAggregate } from '../../dsh-adapter/types.js';
|
|
3
|
+
/** Flatten the three sections into the single list the cursor walks. */
|
|
4
|
+
export declare function hotspotRows(agg: TrajAggregate): HotspotRow[];
|
|
5
|
+
export declare function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, }: {
|
|
6
|
+
agg: TrajAggregate;
|
|
7
|
+
sort: HotspotSort;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
cursor: number;
|
|
11
|
+
tick: number;
|
|
12
|
+
switchTick: number;
|
|
13
|
+
}): React.ReactNode;
|
|
14
|
+
//# sourceMappingURL=HotspotView.d.ts.map
|
|
@@ -0,0 +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;CACnB,GAAG,KAAK,CAAC,SAAS,CA4ElB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useTheme } from '../../ui.js';
|
|
3
|
+
import { getTheme } from '../../theme.js';
|
|
4
|
+
import { formatDuration, formatTokens, truncateWidth } from '../../trajectory/format.js';
|
|
5
|
+
import { mix, reproject } from '../../trajectory/motion.js';
|
|
6
|
+
import { t } from '../../i18n.js';
|
|
7
|
+
/**
|
|
8
|
+
* The hotspot view — the session ranked by cost instead of ordered by time.
|
|
9
|
+
*
|
|
10
|
+
* Chronology is the wrong order for "where did my half hour go": the answer is
|
|
11
|
+
* a ranking, and a ranking is what this shows — cost per tool, per model phase
|
|
12
|
+
* (decode vs. waiting for the first token vs. retry backoff), per turn.
|
|
13
|
+
*
|
|
14
|
+
* The three sections are flattened into ONE windowed row list rather than laid
|
|
15
|
+
* out as three independent columns. A long session easily produces more rows
|
|
16
|
+
* than the viewport has lines, and three self-sizing sections in a fixed-height
|
|
17
|
+
* box overlap each other when they overflow — a flat window scrolls instead,
|
|
18
|
+
* and the cursor can reach every row.
|
|
19
|
+
*
|
|
20
|
+
* The reveal is a staggered brightening rather than a growing bar. A bar that
|
|
21
|
+
* grew would change its glyph count every frame, which is a layout change, and
|
|
22
|
+
* layout changes are the one thing the motion rules forbid. Sweeping colour
|
|
23
|
+
* across already-final bars reads the same and costs style bytes.
|
|
24
|
+
*/
|
|
25
|
+
/** Bar cells; a half block gives one extra step of resolution for free. */
|
|
26
|
+
const FULL = '█';
|
|
27
|
+
const HALF = '▌';
|
|
28
|
+
function bar(value, max, width) {
|
|
29
|
+
if (max <= 0 || width <= 0)
|
|
30
|
+
return '';
|
|
31
|
+
const exact = (value / max) * width;
|
|
32
|
+
const full = Math.max(0, Math.min(width, Math.floor(exact)));
|
|
33
|
+
return FULL.repeat(full) + (exact - full >= 0.5 && full < width ? HALF : '');
|
|
34
|
+
}
|
|
35
|
+
/** Flatten the three sections into the single list the cursor walks. */
|
|
36
|
+
export function hotspotRows(agg) {
|
|
37
|
+
return [...agg.tools, ...agg.model, ...agg.turns];
|
|
38
|
+
}
|
|
39
|
+
/** Value a row is ranked by under the active sort. */
|
|
40
|
+
function valueOf(row, sort) {
|
|
41
|
+
return sort === 'count' ? row.count : sort === 'tokens' ? row.tokens : row.totalMs;
|
|
42
|
+
}
|
|
43
|
+
export function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, }) {
|
|
44
|
+
const [themeName] = useTheme();
|
|
45
|
+
const theme = getTheme(themeName);
|
|
46
|
+
const labelWidth = Math.min(18, Math.max(10, Math.floor(width * 0.16)));
|
|
47
|
+
const barWidth = Math.max(6, Math.min(30, width - labelWidth - 34));
|
|
48
|
+
// Build the flat list once, tagging each row with its section's scale.
|
|
49
|
+
const entries = [];
|
|
50
|
+
let cursorIndex = 0;
|
|
51
|
+
for (const [title, rows, colorKey] of [
|
|
52
|
+
[t('traj-hot-tools'), agg.tools, 'chromeYellow'],
|
|
53
|
+
[t('traj-hot-model'), agg.model, 'autoAccept'],
|
|
54
|
+
[t('traj-hot-turns'), agg.turns, 'professionalBlue'],
|
|
55
|
+
]) {
|
|
56
|
+
if (rows.length === 0)
|
|
57
|
+
continue;
|
|
58
|
+
entries.push({ kind: 'title', text: title });
|
|
59
|
+
const max = Math.max(...rows.map(row => valueOf(row, sort)), 1);
|
|
60
|
+
for (const row of rows) {
|
|
61
|
+
entries.push({ kind: 'row', row, cursorIndex, max, colorKey });
|
|
62
|
+
cursorIndex += 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Window around the cursor's entry so ↑/↓ can reach every section.
|
|
66
|
+
const focusEntry = entries.findIndex(entry => entry.kind === 'row' && entry.cursorIndex === cursor);
|
|
67
|
+
const start = Math.max(0, Math.min(focusEntry - Math.floor(height / 2), entries.length - height));
|
|
68
|
+
const visible = entries.slice(Math.max(0, start), Math.max(0, start) + height);
|
|
69
|
+
return (_jsx(Box, { flexDirection: "column", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: visible.map((entry, offset) => {
|
|
70
|
+
if (entry.kind === 'title') {
|
|
71
|
+
return (_jsx(Box, { width: "100%", height: 1, flexShrink: 0, children: _jsx(Text, { color: "subtle", children: entry.text }) }, `t${offset}`));
|
|
72
|
+
}
|
|
73
|
+
const { row, max, colorKey } = entry;
|
|
74
|
+
const focused = entry.cursorIndex === cursor;
|
|
75
|
+
// Stagger the settle by row so a section reads top-down on switch.
|
|
76
|
+
const dim = reproject(tick - offset, switchTick);
|
|
77
|
+
const base = row.error === true ? theme.error : theme[colorKey];
|
|
78
|
+
const stats = `${row.count}×` +
|
|
79
|
+
(row.tokens > 0 ? ` · ${formatTokens(row.tokens)}` : '') +
|
|
80
|
+
(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, children: [_jsx(Box, { flexShrink: 0, width: 2, children: _jsx(Text, { color: "suggestion", children: focused ? '▸' : ' ' }) }), _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
|
+
}) }));
|
|
83
|
+
}
|