@deepseek-harness-tui/dsh-tui 0.6.1 → 0.7.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 +77 -23
- package/bin/dsh-tui.js +132 -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} +198 -43
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
- package/lib/types/{channel.js → dsh-adapter/channel.js} +1129 -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} +294 -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 +981 -36
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +308 -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 +31 -10
- package/lib/invariant.js +0 -28
- 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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configurable Shift+Tab session modes (the `modes` dsh-tui plugin config):
|
|
3
|
+
* each mode is a named bundle of optional DSH plane switches — plan mode
|
|
4
|
+
* (dsh-plan-mode `/plan`), sandbox mode (dsh-sandbox-policy `sandbox/mode`
|
|
5
|
+
* session events), approval policy (dsh-user-approval `approval/policy`
|
|
6
|
+
* events). An absent atom means "this mode does not touch that plane".
|
|
7
|
+
*/
|
|
8
|
+
import { t } from './i18n.js';
|
|
9
|
+
/** The shipped cycle when cordis.yml pins no `modes` — array order IS the
|
|
10
|
+
* Shift+Tab cycle order; index 0 is the unmarked base mode. */
|
|
11
|
+
export const DEFAULT_SESSION_MODES = [
|
|
12
|
+
{ id: 'default', plan: false, sandbox: 'workspace-write', approval: 'ask' },
|
|
13
|
+
{ id: 'plan', plan: true, sandbox: 'read-only', approval: 'ask' },
|
|
14
|
+
{ id: 'full', plan: false, sandbox: 'danger-full-access', approval: 'never' },
|
|
15
|
+
];
|
|
16
|
+
/** Config → cycle list: undefined/empty → DEFAULT_SESSION_MODES; entries
|
|
17
|
+
* declaring no atom at all are dropped (their ids are returned for the
|
|
18
|
+
* caller to warn about); if nothing survives, DEFAULT_SESSION_MODES. Atom
|
|
19
|
+
* vocabularies are already enforced by the plugin Schema at load, so no
|
|
20
|
+
* value validation happens here. */
|
|
21
|
+
export function resolveSessionModes(raw) {
|
|
22
|
+
if (raw === undefined || raw.length === 0)
|
|
23
|
+
return { modes: DEFAULT_SESSION_MODES, dropped: [] };
|
|
24
|
+
const dropped = [];
|
|
25
|
+
const modes = raw.filter(spec => {
|
|
26
|
+
const usable = spec.plan !== undefined || spec.sandbox !== undefined || spec.approval !== undefined;
|
|
27
|
+
if (!usable)
|
|
28
|
+
dropped.push(spec.id);
|
|
29
|
+
return usable;
|
|
30
|
+
});
|
|
31
|
+
return modes.length === 0 ? { modes: DEFAULT_SESSION_MODES, dropped } : { modes, dropped };
|
|
32
|
+
}
|
|
33
|
+
/** Display name: explicit `label` > built-in i18n (`mode-default`/
|
|
34
|
+
* `mode-plan`/`mode-full` for those ids) > the raw id. */
|
|
35
|
+
export function modeDisplayName(spec) {
|
|
36
|
+
if (spec.label !== undefined)
|
|
37
|
+
return spec.label;
|
|
38
|
+
if (spec.id === 'default')
|
|
39
|
+
return t('mode-default');
|
|
40
|
+
if (spec.id === 'plan')
|
|
41
|
+
return t('mode-plan');
|
|
42
|
+
if (spec.id === 'full')
|
|
43
|
+
return t('mode-full');
|
|
44
|
+
return spec.id;
|
|
45
|
+
}
|
package/lib/types/theme.d.ts
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
* text, accent-soft blues). `dark-ansi` is the 16-color fallback for
|
|
9
9
|
* terminals without truecolor. The active palette is chosen at startup by
|
|
10
10
|
* querying the terminal background (OSC 11) — see ThemeProvider.
|
|
11
|
+
*
|
|
12
|
+
* `auto` is a pseudo-theme, not a palette: it resolves to `light` or `dark`
|
|
13
|
+
* from the terminal background detected via OSC 11 (which tracks the system
|
|
14
|
+
* theme in terminals that follow it). ThemeProvider re-runs detection every
|
|
15
|
+
* time `auto` is selected and pushes the result through setAutoThemeBase(),
|
|
16
|
+
* so getTheme('auto') always serves the currently detected palette.
|
|
11
17
|
*/
|
|
12
18
|
export type Theme = {
|
|
13
19
|
autoAccept: string;
|
|
@@ -82,16 +88,34 @@ export type Theme = {
|
|
|
82
88
|
};
|
|
83
89
|
/** The built-in theme names, in display order. */
|
|
84
90
|
export declare const THEME_NAMES: readonly ["dark", "dark-ansi", "light"];
|
|
91
|
+
/**
|
|
92
|
+
* The `auto` pseudo-theme: not a palette, but a standing request to follow
|
|
93
|
+
* the terminal background (OSC 11, which tracks the system theme in
|
|
94
|
+
* terminals that follow it). Selectable everywhere a theme name is
|
|
95
|
+
* (/theme, DSH_TUI_THEME, ~/.dsh-tui/theme.json); getTheme() resolves it to
|
|
96
|
+
* the last detected `light`/`dark` palette via the auto base below.
|
|
97
|
+
*/
|
|
98
|
+
export declare const AUTO_THEME_NAME = "auto";
|
|
99
|
+
/**
|
|
100
|
+
* Record the palette `auto` should resolve to. Called by ThemeProvider
|
|
101
|
+
* after each terminal-background detection while `auto` is active.
|
|
102
|
+
* @param name - The detected base palette.
|
|
103
|
+
*/
|
|
104
|
+
export declare function setAutoThemeBase(name: 'light' | 'dark'): void;
|
|
105
|
+
/** The palette `auto` currently resolves to (`light` or `dark`). */
|
|
106
|
+
export declare function getAutoThemeBase(): 'light' | 'dark';
|
|
85
107
|
/**
|
|
86
108
|
* Any theme name: a built-in palette (`light`/`dark`/`dark-ansi`) or a user
|
|
87
|
-
* theme from ~/.dsh-
|
|
109
|
+
* theme from ~/.dsh-tui/themes/<name>.json. Always resolvable to a concrete
|
|
88
110
|
* color palette via getTheme() (unknown names fall back to `dark`).
|
|
89
111
|
*/
|
|
90
112
|
export type ThemeName = string;
|
|
91
113
|
/**
|
|
92
114
|
* Resolve a theme name to its concrete color palette.
|
|
93
|
-
* @param themeName - The theme to resolve (built-in or user theme
|
|
94
|
-
*
|
|
115
|
+
* @param themeName - The theme to resolve (built-in, `auto`, or user theme
|
|
116
|
+
* name).
|
|
117
|
+
* @returns The matching palette; `auto` resolves to the detected base
|
|
118
|
+
* (light/dark), unknown names fall back to `dark`.
|
|
95
119
|
*/
|
|
96
120
|
export declare function getTheme(themeName: ThemeName): Theme;
|
|
97
121
|
/**
|
package/lib/types/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme.ts"],"names":[],"mappings":"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"}
|
package/lib/types/theme.js
CHANGED
|
@@ -8,9 +8,43 @@
|
|
|
8
8
|
* text, accent-soft blues). `dark-ansi` is the 16-color fallback for
|
|
9
9
|
* terminals without truecolor. The active palette is chosen at startup by
|
|
10
10
|
* querying the terminal background (OSC 11) — see ThemeProvider.
|
|
11
|
+
*
|
|
12
|
+
* `auto` is a pseudo-theme, not a palette: it resolves to `light` or `dark`
|
|
13
|
+
* from the terminal background detected via OSC 11 (which tracks the system
|
|
14
|
+
* theme in terminals that follow it). ThemeProvider re-runs detection every
|
|
15
|
+
* time `auto` is selected and pushes the result through setAutoThemeBase(),
|
|
16
|
+
* so getTheme('auto') always serves the currently detected palette.
|
|
11
17
|
*/
|
|
12
18
|
/** The built-in theme names, in display order. */
|
|
13
19
|
export const THEME_NAMES = ['dark', 'dark-ansi', 'light'];
|
|
20
|
+
/**
|
|
21
|
+
* The `auto` pseudo-theme: not a palette, but a standing request to follow
|
|
22
|
+
* the terminal background (OSC 11, which tracks the system theme in
|
|
23
|
+
* terminals that follow it). Selectable everywhere a theme name is
|
|
24
|
+
* (/theme, DSH_TUI_THEME, ~/.dsh-tui/theme.json); getTheme() resolves it to
|
|
25
|
+
* the last detected `light`/`dark` palette via the auto base below.
|
|
26
|
+
*/
|
|
27
|
+
export const AUTO_THEME_NAME = 'auto';
|
|
28
|
+
/**
|
|
29
|
+
* The palette `auto` currently resolves to, mirrored module-level so
|
|
30
|
+
* getTheme('auto') works for non-React rendering without a context.
|
|
31
|
+
* ThemeProvider sets this on every detection (startup and runtime switch);
|
|
32
|
+
* defaults to `dark` until the first detection settles (the pre-detection
|
|
33
|
+
* status quo, biased dark for readability).
|
|
34
|
+
*/
|
|
35
|
+
let autoBase = 'dark';
|
|
36
|
+
/**
|
|
37
|
+
* Record the palette `auto` should resolve to. Called by ThemeProvider
|
|
38
|
+
* after each terminal-background detection while `auto` is active.
|
|
39
|
+
* @param name - The detected base palette.
|
|
40
|
+
*/
|
|
41
|
+
export function setAutoThemeBase(name) {
|
|
42
|
+
autoBase = name;
|
|
43
|
+
}
|
|
44
|
+
/** The palette `auto` currently resolves to (`light` or `dark`). */
|
|
45
|
+
export function getAutoThemeBase() {
|
|
46
|
+
return autoBase;
|
|
47
|
+
}
|
|
14
48
|
const rgb = (hex) => {
|
|
15
49
|
const n = parseInt(hex.slice(1), 16);
|
|
16
50
|
return `rgb(${(n >> 16) & 255},${(n >> 8) & 255},${n & 255})`;
|
|
@@ -170,9 +204,9 @@ const lightTheme = {
|
|
|
170
204
|
};
|
|
171
205
|
/**
|
|
172
206
|
* Dark ANSI theme using only the 16 standard ANSI colors, for terminals
|
|
173
|
-
* without true color support (verbatim from
|
|
207
|
+
* without true color support (verbatim from Claude Code).
|
|
174
208
|
*
|
|
175
|
-
* User themes (JSON files in ~/.dsh-
|
|
209
|
+
* User themes (JSON files in ~/.dsh-tui/themes/) overlay one of these three
|
|
176
210
|
* bases — see customTheme.ts. `getTheme` resolves them through a resolver
|
|
177
211
|
* registered by ThemeProvider.
|
|
178
212
|
*/
|
|
@@ -249,15 +283,25 @@ const darkAnsiTheme = {
|
|
|
249
283
|
};
|
|
250
284
|
/**
|
|
251
285
|
* Resolve a theme name to its concrete color palette.
|
|
252
|
-
* @param themeName - The theme to resolve (built-in or user theme
|
|
253
|
-
*
|
|
286
|
+
* @param themeName - The theme to resolve (built-in, `auto`, or user theme
|
|
287
|
+
* name).
|
|
288
|
+
* @returns The matching palette; `auto` resolves to the detected base
|
|
289
|
+
* (light/dark), unknown names fall back to `dark`.
|
|
254
290
|
*/
|
|
255
291
|
export function getTheme(themeName) {
|
|
256
292
|
switch (themeName) {
|
|
257
293
|
case 'light':
|
|
258
294
|
return lightTheme;
|
|
295
|
+
// `dark` is an explicit case (not the default): built-in bases must
|
|
296
|
+
// resolve without touching the custom-theme resolver — parseCustomTheme
|
|
297
|
+
// calls getTheme(base) while the resolver may still be indexing, and a
|
|
298
|
+
// resolver round-trip there re-enters theme-file parsing recursively.
|
|
299
|
+
case 'dark':
|
|
300
|
+
return darkTheme;
|
|
259
301
|
case 'dark-ansi':
|
|
260
302
|
return darkAnsiTheme;
|
|
303
|
+
case AUTO_THEME_NAME:
|
|
304
|
+
return autoBase === 'light' ? lightTheme : darkTheme;
|
|
261
305
|
default:
|
|
262
306
|
return customThemeResolver?.(themeName) ?? darkTheme;
|
|
263
307
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted color-theme preference. The `/theme` choice (built-in palette
|
|
3
|
-
* or user theme name) survives restarts in `~/.dsh-
|
|
4
|
-
* the working-activity preference (`~/.dsh-
|
|
3
|
+
* or user theme name) survives restarts in `~/.dsh-tui/theme.json`, mirroring
|
|
4
|
+
* the working-activity preference (`~/.dsh-tui/working-activity.json`). The
|
|
5
5
|
* file is best-effort: a missing or corrupt file just falls back to the
|
|
6
6
|
* default (terminal-background auto-detection). The preference only wins
|
|
7
|
-
* when
|
|
7
|
+
* when DSH_TUI_THEME is unset — see ThemeProvider.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Parse a persisted `{ theme }` value; anything else yields undefined.
|
package/lib/types/themePrefs.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Persisted color-theme preference. The `/theme` choice (built-in palette
|
|
3
|
-
* or user theme name) survives restarts in `~/.dsh-
|
|
4
|
-
* the working-activity preference (`~/.dsh-
|
|
3
|
+
* or user theme name) survives restarts in `~/.dsh-tui/theme.json`, mirroring
|
|
4
|
+
* the working-activity preference (`~/.dsh-tui/working-activity.json`). The
|
|
5
5
|
* file is best-effort: a missing or corrupt file just falls back to the
|
|
6
6
|
* default (terminal-background auto-detection). The preference only wins
|
|
7
|
-
* when
|
|
7
|
+
* when DSH_TUI_THEME is unset — see ThemeProvider.
|
|
8
8
|
*/
|
|
9
9
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
|
-
import { homedir } from 'node:os';
|
|
11
10
|
import { join } from 'node:path';
|
|
12
11
|
import { isSafeThemeName } from './customTheme.js';
|
|
13
|
-
|
|
12
|
+
import { DATA_DIR } from './utils/paths.js';
|
|
13
|
+
const PREFS_DIR = DATA_DIR;
|
|
14
14
|
/**
|
|
15
15
|
* Parse a persisted `{ theme }` value; anything else yields undefined.
|
|
16
16
|
* @param text - Raw file contents.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory formatting — durations, clocks, badges and heat.
|
|
3
|
+
*
|
|
4
|
+
* Presentation only, and deliberately in the UI layer rather than beside the
|
|
5
|
+
* projection: these decisions are about a terminal's width and palette, not
|
|
6
|
+
* about what the session log means.
|
|
7
|
+
*/
|
|
8
|
+
import type { Theme } from '../theme.js';
|
|
9
|
+
import type { TrajKind } from '../dsh-adapter/types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Truncate to a terminal DISPLAY width, CJK-aware (a wide char costs two
|
|
12
|
+
* columns). Used where the caller must control the cut precisely: Ink's own
|
|
13
|
+
* `wrap="truncate"` appends its ellipsis as soon as the content is as wide as
|
|
14
|
+
* its box rather than wider, which silently eats the last character of a
|
|
15
|
+
* right-aligned group that was laid out at exactly its natural width.
|
|
16
|
+
*
|
|
17
|
+
* @param text - Plain text (no ANSI).
|
|
18
|
+
* @param maxWidth - Column budget, ellipsis included.
|
|
19
|
+
* @returns `text` unchanged when it fits, otherwise a cut ending in `…`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function truncateWidth(text: string, maxWidth: number): string;
|
|
22
|
+
/** `HH:MM:SS` local wall-clock of an epoch-ms timestamp. */
|
|
23
|
+
export declare function formatClock(time: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Compact duration: `82ms` / `1.4s` / `2m05s` / `1h04m`.
|
|
26
|
+
*
|
|
27
|
+
* Every form is at most six columns wide, so the ledger's duration column
|
|
28
|
+
* never reflows when a fast call is followed by a slow one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatDuration(ms: number): string;
|
|
31
|
+
/** Compact token count: `840` / `12.4k` / `1.1M`. */
|
|
32
|
+
export declare function formatTokens(count: number): string;
|
|
33
|
+
/**
|
|
34
|
+
* Heat colour for a duration cell.
|
|
35
|
+
*
|
|
36
|
+
* The point of the ledger is usually to find the slow thing, so the duration
|
|
37
|
+
* column encodes magnitude as colour: anything under a second recedes, tens
|
|
38
|
+
* of seconds warn, minutes shout. Reading a column of numbers is work; seeing
|
|
39
|
+
* one red cell is not.
|
|
40
|
+
*/
|
|
41
|
+
export declare function heatColor(ms: number | undefined): keyof Theme;
|
|
42
|
+
/**
|
|
43
|
+
* Cost glyph for a row's own duration — an ABSOLUTE, learnable scale.
|
|
44
|
+
*
|
|
45
|
+
* A relative scale (tallest row in view = full block) would re-teach itself on
|
|
46
|
+
* every scroll; fixed thresholds mean `█` always says "over a minute" and `▁`
|
|
47
|
+
* always says "instant", so after one session the column is read without
|
|
48
|
+
* looking at the number beside it. Each step is roughly half an order of
|
|
49
|
+
* magnitude, which is the resolution a human actually acts on.
|
|
50
|
+
*/
|
|
51
|
+
export declare function costGlyph(ms: number | undefined): string;
|
|
52
|
+
/**
|
|
53
|
+
* Fixed-width badge text per row kind — six columns, including one cell of
|
|
54
|
+
* padding on each side.
|
|
55
|
+
*
|
|
56
|
+
* The padding is what turns a coloured word into a pill. Background colour
|
|
57
|
+
* flush against the glyphs reads as a highlighter smudge; a cell of ground on
|
|
58
|
+
* either side reads as a chip, and chips are what let the eye group forty rows
|
|
59
|
+
* by kind without reading any of them.
|
|
60
|
+
*/
|
|
61
|
+
export declare const KIND_BADGE: Record<TrajKind, string>;
|
|
62
|
+
/** One-character badge for the narrowest layout tier. */
|
|
63
|
+
export declare const KIND_GLYPH: Record<TrajKind, string>;
|
|
64
|
+
/**
|
|
65
|
+
* Badge foreground per kind. Backgrounds come from {@link KIND_BADGE_BG} — the
|
|
66
|
+
* pair reads as a pill, which carries far better in a dense ledger than
|
|
67
|
+
* coloured text alone.
|
|
68
|
+
*/
|
|
69
|
+
export declare const KIND_FG: Record<TrajKind, keyof Theme>;
|
|
70
|
+
/**
|
|
71
|
+
* Badge background per kind, or `undefined` for kinds that read better
|
|
72
|
+
* unfilled (structural rows, which should recede behind the work rows).
|
|
73
|
+
*/
|
|
74
|
+
export declare const KIND_BADGE_BG: Partial<Record<TrajKind, keyof Theme>>;
|
|
75
|
+
/**
|
|
76
|
+
* Ledger column budget at a given terminal width.
|
|
77
|
+
*
|
|
78
|
+
* Columns are dropped whole rather than letting a row wrap: a wrapped ledger
|
|
79
|
+
* row destroys the alignment that makes the whole view scannable, so at every
|
|
80
|
+
* tier the row is still exactly one line.
|
|
81
|
+
*/
|
|
82
|
+
export interface LedgerLayout {
|
|
83
|
+
/** Width of the badge column: 6 (padded pill), 1 (bare glyph). */
|
|
84
|
+
readonly badge: 6 | 1;
|
|
85
|
+
/** Show the `#N` index column. */
|
|
86
|
+
readonly index: boolean;
|
|
87
|
+
/** Show the `→ result` preview. */
|
|
88
|
+
readonly outcome: boolean;
|
|
89
|
+
/** Characters available to the label + detail preview. */
|
|
90
|
+
readonly detail: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Resolve the column budget for one terminal width.
|
|
94
|
+
*
|
|
95
|
+
* @param columns - Terminal width in cells.
|
|
96
|
+
* @returns The tier's budget; `detail` is never below 12 so the label itself
|
|
97
|
+
* survives even on a pathologically narrow terminal.
|
|
98
|
+
*/
|
|
99
|
+
export declare function ledgerLayout(columns: number): LedgerLayout;
|
|
100
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/trajectory/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYpE;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,KAAK,CAM7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAUxD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAc/C,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAc/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,KAAK,CAiBjD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,KAAK,CAAC,CAWhE,CAAA;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACrB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAO1D"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory formatting — durations, clocks, badges and heat.
|
|
3
|
+
*
|
|
4
|
+
* Presentation only, and deliberately in the UI layer rather than beside the
|
|
5
|
+
* projection: these decisions are about a terminal's width and palette, not
|
|
6
|
+
* about what the session log means.
|
|
7
|
+
*/
|
|
8
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
9
|
+
/**
|
|
10
|
+
* Truncate to a terminal DISPLAY width, CJK-aware (a wide char costs two
|
|
11
|
+
* columns). Used where the caller must control the cut precisely: Ink's own
|
|
12
|
+
* `wrap="truncate"` appends its ellipsis as soon as the content is as wide as
|
|
13
|
+
* its box rather than wider, which silently eats the last character of a
|
|
14
|
+
* right-aligned group that was laid out at exactly its natural width.
|
|
15
|
+
*
|
|
16
|
+
* @param text - Plain text (no ANSI).
|
|
17
|
+
* @param maxWidth - Column budget, ellipsis included.
|
|
18
|
+
* @returns `text` unchanged when it fits, otherwise a cut ending in `…`.
|
|
19
|
+
*/
|
|
20
|
+
export function truncateWidth(text, maxWidth) {
|
|
21
|
+
if (maxWidth <= 0)
|
|
22
|
+
return '';
|
|
23
|
+
if (stringWidth(text) <= maxWidth)
|
|
24
|
+
return text;
|
|
25
|
+
let width = 0;
|
|
26
|
+
let out = '';
|
|
27
|
+
for (const char of text) {
|
|
28
|
+
const charWidth = stringWidth(char);
|
|
29
|
+
if (width + charWidth > maxWidth - 1)
|
|
30
|
+
break;
|
|
31
|
+
width += charWidth;
|
|
32
|
+
out += char;
|
|
33
|
+
}
|
|
34
|
+
return `${out}…`;
|
|
35
|
+
}
|
|
36
|
+
/** `HH:MM:SS` local wall-clock of an epoch-ms timestamp. */
|
|
37
|
+
export function formatClock(time) {
|
|
38
|
+
const date = new Date(time);
|
|
39
|
+
const pad = (value) => String(value).padStart(2, '0');
|
|
40
|
+
return `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Compact duration: `82ms` / `1.4s` / `2m05s` / `1h04m`.
|
|
44
|
+
*
|
|
45
|
+
* Every form is at most six columns wide, so the ledger's duration column
|
|
46
|
+
* never reflows when a fast call is followed by a slow one.
|
|
47
|
+
*/
|
|
48
|
+
export function formatDuration(ms) {
|
|
49
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
50
|
+
return '—';
|
|
51
|
+
if (ms < 1000)
|
|
52
|
+
return `${Math.round(ms)}ms`;
|
|
53
|
+
if (ms < 60_000)
|
|
54
|
+
return `${(ms / 1000).toFixed(1)}s`;
|
|
55
|
+
if (ms < 3_600_000) {
|
|
56
|
+
const minutes = Math.floor(ms / 60_000);
|
|
57
|
+
return `${minutes}m${String(Math.round((ms % 60_000) / 1000)).padStart(2, '0')}s`;
|
|
58
|
+
}
|
|
59
|
+
const hours = Math.floor(ms / 3_600_000);
|
|
60
|
+
return `${hours}h${String(Math.floor((ms % 3_600_000) / 60_000)).padStart(2, '0')}m`;
|
|
61
|
+
}
|
|
62
|
+
/** Compact token count: `840` / `12.4k` / `1.1M`. */
|
|
63
|
+
export function formatTokens(count) {
|
|
64
|
+
if (count < 1000)
|
|
65
|
+
return String(Math.round(count));
|
|
66
|
+
if (count < 1_000_000)
|
|
67
|
+
return `${(count / 1000).toFixed(1)}k`;
|
|
68
|
+
return `${(count / 1_000_000).toFixed(1)}M`;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Heat colour for a duration cell.
|
|
72
|
+
*
|
|
73
|
+
* The point of the ledger is usually to find the slow thing, so the duration
|
|
74
|
+
* column encodes magnitude as colour: anything under a second recedes, tens
|
|
75
|
+
* of seconds warn, minutes shout. Reading a column of numbers is work; seeing
|
|
76
|
+
* one red cell is not.
|
|
77
|
+
*/
|
|
78
|
+
export function heatColor(ms) {
|
|
79
|
+
if (ms === undefined)
|
|
80
|
+
return 'subtle';
|
|
81
|
+
if (ms >= 60_000)
|
|
82
|
+
return 'error';
|
|
83
|
+
if (ms >= 10_000)
|
|
84
|
+
return 'warning';
|
|
85
|
+
if (ms >= 1000)
|
|
86
|
+
return 'inactiveShimmer';
|
|
87
|
+
return 'subtle';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Cost glyph for a row's own duration — an ABSOLUTE, learnable scale.
|
|
91
|
+
*
|
|
92
|
+
* A relative scale (tallest row in view = full block) would re-teach itself on
|
|
93
|
+
* every scroll; fixed thresholds mean `█` always says "over a minute" and `▁`
|
|
94
|
+
* always says "instant", so after one session the column is read without
|
|
95
|
+
* looking at the number beside it. Each step is roughly half an order of
|
|
96
|
+
* magnitude, which is the resolution a human actually acts on.
|
|
97
|
+
*/
|
|
98
|
+
export function costGlyph(ms) {
|
|
99
|
+
if (ms === undefined)
|
|
100
|
+
return ' ';
|
|
101
|
+
if (ms >= 60_000)
|
|
102
|
+
return '█';
|
|
103
|
+
if (ms >= 30_000)
|
|
104
|
+
return '▇';
|
|
105
|
+
if (ms >= 10_000)
|
|
106
|
+
return '▆';
|
|
107
|
+
if (ms >= 3_000)
|
|
108
|
+
return '▅';
|
|
109
|
+
if (ms >= 1_000)
|
|
110
|
+
return '▄';
|
|
111
|
+
if (ms >= 300)
|
|
112
|
+
return '▃';
|
|
113
|
+
if (ms >= 100)
|
|
114
|
+
return '▂';
|
|
115
|
+
return '▁';
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Fixed-width badge text per row kind — six columns, including one cell of
|
|
119
|
+
* padding on each side.
|
|
120
|
+
*
|
|
121
|
+
* The padding is what turns a coloured word into a pill. Background colour
|
|
122
|
+
* flush against the glyphs reads as a highlighter smudge; a cell of ground on
|
|
123
|
+
* either side reads as a chip, and chips are what let the eye group forty rows
|
|
124
|
+
* by kind without reading any of them.
|
|
125
|
+
*/
|
|
126
|
+
export const KIND_BADGE = {
|
|
127
|
+
turn: ' TURN ',
|
|
128
|
+
step: ' STEP ',
|
|
129
|
+
user: ' USR ',
|
|
130
|
+
assistant: ' AST ',
|
|
131
|
+
thinking: ' THK ',
|
|
132
|
+
tool: ' TOOL ',
|
|
133
|
+
subtool: ' SUB ',
|
|
134
|
+
retry: ' RTY ',
|
|
135
|
+
approval: ' APR ',
|
|
136
|
+
compaction: ' CMP ',
|
|
137
|
+
system: ' SYS ',
|
|
138
|
+
context: ' CTX ',
|
|
139
|
+
todo: ' TODO ',
|
|
140
|
+
};
|
|
141
|
+
/** One-character badge for the narrowest layout tier. */
|
|
142
|
+
export const KIND_GLYPH = {
|
|
143
|
+
turn: '▶',
|
|
144
|
+
step: '·',
|
|
145
|
+
user: '❯',
|
|
146
|
+
assistant: '✦',
|
|
147
|
+
thinking: '✻',
|
|
148
|
+
tool: '⏺',
|
|
149
|
+
subtool: '⏵',
|
|
150
|
+
retry: '↻',
|
|
151
|
+
approval: '⚑',
|
|
152
|
+
compaction: '⊟',
|
|
153
|
+
system: '⚙',
|
|
154
|
+
context: '⊕',
|
|
155
|
+
todo: '✓',
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Badge foreground per kind. Backgrounds come from {@link KIND_BADGE_BG} — the
|
|
159
|
+
* pair reads as a pill, which carries far better in a dense ledger than
|
|
160
|
+
* coloured text alone.
|
|
161
|
+
*/
|
|
162
|
+
export const KIND_FG = {
|
|
163
|
+
turn: 'text',
|
|
164
|
+
step: 'subtle',
|
|
165
|
+
user: 'suggestion',
|
|
166
|
+
assistant: 'claude',
|
|
167
|
+
// Reasoning is ambient: it is the most numerous row kind and the least
|
|
168
|
+
// often the thing you came to find, so it recedes rather than competing
|
|
169
|
+
// with tool names for the eye.
|
|
170
|
+
thinking: 'inactive',
|
|
171
|
+
tool: 'chromeYellow',
|
|
172
|
+
subtool: 'autoAccept',
|
|
173
|
+
retry: 'error',
|
|
174
|
+
approval: 'warning',
|
|
175
|
+
compaction: 'planMode',
|
|
176
|
+
system: 'planMode',
|
|
177
|
+
context: 'success',
|
|
178
|
+
todo: 'planMode',
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Badge background per kind, or `undefined` for kinds that read better
|
|
182
|
+
* unfilled (structural rows, which should recede behind the work rows).
|
|
183
|
+
*/
|
|
184
|
+
export const KIND_BADGE_BG = {
|
|
185
|
+
user: 'userMessageBackground',
|
|
186
|
+
assistant: 'userMessageBackground',
|
|
187
|
+
tool: 'bashMessageBackgroundColor',
|
|
188
|
+
subtool: 'bashMessageBackgroundColor',
|
|
189
|
+
retry: 'diffRemoved',
|
|
190
|
+
approval: 'diffRemovedDimmed',
|
|
191
|
+
compaction: 'diffAddedDimmed',
|
|
192
|
+
system: 'diffAddedDimmed',
|
|
193
|
+
context: 'diffAdded',
|
|
194
|
+
todo: 'diffAdded',
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Resolve the column budget for one terminal width.
|
|
198
|
+
*
|
|
199
|
+
* @param columns - Terminal width in cells.
|
|
200
|
+
* @returns The tier's budget; `detail` is never below 12 so the label itself
|
|
201
|
+
* survives even on a pathologically narrow terminal.
|
|
202
|
+
*/
|
|
203
|
+
export function ledgerLayout(columns) {
|
|
204
|
+
// Fixed costs: spine (2) + clock (8) + pill (6) + cost (1) + duration (7),
|
|
205
|
+
// plus one cell of gap between each.
|
|
206
|
+
if (columns >= 110)
|
|
207
|
+
return { badge: 6, index: true, outcome: true, detail: Math.max(12, columns - 72) };
|
|
208
|
+
if (columns >= 90)
|
|
209
|
+
return { badge: 6, index: true, outcome: true, detail: Math.max(12, columns - 64) };
|
|
210
|
+
if (columns >= 70)
|
|
211
|
+
return { badge: 6, index: false, outcome: false, detail: Math.max(12, columns - 26) };
|
|
212
|
+
return { badge: 1, index: false, outcome: false, detail: Math.max(12, columns - 16) };
|
|
213
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory motion — five verbs, one shared clock, one hard rule.
|
|
3
|
+
*
|
|
4
|
+
* ## The rule: SGR-only
|
|
5
|
+
*
|
|
6
|
+
* The renderer diffs frames cell by cell and emits the smallest patch that
|
|
7
|
+
* reconciles them. A cell whose *style* changed costs a few bytes of SGR; a
|
|
8
|
+
* row whose *layout* changed costs a full row rewrite, and in inline mode a
|
|
9
|
+
* frame that got shorter takes the full-reset path that once deposited a copy
|
|
10
|
+
* of the whole UI into scrollback on every repaint (issues #38/#39/#19/#10).
|
|
11
|
+
*
|
|
12
|
+
* So every verb below animates colour and colour only. Nothing here changes a
|
|
13
|
+
* glyph count, a row count, or a box dimension. `verify-trace-motion` asserts
|
|
14
|
+
* this mechanically by capturing the write stream across a hundred ticks and
|
|
15
|
+
* failing on any row-level escape — the rule is machine-enforced, not a
|
|
16
|
+
* convention someone has to remember.
|
|
17
|
+
*
|
|
18
|
+
* ## The verbs
|
|
19
|
+
*
|
|
20
|
+
* | verb | shape | used for |
|
|
21
|
+
* |-------------|----------------------------|---------------------------------|
|
|
22
|
+
* | `arrive` | one bright frame, settle | a row or wave column just landed |
|
|
23
|
+
* | `reproject` | dim → bright, two frames | the same data, re-sorted/filtered |
|
|
24
|
+
* | `alert` | two flashes, then steady | an error, a retry, a pending ask |
|
|
25
|
+
* | `alive` | slow breath, loops | the running edge (1–2 cells max) |
|
|
26
|
+
* | `navigate` | *nothing* | cursor, viewport, inspector |
|
|
27
|
+
*
|
|
28
|
+
* `navigate` having no animation is a decision, not an omission: easing on a
|
|
29
|
+
* cursor is latency you can feel, and key auto-repeat already supplies the
|
|
30
|
+
* sense of continuity.
|
|
31
|
+
*
|
|
32
|
+
* ## Cost
|
|
33
|
+
*
|
|
34
|
+
* No timer is created here. The scene subscribes once to the Ink core's
|
|
35
|
+
* shared animation clock, which already pauses when the terminal loses focus
|
|
36
|
+
* or the view scrolls offscreen — so an idle session animates nothing.
|
|
37
|
+
*/
|
|
38
|
+
import { type RGBColor } from '../components/Spinner/spinnerUtils.js';
|
|
39
|
+
import type { Color } from '../ink/styles.js';
|
|
40
|
+
/** Scene clock period. One tick drives every verb below. */
|
|
41
|
+
export declare const MOTION_TICK_MS = 100;
|
|
42
|
+
/** Ticks a one-shot verb runs for before settling. */
|
|
43
|
+
export declare const MOTION_SPANS: {
|
|
44
|
+
readonly arrive: 2;
|
|
45
|
+
readonly reproject: 3;
|
|
46
|
+
/** Two flashes: bright, dim, bright, dim, then steady. */
|
|
47
|
+
readonly alert: 8;
|
|
48
|
+
};
|
|
49
|
+
/** Format an RGB triple the way the theme and `<Text color>` expect. */
|
|
50
|
+
export declare function rgbString(color: RGBColor): Color;
|
|
51
|
+
/**
|
|
52
|
+
* Blend two colours, accepting either theme values (`rgb(r,g,b)`) or hex.
|
|
53
|
+
*
|
|
54
|
+
* @param base - Colour at `t = 0`.
|
|
55
|
+
* @param highlight - Colour at `t = 1`.
|
|
56
|
+
* @param t - Blend position, clamped into [0, 1].
|
|
57
|
+
* @returns A colour string `<Text color>` accepts, or `base` when either
|
|
58
|
+
* input could not be parsed (a custom theme may carry an ANSI name).
|
|
59
|
+
*/
|
|
60
|
+
export declare function mix(base: string, highlight: string, t: number): Color;
|
|
61
|
+
/**
|
|
62
|
+
* The `alive` verb: a triangular breath in [0, 1], synchronized across every
|
|
63
|
+
* caller because they all read the same clock.
|
|
64
|
+
*
|
|
65
|
+
* @param tick - Current scene tick.
|
|
66
|
+
* @returns Blend position for {@link mix}.
|
|
67
|
+
*/
|
|
68
|
+
export declare function alive(tick: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* The `arrive` verb: one bright frame, then settle.
|
|
71
|
+
*
|
|
72
|
+
* @returns Blend position, or 0 once settled.
|
|
73
|
+
*/
|
|
74
|
+
export declare function arrive(tick: number, startTick: number): number;
|
|
75
|
+
/**
|
|
76
|
+
* The `reproject` verb: the view dims, then comes back up. Used when the same
|
|
77
|
+
* rows are re-ordered or re-filtered, so the eye is told "this is the same
|
|
78
|
+
* data, rearranged" rather than "this is a new screen".
|
|
79
|
+
*
|
|
80
|
+
* @returns Dim factor in [0, 1] where 1 is fully dimmed, 0 fully settled.
|
|
81
|
+
*/
|
|
82
|
+
export declare function reproject(tick: number, startTick: number): number;
|
|
83
|
+
/**
|
|
84
|
+
* The `alert` verb: two flashes, then steady. Deliberately one-shot — a
|
|
85
|
+
* looping alarm is noise, and an error that keeps blinking after you have
|
|
86
|
+
* seen it trains you to ignore it.
|
|
87
|
+
*
|
|
88
|
+
* @returns Blend position toward the highlight, or 0 once steady.
|
|
89
|
+
*/
|
|
90
|
+
export declare function alert(tick: number, startTick: number): number;
|
|
91
|
+
/**
|
|
92
|
+
* Colour for a running cell (the `alive` verb applied to a theme pair).
|
|
93
|
+
*
|
|
94
|
+
* @param tick - Current scene tick.
|
|
95
|
+
* @param base - Settled colour.
|
|
96
|
+
* @param highlight - Peak-of-breath colour.
|
|
97
|
+
*/
|
|
98
|
+
export declare function aliveColor(tick: number, base: string, highlight: string): Color;
|
|
99
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../src/trajectory/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,uCAAuC,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,4DAA4D;AAC5D,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC,sDAAsD;AACtD,eAAO,MAAM,YAAY;;;IAGvB,0DAA0D;;CAElD,CAAA;AAKV,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,CAEhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAOrE;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG1C;AAgBD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIjE;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,CAE/E"}
|