@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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { t } from '../i18n.js';
|
|
3
|
+
import { Box, Text, useTerminalSize } from '../ui.js';
|
|
3
4
|
import { Pane } from './design-system/Pane.js';
|
|
4
5
|
import { ListItem } from './design-system/ListItem.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { HintLine } from './design-system/HintLine.js';
|
|
7
|
+
import { listWindow } from './listWindow.js';
|
|
7
8
|
/**
|
|
8
9
|
* Double-Esc rewind picker (CC's "Double-tap esc to rewind the code and/or
|
|
9
10
|
* conversation to a previous point in time"): lists the user's past messages
|
|
@@ -12,9 +13,17 @@ import { KeyboardShortcutHint } from './design-system/KeyboardShortcutHint.js';
|
|
|
12
13
|
*/
|
|
13
14
|
export function RewindPicker({ rows, focusIndex, confirmRow, }) {
|
|
14
15
|
if (confirmRow !== null) {
|
|
15
|
-
return (_jsx(Pane, { color: "permission", children: _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children:
|
|
16
|
+
return (_jsx(Pane, { color: "permission", children: _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('rewind-confirm-title') }) }), _jsx(ListItem, { isFocused: false, description: t('rewind-confirm-desc'), children: preview(confirmRow.text) }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-rewind-back') }) })] }) }));
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const { rows: terminalRows } = useTerminalSize();
|
|
19
|
+
// 焦点窗口化按行预算:首项带 'last message' 描述占 2 行、其余 1 行
|
|
20
|
+
//(ListItem 保证单行截断)。rewind 是不可见确认的高危操作,焦点必须
|
|
21
|
+
// 始终在屏。框架行:浮层预留 8 + Pane 2 + 标题块 3 + 页脚 1 = 14。
|
|
22
|
+
const { start, end } = listWindow(rows.map((_, i) => (i === 0 ? 2 : 1)), focusIndex, Math.max(terminalRows - 14, 2));
|
|
23
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "remember", bold: true, children: t('rewind-title') }), _jsx(Text, { dimColor: true, children: t('rewind-subtitle') })] }), rows.length === 0 ? (_jsx(ListItem, { isFocused: false, children: t('rewind-empty') })) : (rows.slice(start, end).map((row, index) => {
|
|
24
|
+
const absoluteIndex = start + index;
|
|
25
|
+
return (_jsx(ListItem, { isFocused: absoluteIndex === focusIndex, description: absoluteIndex === 0 ? t('rewind-last-message') : undefined, showScrollUp: absoluteIndex === start && start > 0, showScrollDown: absoluteIndex === end - 1 && end < rows.length, children: preview(row.text) }, row.id));
|
|
26
|
+
}))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-select-exit') }) })] }));
|
|
18
27
|
}
|
|
19
28
|
/** One-line preview of a message (newlines flattened, capped). */
|
|
20
29
|
function preview(text) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* A single-line search input in the round-bordered box of
|
|
3
|
+
* A single-line search input in the round-bordered box of Claude Code's
|
|
4
4
|
* SearchBox: `⌕ ` prefix, block cursor at `cursorOffset` (inverse cell).
|
|
5
5
|
* When empty and focused, a solid block caret sits at the start and the
|
|
6
6
|
* placeholder is right-aligned (dimmed) — kept off the caret's cell so the
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import Box from '../ink/components/Box.js';
|
|
3
3
|
import Text from '../ink/components/Text.js';
|
|
4
4
|
/**
|
|
5
|
-
* A single-line search input in the round-bordered box of
|
|
5
|
+
* A single-line search input in the round-bordered box of Claude Code's
|
|
6
6
|
* SearchBox: `⌕ ` prefix, block cursor at `cursorOffset` (inverse cell).
|
|
7
7
|
* When empty and focused, a solid block caret sits at the start and the
|
|
8
8
|
* placeholder is right-aligned (dimmed) — kept off the caret's cell so the
|
|
@@ -11,8 +11,7 @@ type Props = {
|
|
|
11
11
|
stalledIntensity?: number;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* The shimmering verb message next to the spinner glyph,
|
|
15
|
-
* leak's `Spinner/GlimmerMessage.tsx`.
|
|
14
|
+
* The shimmering verb message next to the spinner glyph, mirroring Claude Code's `Spinner/GlimmerMessage.tsx`.
|
|
16
15
|
*/
|
|
17
16
|
export declare function GlimmerMessage({ message, mode, messageColor, glimmerIndex, flashOpacity, shimmerColor, stalledIntensity, }: Props): React.ReactNode;
|
|
18
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlimmerMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/GlimmerMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAInD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,YAAY,EAAE,MAAM,KAAK,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,KAAK,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAID
|
|
1
|
+
{"version":3,"file":"GlimmerMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/GlimmerMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAInD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,YAAY,EAAE,MAAM,KAAK,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,KAAK,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAID;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAoB,GACrB,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CA8GzB"}
|
|
@@ -8,8 +8,7 @@ import { interpolateColor, parseRGB, toRGBColor } from './spinnerUtils.js';
|
|
|
8
8
|
import { useTheme } from '../design-system/ThemeProvider.js';
|
|
9
9
|
const ERROR_RED = { r: 171, g: 43, b: 63 };
|
|
10
10
|
/**
|
|
11
|
-
* The shimmering verb message next to the spinner glyph,
|
|
12
|
-
* leak's `Spinner/GlimmerMessage.tsx`.
|
|
11
|
+
* The shimmering verb message next to the spinner glyph, mirroring Claude Code's `Spinner/GlimmerMessage.tsx`.
|
|
13
12
|
*/
|
|
14
13
|
export function GlimmerMessage({ message, mode, messageColor, glimmerIndex, flashOpacity, shimmerColor, stalledIntensity = 0, }) {
|
|
15
14
|
const [themeName] = useTheme();
|
|
@@ -21,7 +21,7 @@ export type SpinnerAnimationRowProps = {
|
|
|
21
21
|
thinkingStatus: 'thinking' | number | null;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
* The 50ms-animated portion of the working spinner,
|
|
24
|
+
* The 50ms-animated portion of the working spinner, mirroring Claude Code's
|
|
25
25
|
* `Spinner/SpinnerAnimationRow.tsx` with the swarm/teammate/effort branches
|
|
26
26
|
* removed. Owns `useAnimationFrame(50)` and all values derived from the
|
|
27
27
|
* animation clock (frame, glimmer, token counter animation, elapsed time,
|
|
@@ -14,13 +14,13 @@ import { interpolateColor, toRGBColor } from './spinnerUtils.js';
|
|
|
14
14
|
const SEP_WIDTH = stringWidth(' · ');
|
|
15
15
|
const THINKING_BARE_WIDTH = stringWidth('thinking');
|
|
16
16
|
const SHOW_TOKENS_AFTER_MS = 30_000;
|
|
17
|
-
// Thinking shimmer constants (same as
|
|
17
|
+
// Thinking shimmer constants (same as Claude Code).
|
|
18
18
|
const THINKING_INACTIVE = { r: 153, g: 153, b: 153 };
|
|
19
19
|
const THINKING_INACTIVE_SHIMMER = { r: 185, g: 185, b: 185 };
|
|
20
20
|
const THINKING_DELAY_MS = 3000;
|
|
21
21
|
const THINKING_GLOW_PERIOD_S = 2;
|
|
22
22
|
/**
|
|
23
|
-
* The 50ms-animated portion of the working spinner,
|
|
23
|
+
* The 50ms-animated portion of the working spinner, mirroring Claude Code's
|
|
24
24
|
* `Spinner/SpinnerAnimationRow.tsx` with the swarm/teammate/effort branches
|
|
25
25
|
* removed. Owns `useAnimationFrame(50)` and all values derived from the
|
|
26
26
|
* animation clock (frame, glimmer, token counter animation, elapsed time,
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
time?: number;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* The animated spinner glyph (·✢*✶✻✽ cycle),
|
|
11
|
+
* The animated spinner glyph (·✢*✶✻✽ cycle), mirroring Claude Code's
|
|
12
12
|
* `Spinner/SpinnerGlyph.tsx`. Interpolates toward red when stalled.
|
|
13
13
|
*/
|
|
14
14
|
export declare function SpinnerGlyph({ frame, messageColor, stalledIntensity, reducedMotion, time, }: Props): React.ReactNode;
|
|
@@ -10,7 +10,7 @@ const REDUCED_MOTION_DOT = '●';
|
|
|
10
10
|
const REDUCED_MOTION_CYCLE_MS = 2000; // 2-second cycle: 1s visible, 1s dim
|
|
11
11
|
const ERROR_RED = { r: 171, g: 43, b: 63 };
|
|
12
12
|
/**
|
|
13
|
-
* The animated spinner glyph (·✢*✶✻✽ cycle),
|
|
13
|
+
* The animated spinner glyph (·✢*✶✻✽ cycle), mirroring Claude Code's
|
|
14
14
|
* `Spinner/SpinnerGlyph.tsx`. Interpolates toward red when stalled.
|
|
15
15
|
*/
|
|
16
16
|
export function SpinnerGlyph({ frame, messageColor, stalledIntensity = 0, reducedMotion = false, time = 0, }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Spinner
|
|
3
|
-
* (`
|
|
2
|
+
* Spinner 动画的通用工具集:平台相关的帧字符选择、RGB 颜色插值、
|
|
3
|
+
* HSL 色相转 RGB,以及 `rgb(...)` 颜色字符串的解析与记忆化。
|
|
4
|
+
* 这些纯函数被 Spinner 组件及若干加载/装饰元素复用。
|
|
4
5
|
*/
|
|
5
6
|
export type RGBColor = {
|
|
6
7
|
r: number;
|
|
@@ -8,34 +9,28 @@ export type RGBColor = {
|
|
|
8
9
|
b: number;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* 返回适合当前终端/平台的 spinner 帧字符序列。
|
|
13
|
+
* 每次调用都返回独立数组,调用方可以安全持有或改动,互不影响。
|
|
13
14
|
*/
|
|
14
15
|
export declare function getDefaultCharacters(): string[];
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param color2 - End color.
|
|
19
|
-
* @param t - Interpolation factor, 0 to 1.
|
|
20
|
-
* @returns The interpolated color, components rounded to integers.
|
|
17
|
+
* 在两种颜色之间按系数 t 线性插值(t ∈ [0, 1]),
|
|
18
|
+
* 各分量四舍五入到整数后返回。
|
|
21
19
|
*/
|
|
22
20
|
export declare function interpolateColor(color1: RGBColor, color2: RGBColor, t: number): RGBColor;
|
|
23
21
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param color - The RGB color to format.
|
|
26
|
-
* @returns The `rgb(r,g,b)` string.
|
|
22
|
+
* 把 RGB 对象格式化为 `rgb(r,g,b)` 字符串,供 Ink 的 Text 组件使用。
|
|
27
23
|
*/
|
|
28
24
|
export declare function toRGBColor(color: RGBColor): string;
|
|
29
25
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
26
|
+
* 把色相角(单位:度)转换为 RGB 颜色。
|
|
27
|
+
* 采用固定饱和度 0.7、亮度 0.6 的 HSL 参数(波形动画的配色基准);
|
|
28
|
+
* 色相先归一化到 [0, 360),任意角度(含负数、超一圈)都能安全转换。
|
|
33
29
|
*/
|
|
34
30
|
export declare function hueToRgb(hue: number): RGBColor;
|
|
35
31
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @returns The parsed RGB color, or null when the string is not `rgb(r,g,b)`.
|
|
32
|
+
* 解析 `rgb(r,g,b)` 颜色字符串;格式不合法时返回 null。
|
|
33
|
+
* 同一输入的解析结果会被缓存(含 null),之后取用零成本。
|
|
39
34
|
*/
|
|
40
35
|
export declare function parseRGB(colorStr: string): RGBColor | null;
|
|
41
36
|
//# sourceMappingURL=spinnerUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinnerUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/spinnerUtils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spinnerUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/spinnerUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,QAAQ,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAS1D;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAO/C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,CAAC,EAAE,MAAM,GACR,QAAQ,CAQV;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAElD;AAmBD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAa9C;AAQD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAc1D"}
|
|
@@ -1,104 +1,100 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Spinner
|
|
3
|
-
* (`
|
|
2
|
+
* Spinner 动画的通用工具集:平台相关的帧字符选择、RGB 颜色插值、
|
|
3
|
+
* HSL 色相转 RGB,以及 `rgb(...)` 颜色字符串的解析与记忆化。
|
|
4
|
+
* 这些纯函数被 Spinner 组件及若干加载/装饰元素复用。
|
|
4
5
|
*/
|
|
6
|
+
/** Ghostty 终端专属帧序列:星形符号逐帧放大,末帧为实心星。 */
|
|
7
|
+
const GHOSTTY_FRAME_SET = ['·', '✢', '✳', '✶', '✻', '*'];
|
|
8
|
+
/** macOS 帧序列:末帧换成八芒星。 */
|
|
9
|
+
const MACOS_FRAME_SET = ['·', '✢', '✳', '✶', '✻', '✽'];
|
|
10
|
+
/** 其余平台默认帧序列:第三帧用普通星号。 */
|
|
11
|
+
const FALLBACK_FRAME_SET = ['·', '✢', '*', '✶', '✻', '✽'];
|
|
5
12
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
13
|
+
* 返回适合当前终端/平台的 spinner 帧字符序列。
|
|
14
|
+
* 每次调用都返回独立数组,调用方可以安全持有或改动,互不影响。
|
|
8
15
|
*/
|
|
9
16
|
export function getDefaultCharacters() {
|
|
10
17
|
if (process.env.TERM === 'xterm-ghostty') {
|
|
11
|
-
return [
|
|
18
|
+
return [...GHOSTTY_FRAME_SET];
|
|
12
19
|
}
|
|
13
20
|
return process.platform === 'darwin'
|
|
14
|
-
? [
|
|
15
|
-
: [
|
|
21
|
+
? [...MACOS_FRAME_SET]
|
|
22
|
+
: [...FALLBACK_FRAME_SET];
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param color2 - End color.
|
|
21
|
-
* @param t - Interpolation factor, 0 to 1.
|
|
22
|
-
* @returns The interpolated color, components rounded to integers.
|
|
25
|
+
* 在两种颜色之间按系数 t 线性插值(t ∈ [0, 1]),
|
|
26
|
+
* 各分量四舍五入到整数后返回。
|
|
23
27
|
*/
|
|
24
28
|
export function interpolateColor(color1, color2, t) {
|
|
29
|
+
const blend = (from, to) => Math.round(from + (to - from) * t);
|
|
25
30
|
return {
|
|
26
|
-
r:
|
|
27
|
-
g:
|
|
28
|
-
b:
|
|
31
|
+
r: blend(color1.r, color2.r),
|
|
32
|
+
g: blend(color1.g, color2.g),
|
|
33
|
+
b: blend(color1.b, color2.b),
|
|
29
34
|
};
|
|
30
35
|
}
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @param color - The RGB color to format.
|
|
34
|
-
* @returns The `rgb(r,g,b)` string.
|
|
37
|
+
* 把 RGB 对象格式化为 `rgb(r,g,b)` 字符串,供 Ink 的 Text 组件使用。
|
|
35
38
|
*/
|
|
36
39
|
export function toRGBColor(color) {
|
|
37
40
|
return `rgb(${color.r},${color.g},${color.b})`;
|
|
38
41
|
}
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
+
* 计算色相在六个扇区中的基准 RGB 分量(未加亮度偏移)。
|
|
44
|
+
* 扇区按 60° 划分:红→黄→绿→青→蓝→品红→红。
|
|
45
|
+
*/
|
|
46
|
+
function hueSector(hue, chroma, secondary) {
|
|
47
|
+
if (hue < 60)
|
|
48
|
+
return [chroma, secondary, 0];
|
|
49
|
+
if (hue < 120)
|
|
50
|
+
return [secondary, chroma, 0];
|
|
51
|
+
if (hue < 180)
|
|
52
|
+
return [0, chroma, secondary];
|
|
53
|
+
if (hue < 240)
|
|
54
|
+
return [0, secondary, chroma];
|
|
55
|
+
if (hue < 300)
|
|
56
|
+
return [secondary, 0, chroma];
|
|
57
|
+
return [chroma, 0, secondary];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 把色相角(单位:度)转换为 RGB 颜色。
|
|
61
|
+
* 采用固定饱和度 0.7、亮度 0.6 的 HSL 参数(波形动画的配色基准);
|
|
62
|
+
* 色相先归一化到 [0, 360),任意角度(含负数、超一圈)都能安全转换。
|
|
43
63
|
*/
|
|
44
64
|
export function hueToRgb(hue) {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
let g = 0;
|
|
53
|
-
let b = 0;
|
|
54
|
-
if (h < 60) {
|
|
55
|
-
r = c;
|
|
56
|
-
g = x;
|
|
57
|
-
}
|
|
58
|
-
else if (h < 120) {
|
|
59
|
-
r = x;
|
|
60
|
-
g = c;
|
|
61
|
-
}
|
|
62
|
-
else if (h < 180) {
|
|
63
|
-
g = c;
|
|
64
|
-
b = x;
|
|
65
|
-
}
|
|
66
|
-
else if (h < 240) {
|
|
67
|
-
g = x;
|
|
68
|
-
b = c;
|
|
69
|
-
}
|
|
70
|
-
else if (h < 300) {
|
|
71
|
-
r = x;
|
|
72
|
-
b = c;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
r = c;
|
|
76
|
-
b = x;
|
|
77
|
-
}
|
|
65
|
+
const wrapped = ((hue % 360) + 360) % 360;
|
|
66
|
+
const saturation = 0.7;
|
|
67
|
+
const lightness = 0.6;
|
|
68
|
+
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
69
|
+
const secondary = chroma * (1 - Math.abs(((wrapped / 60) % 2) - 1));
|
|
70
|
+
const luminanceOffset = lightness - chroma / 2;
|
|
71
|
+
const [r, g, b] = hueSector(wrapped, chroma, secondary);
|
|
78
72
|
return {
|
|
79
|
-
r: Math.round((r +
|
|
80
|
-
g: Math.round((g +
|
|
81
|
-
b: Math.round((b +
|
|
73
|
+
r: Math.round((r + luminanceOffset) * 255),
|
|
74
|
+
g: Math.round((g + luminanceOffset) * 255),
|
|
75
|
+
b: Math.round((b + luminanceOffset) * 255),
|
|
82
76
|
};
|
|
83
77
|
}
|
|
84
|
-
|
|
78
|
+
/** 匹配 `rgb(r,g,b)` 文本,分量允许任意空格。 */
|
|
79
|
+
const RGB_STRING_PATTERN = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
|
|
80
|
+
/** 按输入字符串记忆化解析结果,重复调用不再做正则匹配。 */
|
|
81
|
+
const rgbParseCache = new Map();
|
|
85
82
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* @returns The parsed RGB color, or null when the string is not `rgb(r,g,b)`.
|
|
83
|
+
* 解析 `rgb(r,g,b)` 颜色字符串;格式不合法时返回 null。
|
|
84
|
+
* 同一输入的解析结果会被缓存(含 null),之后取用零成本。
|
|
89
85
|
*/
|
|
90
86
|
export function parseRGB(colorStr) {
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
94
|
-
const
|
|
95
|
-
const
|
|
87
|
+
const remembered = rgbParseCache.get(colorStr);
|
|
88
|
+
if (remembered !== undefined)
|
|
89
|
+
return remembered;
|
|
90
|
+
const parts = colorStr.match(RGB_STRING_PATTERN);
|
|
91
|
+
const parsed = parts
|
|
96
92
|
? {
|
|
97
|
-
r: parseInt(
|
|
98
|
-
g: parseInt(
|
|
99
|
-
b: parseInt(
|
|
93
|
+
r: parseInt(parts[1], 10),
|
|
94
|
+
g: parseInt(parts[2], 10),
|
|
95
|
+
b: parseInt(parts[3], 10),
|
|
100
96
|
}
|
|
101
97
|
: null;
|
|
102
|
-
|
|
103
|
-
return
|
|
98
|
+
rgbParseCache.set(colorStr, parsed);
|
|
99
|
+
return parsed;
|
|
104
100
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tracks the transition to red when tokens stop flowing (
|
|
3
|
-
* leak's `Spinner/useStalledAnimation.ts`). Driven by the parent's animation
|
|
2
|
+
* Tracks the transition to red when tokens stop flowing (mirroring Claude Code's `Spinner/useStalledAnimation.ts`). Driven by the parent's animation
|
|
4
3
|
* clock time instead of independent intervals, so it slows down when the
|
|
5
4
|
* terminal is blurred.
|
|
6
5
|
* @param time - Parent animation clock time in ms.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStalledAnimation.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/useStalledAnimation.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"useStalledAnimation.d.ts","sourceRoot":"","sources":["../../../../src/components/Spinner/useStalledAnimation.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,qBAAqB,EAAE,MAAM,EAC7B,cAAc,UAAQ,EACtB,aAAa,UAAQ,GACpB;IACD,SAAS,EAAE,OAAO,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;CACzB,CA6DA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useRef } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Tracks the transition to red when tokens stop flowing (
|
|
4
|
-
* leak's `Spinner/useStalledAnimation.ts`). Driven by the parent's animation
|
|
3
|
+
* Tracks the transition to red when tokens stop flowing (mirroring Claude Code's `Spinner/useStalledAnimation.ts`). Driven by the parent's animation
|
|
5
4
|
* clock time instead of independent intervals, so it slows down when the
|
|
6
5
|
* terminal is blurred.
|
|
7
6
|
* @param time - Parent animation clock time in ms.
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Renders markdown during streaming by splitting at the last top-level block
|
|
4
4
|
* boundary: everything before is stable (memoized, never re-parsed), only the
|
|
5
|
-
* final block is re-parsed per delta
|
|
5
|
+
* final block is re-parsed per delta, mirroring Claude Code's
|
|
6
6
|
* `StreamingMarkdown.tsx`). marked.lexer() correctly handles unclosed code
|
|
7
7
|
* fences as a single token, so block boundaries are always safe.
|
|
8
8
|
*/
|
|
@@ -7,7 +7,7 @@ import { Markdown } from './Markdown.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* Renders markdown during streaming by splitting at the last top-level block
|
|
9
9
|
* boundary: everything before is stable (memoized, never re-parsed), only the
|
|
10
|
-
* final block is re-parsed per delta
|
|
10
|
+
* final block is re-parsed per delta, mirroring Claude Code's
|
|
11
11
|
* `StreamingMarkdown.tsx`). marked.lexer() correctly handles unclosed code
|
|
12
12
|
* fences as a single token, so block boundaries are always safe.
|
|
13
13
|
*/
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type SelectOption } from './Select.js';
|
|
3
3
|
/**
|
|
4
|
-
* The full selectable theme list: the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* (
|
|
4
|
+
* The full selectable theme list: the `auto` pseudo-theme (follows the
|
|
5
|
+
* terminal background via OSC 11, light/dark) first, then the three
|
|
6
|
+
* built-in palettes (display order), then discovered user themes from
|
|
7
|
+
* ~/.dsh-tui/themes (sorted by file name). A user theme named `auto` is
|
|
8
|
+
* shadowed by the built-in pseudo-theme (getTheme resolves `auto` first),
|
|
9
|
+
* so it is filtered out to keep the list truthful. Shared by ThemePicker
|
|
10
|
+
* (render) and the /theme command (focus index), so both always see the
|
|
11
|
+
* same ordering.
|
|
8
12
|
*/
|
|
9
13
|
export declare function getThemeOptions(): SelectOption[];
|
|
10
14
|
/**
|
|
11
15
|
* Color-theme picker in the ActivityPicker style: a permission-colored Pane
|
|
12
|
-
* listing the built-in palettes first, then
|
|
13
|
-
* ~/.dsh-
|
|
14
|
-
* key color swatches; `❯` marks focus, `✓` the
|
|
15
|
-
* through the ThemeProvider setter (persists to
|
|
16
|
-
* hot swaps), Esc cancels.
|
|
16
|
+
* listing the `auto` pseudo-theme and the built-in palettes first, then
|
|
17
|
+
* every user theme found in ~/.dsh-tui/themes — each row shows the display
|
|
18
|
+
* name, its base and three key color swatches; `❯` marks focus, `✓` the
|
|
19
|
+
* active theme. Enter applies through the ThemeProvider setter (persists to
|
|
20
|
+
* ~/.dsh-tui/theme.json and hot swaps), Esc cancels.
|
|
17
21
|
*/
|
|
18
22
|
export declare function ThemePicker({ focusIndex, currentTheme, }: {
|
|
19
23
|
focusIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAuCvD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,YAAY,EAAE,CAsBhD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,YAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CAsBlB"}
|
|
@@ -4,9 +4,8 @@ import { t } from '../i18n.js';
|
|
|
4
4
|
import { Box, Text } from '../ui.js';
|
|
5
5
|
import { Pane } from './design-system/Pane.js';
|
|
6
6
|
import { Select } from './Select.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { getTheme, THEME_NAMES } from '../theme.js';
|
|
7
|
+
import { HintLine } from './design-system/HintLine.js';
|
|
8
|
+
import { getTheme, THEME_NAMES, AUTO_THEME_NAME } from '../theme.js';
|
|
10
9
|
import { buildTheme, listCustomThemes } from '../customTheme.js';
|
|
11
10
|
/** One double-block swatch character per preview key, in a row. */
|
|
12
11
|
const SWATCH = '██';
|
|
@@ -24,28 +23,35 @@ function optionFor(name, displayName, theme, description) {
|
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
|
-
* The full selectable theme list: the
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* (
|
|
26
|
+
* The full selectable theme list: the `auto` pseudo-theme (follows the
|
|
27
|
+
* terminal background via OSC 11, light/dark) first, then the three
|
|
28
|
+
* built-in palettes (display order), then discovered user themes from
|
|
29
|
+
* ~/.dsh-tui/themes (sorted by file name). A user theme named `auto` is
|
|
30
|
+
* shadowed by the built-in pseudo-theme (getTheme resolves `auto` first),
|
|
31
|
+
* so it is filtered out to keep the list truthful. Shared by ThemePicker
|
|
32
|
+
* (render) and the /theme command (focus index), so both always see the
|
|
33
|
+
* same ordering.
|
|
31
34
|
*/
|
|
32
35
|
export function getThemeOptions() {
|
|
36
|
+
const auto = optionFor(AUTO_THEME_NAME, AUTO_THEME_NAME, getTheme(AUTO_THEME_NAME), t('theme-auto-base'));
|
|
33
37
|
const builtins = THEME_NAMES.map(name => {
|
|
34
38
|
const theme = getTheme(name);
|
|
35
39
|
return optionFor(name, name, theme, t('theme-builtin-base', { name }));
|
|
36
40
|
});
|
|
37
|
-
const custom = listCustomThemes()
|
|
38
|
-
|
|
41
|
+
const custom = listCustomThemes()
|
|
42
|
+
.filter(spec => spec.name !== AUTO_THEME_NAME)
|
|
43
|
+
.map(spec => optionFor(spec.name, spec.displayName, buildTheme(spec), t('theme-user-base', { base: spec.base, name: spec.name })));
|
|
44
|
+
return [auto, ...builtins, ...custom];
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* Color-theme picker in the ActivityPicker style: a permission-colored Pane
|
|
42
|
-
* listing the built-in palettes first, then
|
|
43
|
-
* ~/.dsh-
|
|
44
|
-
* key color swatches; `❯` marks focus, `✓` the
|
|
45
|
-
* through the ThemeProvider setter (persists to
|
|
46
|
-
* hot swaps), Esc cancels.
|
|
48
|
+
* listing the `auto` pseudo-theme and the built-in palettes first, then
|
|
49
|
+
* every user theme found in ~/.dsh-tui/themes — each row shows the display
|
|
50
|
+
* name, its base and three key color swatches; `❯` marks focus, `✓` the
|
|
51
|
+
* active theme. Enter applies through the ThemeProvider setter (persists to
|
|
52
|
+
* ~/.dsh-tui/theme.json and hot swaps), Esc cancels.
|
|
47
53
|
*/
|
|
48
54
|
export function ThemePicker({ focusIndex, currentTheme, }) {
|
|
49
55
|
const options = React.useMemo(() => getThemeOptions(), []);
|
|
50
|
-
return (_jsx(Pane, { color: "permission", children: _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children:
|
|
56
|
+
return (_jsx(Pane, { color: "permission", children: _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('picker-title-theme') }) }), _jsx(Select, { options: options, focusIndex: focusIndex, selectedValue: currentTheme, visibleOptionCount: 6 }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-confirm-exit') }) })] }) }));
|
|
51
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* The `/thinking` dialog,
|
|
3
|
+
* The `/thinking` dialog, mirroring Claude Code's ThinkingToggle.tsx: a
|
|
4
4
|
* permission-colored Pane with a bold title, the Enabled/Disabled select
|
|
5
5
|
* (with CC's option descriptions), and the Enter/Esc hint line.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThinkingToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ThinkingToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,UAAU,EACV,mBAAmB,GACpB,EAAE;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,qEAAqE;IACrE,mBAAmB,EAAE,OAAO,GAAG,IAAI,CAAA;CACpC,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"ThinkingToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ThinkingToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,UAAU,EACV,mBAAmB,GACpB,EAAE;IACD,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,qEAAqE;IACrE,mBAAmB,EAAE,OAAO,GAAG,IAAI,CAAA;CACpC,GAAG,KAAK,CAAC,SAAS,CA+ClB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from '../i18n.js';
|
|
2
3
|
import { Box, Text } from '../ui.js';
|
|
3
4
|
import { Pane } from './design-system/Pane.js';
|
|
4
5
|
import { Select } from './Select.js';
|
|
5
|
-
import {
|
|
6
|
-
import { KeyboardShortcutHint } from './design-system/KeyboardShortcutHint.js';
|
|
6
|
+
import { HintLine } from './design-system/HintLine.js';
|
|
7
7
|
/**
|
|
8
|
-
* The `/thinking` dialog,
|
|
8
|
+
* The `/thinking` dialog, mirroring Claude Code's ThinkingToggle.tsx: a
|
|
9
9
|
* permission-colored Pane with a bold title, the Enabled/Disabled select
|
|
10
10
|
* (with CC's option descriptions), and the Enter/Esc hint line.
|
|
11
11
|
*
|
|
@@ -17,14 +17,14 @@ export function ThinkingToggle({ currentValue, focusIndex, confirmationPending,
|
|
|
17
17
|
const options = [
|
|
18
18
|
{
|
|
19
19
|
value: 'true',
|
|
20
|
-
label: '
|
|
21
|
-
description: '
|
|
20
|
+
label: t('thinking-enabled'),
|
|
21
|
+
description: t('thinking-enabled-desc'),
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
value: 'false',
|
|
25
|
-
label: '
|
|
26
|
-
description: '
|
|
25
|
+
label: t('thinking-disabled'),
|
|
26
|
+
description: t('thinking-disabled-desc'),
|
|
27
27
|
},
|
|
28
28
|
];
|
|
29
|
-
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsx(Text, { color: "remember", bold: true, children:
|
|
29
|
+
return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsx(Text, { color: "remember", bold: true, children: t('thinking-title') }), _jsx(Text, { dimColor: true, children: t('thinking-subtitle') })] }), confirmationPending !== null ? (_jsxs(Box, { flexDirection: "column", marginBottom: 1, gap: 1, children: [_jsx(Text, { color: "warning", children: t('thinking-mid-warning') }), _jsx(Text, { color: "warning", children: t('thinking-proceed') })] })) : (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsx(Select, { options: options, focusIndex: focusIndex, selectedValue: currentValue ? 'true' : 'false', visibleOptionCount: 2 }) }))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: confirmationPending !== null ? t('hint-confirm-cancel') : t('hint-confirm-exit') }) })] }));
|
|
30
30
|
}
|
|
@@ -5,7 +5,7 @@ type Props = {
|
|
|
5
5
|
shouldAnimate: boolean;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* The status dot on tool-call rows
|
|
8
|
+
* The status dot on tool-call rows, mirroring Claude Code's ToolUseLoader:
|
|
9
9
|
* blinking `●` while running, green on success, red on error, dim when queued.
|
|
10
10
|
*/
|
|
11
11
|
export declare function ToolUseLoader({ isError, isUnresolved, shouldAnimate, }: Props): React.ReactNode;
|
|
@@ -4,7 +4,7 @@ import Text from '../ink/components/Text.js';
|
|
|
4
4
|
import { useBlink } from '../hooks/useBlink.js';
|
|
5
5
|
import { BLACK_CIRCLE } from '../cc/figures.js';
|
|
6
6
|
/**
|
|
7
|
-
* The status dot on tool-call rows
|
|
7
|
+
* The status dot on tool-call rows, mirroring Claude Code's ToolUseLoader:
|
|
8
8
|
* blinking `●` while running, green on success, red on error, dim when queued.
|
|
9
9
|
*/
|
|
10
10
|
export function ToolUseLoader({ isError, isUnresolved, shouldAnimate, }) {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { SpinnerMode } from './Spinner/spinnerMode.js';
|
|
3
3
|
/**
|
|
4
4
|
* The working spinner block shown between the transcript and the prompt
|
|
5
|
-
* input while a turn is in flight.
|
|
5
|
+
* input while a turn is in flight. Mirrors Claude Code's `Spinner.tsx`
|
|
6
6
|
* (SpinnerWithVerb path) with the swarm/teammate/effort/tips branches
|
|
7
7
|
* removed; the channel feeds the mode, token count and thinking status.
|
|
8
8
|
*
|
|
@@ -20,7 +20,7 @@ export declare function WorkingSpinner({ mode, hasActiveTools, responseLengthRef
|
|
|
20
20
|
/**
|
|
21
21
|
* Tracks thinking status: 'thinking' while the model is streaming reasoning,
|
|
22
22
|
* then the duration in ms for a minimum 2s display (avoids UI jank). Ported
|
|
23
|
-
* from
|
|
23
|
+
* from Claude Code's SpinnerWithVerb effect.
|
|
24
24
|
*/
|
|
25
25
|
export declare function useThinkingStatus(isThinking: boolean): 'thinking' | number | null;
|
|
26
26
|
//# sourceMappingURL=WorkingSpinner.d.ts.map
|