@deepseek-harness-tui/dsh-tui 0.6.1 → 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 +25 -7
- 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
package/README.md
CHANGED
|
@@ -17,8 +17,13 @@
|
|
|
17
17
|
|
|
18
18
|
# dsh-TUI
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
>一个美观且实用的 Claude Code 风格 TUI 插件:像素鲸鱼顶栏、双流光大字、实时工作状态行、思考流式展开、双击 Esc 时间回溯、蓝白上下文进度条 + TPS 仪表。
|
|
21
|
+
>零核心改动,纯插件挂载。安装插件即可启用,卸载后不会留下核心补丁。
|
|
22
|
+
>献给钟爱tui的各位极客们~
|
|
23
|
+
>
|
|
24
|
+
>A beautiful, practical Claude Code-style TUI plugin: pixel whale top bar, dual flowing-glow title, real-time status line, streaming thought expansion, double-Esc time rewind, blue-white context progress bar + TPS gauge.
|
|
25
|
+
>Zero core changes, pure plugin mounting. Install to enable; uninstall leaves no core patches.
|
|
26
|
+
>For all TUI-loving geeks~
|
|
22
27
|
|
|
23
28
|
## 🎉 官方收录
|
|
24
29
|
|
|
@@ -31,12 +36,12 @@
|
|
|
31
36
|
## 核心能力
|
|
32
37
|
|
|
33
38
|
- **终端原生交互**:流式 Markdown、结构化工具卡、命令与文件补全、`@` 文件引用
|
|
34
|
-
|
|
39
|
+
(消息任意位置补全,文本附加内容,PNG/JPEG/WebP/GIF 作为持久图片块发送)、历史搜索、消息选择、
|
|
35
40
|
inline/alternate-screen 两种渲染模式,以及 `/lang` 中英界面语言切换。
|
|
36
41
|
- **可观察的 Agent 状态**:实时工作状态、上下文分段进度、TPS、缓存命中率、
|
|
37
42
|
推理等级、输入/输出 token 与 Git/会话信息。
|
|
38
|
-
- **完整会话工作流**:`/resume`、`/new`、`/compact`、`/export
|
|
39
|
-
|
|
43
|
+
- **完整会话工作流**:`/resume`、`/new`、`/compact`、`/export`、`/btw` 侧问、
|
|
44
|
+
模型切换,以及双击 `Esc` 发起的会话 rewind/fork。
|
|
40
45
|
- **DSH 官方能力接入**:Agent preset、Skills、MCP、Goals、Todos、子代理、
|
|
41
46
|
`ask_user_question` 问卷都通过现有服务或注册表连接。
|
|
42
47
|
- **为长会话设计**:事件驱动投影、差分终端输出、消息虚拟化、回放合并与有界缓存,
|
|
@@ -71,6 +76,10 @@ sh install.sh
|
|
|
71
76
|
|
|
72
77
|
`dsh-tui --resume` 恢复上次会话;Windows 也可用仓库里的 `dsh-tui.cmd`(等价)。
|
|
73
78
|
|
|
79
|
+
在 VS Code 中运行的完整指南(内置终端直接使用 + companion 扩展
|
|
80
|
+
`dsh-tui-vscode` 一键启动/恢复与编辑器集成)见
|
|
81
|
+
[在 VS Code 中运行 dsh-TUI](docs/vscode.md)。
|
|
82
|
+
|
|
74
83
|
TUI 启动后会在后台检查 npm 是否有新版本;发现更新时会提示,输入 `/update`
|
|
75
84
|
即可自动更新并重启恢复当前会话。
|
|
76
85
|
|
|
@@ -91,7 +100,8 @@ TUI 启动后会在后台检查 npm 是否有新版本;发现更新时会提
|
|
|
91
100
|
| `Ctrl+R` | 历史消息搜索 |
|
|
92
101
|
| `/` | 会话内全文搜索(`n`/`N` 跳转) |
|
|
93
102
|
| `Tab` / `Enter` | 命令 / `@` 文件补全(目录可继续深入) |
|
|
94
|
-
| `Ctrl+V` |
|
|
103
|
+
| `Ctrl+V` | 粘贴文本或文件管理器中的文件;图片显示为 `[Image #N]` 并作为持久附件发送 |
|
|
104
|
+
| `Ctrl+X` | 用 `$VISUAL`/`$EDITOR`(如 nvim)打开当前输入编辑,保存退出后回填 |
|
|
95
105
|
| `?` | 快捷键菜单 |
|
|
96
106
|
| `Shift+↑` | 消息选择模式(Enter 展开单条) |
|
|
97
107
|
|
|
@@ -124,10 +134,10 @@ macOS 自带 Terminal.app 会自行消费 `⌘` 快捷键,请继续使用 `Ctr
|
|
|
124
134
|
|
|
125
135
|
| 分组 | 命令 |
|
|
126
136
|
|---|---|
|
|
127
|
-
| 会话 | `/new` 新会话 · `/resume`
|
|
137
|
+
| 会话 | `/new` 新会话 · `/resume` 切换当前工作区内的会话 · `/rename` 重命名会话 · `/workspace resume|rename|open` 管理工作区 · `/clear` 清屏 · `/compact` 压缩 · `/export` 导出 Markdown · `/trace` 轨迹场景(亦可 `Ctrl+T`) |
|
|
128
138
|
| 状态 | `/status` 会话信息 · `/cost` token 用量 · `/doctor` 环境自检 · `/config` 配置来源 · `/init` 创建 AGENTS.md |
|
|
129
139
|
| 模型 | `/model` 选择器 · `/thinking` 思考显示 · `/tokens` token 明细 · `/theme` 主题选择器 · `/lang` 中英界面切换 |
|
|
130
|
-
| 账号/策略 | `/login` 凭证状态 · `/logout` 登出说明 · `/permissions` 权限说明 · `/add-dir` 文件策略范围 · `/hooks` · `/mcp` · `/memory` |
|
|
140
|
+
| 账号/策略 | `/provider` 添加模型提供方 · `/login` 凭证状态 · `/logout` 登出说明 · `/permissions` 权限说明 · `/add-dir` 文件策略范围 · `/hooks` · `/mcp` · `/memory` |
|
|
131
141
|
| 技能 | `/audit` 代码审计 · `/bug` bug 报告 · `/review` 代码评审 · `/practice` 编程练习 · `/pr_comments` PR 评论 · `/release-notes` 发布说明 · `/vuln-check` 漏洞检查 |
|
|
132
142
|
| 其它 | `/agents` 子代理列表 · `/update` 自动更新并重启 · `/vim` · `/terminal-setup` · `/connect` · `/help` · `/exit` |
|
|
133
143
|
| 注册表 | `/plan` `/goal`(DSH 命令注册表插件,随插件自动并入 `/` 菜单) |
|
|
@@ -141,7 +151,9 @@ macOS 自带 Terminal.app 会自行消费 `⌘` 快捷键,请继续使用 `Ctr
|
|
|
141
151
|
| [主题系统](docs/themes.md) | 内置主题、自动检测、自定义 JSON 主题与校验规则 |
|
|
142
152
|
| [交互与命令](docs/interaction.md) | 快捷键、鼠标、问卷、slash command 与会话工作流 |
|
|
143
153
|
| [架构与限制](docs/architecture.md) | 运行链路、渲染与持久化设计、安全边界、已知限制 |
|
|
154
|
+
| [VS Code 使用指南](docs/vscode.md) | 在 VS Code 集成终端运行 dsh-tui 与 companion 扩展 `dsh-tui-vscode` |
|
|
144
155
|
| [贡献与开发约定](docs/contributing.md) | 贡献流程、仓库地图、构建产物、验证矩阵与修改规则 |
|
|
156
|
+
| [插件开发指南](docs/plugins.md) | 插件接缝(会话事件 / 槽位 / 技能 / 主题 / prompt 段)、契约、规范与收录 |
|
|
145
157
|
|
|
146
158
|
完整的中英文索引见 [`docs/README.md`](docs/README.md)。
|
|
147
159
|
|
|
@@ -149,11 +161,11 @@ macOS 自带 Terminal.app 会自行消费 `⌘` 快捷键,请继续使用 `Ctr
|
|
|
149
161
|
|
|
150
162
|
- **Agent preset**:四种官方 Agent 模式(`standard` / `code` / `minimal` / `cordis`),
|
|
151
163
|
`/preset` 切换;已产生对话的会话不可切换,空白会话立即生效。默认 preset 持久化
|
|
152
|
-
在 `~/.dsh-
|
|
164
|
+
在 `~/.dsh-tui/agent-preset.json`;`/model` 的选择持久化在 `~/.dsh-tui/model.json`。
|
|
153
165
|
详见[配置参考](docs/configuration.md#agent-preset)。
|
|
154
|
-
- **自定义主题**:`/theme`
|
|
155
|
-
`~/.dsh-
|
|
156
|
-
`
|
|
166
|
+
- **自定义主题**:`/theme` 选择器(`auto` 跟随系统/终端背景,内置 `light` / `dark` /
|
|
167
|
+
`dark-ansi`),也支持 `~/.dsh-tui/themes/<名字>.json` 自定义主题,选中即热切换
|
|
168
|
+
并持久化;`DSH_TUI_THEME` 环境变量 > 持久化选择 > OSC 11 终端背景自动检测。
|
|
157
169
|
详见[主题系统](docs/themes.md)。
|
|
158
170
|
- **MCP**:通过 `@deepseek-ai/dsh-mcp-client` 挂载服务器,工具以
|
|
159
171
|
`mcp__<服务器>__<工具>` 注册;`/mcp` 查看连接状态。
|
|
@@ -177,6 +189,11 @@ TUI 只负责交互与呈现。会话日志是对话真源,模型调用、工
|
|
|
177
189
|
compaction 和持久化继续由 DSH 服务拥有。更详细的模块边界与性能设计见
|
|
178
190
|
[架构文档](docs/architecture.md)。
|
|
179
191
|
|
|
192
|
+
```text
|
|
193
|
+
聊天 / 工具基础事件 ──> 持久 Session 日志 ──> TUI / Web
|
|
194
|
+
└──────────────> ActivityTracker(内存)──> 仅 TUI 状态栏
|
|
195
|
+
```
|
|
196
|
+
|
|
180
197
|
## 技术要点
|
|
181
198
|
|
|
182
199
|
- **Gentle Mist Blue 配色**:雾蓝只承担品牌、焦点、交互与高亮,正文保持中性灰;
|
|
@@ -187,23 +204,31 @@ compaction 和持久化继续由 DSH 服务拥有。更详细的模块边界与
|
|
|
187
204
|
- **上下文进度条**:参考 pi-nano-context 算法(最大余数法分段着色 + 多级缩略读数)。
|
|
188
205
|
- **TPS 仪表**:参考 pi-tps-meter——流式 1/8 格 gauge、历史 min-max sparkline、
|
|
189
206
|
速度语义色(≥50 绿 / ≥20 黄 / <20 红)。
|
|
190
|
-
- **working-activity
|
|
207
|
+
- **working-activity 生态**:工作状态行复用
|
|
191
208
|
[dsh-working-activity](https://github.com/ccch1mneyyy/dsh-working-activity)
|
|
192
|
-
|
|
193
|
-
- **终端粘贴**:raw 模式下 Ctrl+V
|
|
194
|
-
|
|
209
|
+
的纯状态机,在进程内从基础会话事件派生,不向共享日志写入 UI 状态。
|
|
210
|
+
- **终端粘贴**:raw 模式下 Ctrl+V 由应用接管,按平台读取系统剪贴板——Windows
|
|
211
|
+
走 PowerShell `Get-Clipboard`,macOS 走 `osascript`/`pbpaste`,Linux 自动探测
|
|
212
|
+
`wl-paste`/`xclip`/`xsel`;普通文件插入路径,图片文件生成 `@` 引用,剪贴板位图
|
|
213
|
+
写入附件库并在输入框显示 `[Image #N]`,纯文本原样插入光标处。
|
|
195
214
|
|
|
196
215
|
## 已知限制
|
|
197
216
|
|
|
198
217
|
- 注入上下文(plugin source 内容)未做独立展示,随系统提示词并入进度条统计。
|
|
199
218
|
- `/model` 实时切换走"会话 fork 续聊"(DSH 无原位换模型 API):历史原样保留,
|
|
200
219
|
新会话路由到新模型,旧会话仍留在 `/resume` 列表里;选择写入
|
|
201
|
-
`~/.dsh-
|
|
202
|
-
- `Ctrl+V`
|
|
203
|
-
|
|
220
|
+
`~/.dsh-tui/model.json`,重启与 `/new` 均沿用。
|
|
221
|
+
- `Ctrl+V` 读剪贴板按平台依赖外部工具:Windows 用 PowerShell `Get-Clipboard`
|
|
222
|
+
(剪贴板被其他进程短暂锁定时自动重试,持续锁定时静默放弃);macOS 用
|
|
223
|
+
`osascript`/`pbpaste`(Finder 多文件复制没有稳定的 AppleScript 读法,按
|
|
224
|
+
文本/图片回退);Linux 需要 `wl-paste`/`xclip`/`xsel` 之一且会话可连接
|
|
225
|
+
(工具缺失或会话不可连接时提示无可用剪贴板工具)。不受支持的图片格式或附件
|
|
226
|
+
服务不可用时会保留临时文件引用作为降级路径。
|
|
204
227
|
- 退出时以进程退出收尾,不等待 agent 异步落盘(持久化由 persistence 插件兜底)。
|
|
205
|
-
-
|
|
206
|
-
|
|
228
|
+
- 工具级审批已实现:approval 服务 + TUI answerer(CC 式审批面板)消费审批流,
|
|
229
|
+
权限提升命令会弹出审批条。`/permission` 预设切换由 dsh-base 的
|
|
230
|
+
`permission-presets` 插件提供,profile 组合默认可用;裸组合 `cordis.yml`
|
|
231
|
+
未挂载该插件(无 `/permission` 命令)。
|
|
207
232
|
- `/vim` `/connect` `/hooks` `/memory` 为 CC 同名占位:对应能力在 DSH 侧无等价
|
|
208
233
|
机制,命令会给出明确说明而非静默。
|
|
209
234
|
|
|
@@ -222,6 +247,28 @@ pnpm smoke
|
|
|
222
247
|
`pnpm build` 会把 `src/` 编译到已提交的 `lib/types/`。修改源码时必须同步生成产物;
|
|
223
248
|
渲染、问卷和工具卡还需运行对应回归脚本。
|
|
224
249
|
|
|
250
|
+
## 插件生态
|
|
251
|
+
|
|
252
|
+
想为 dsh-TUI 做插件/扩展?欢迎加入生态:
|
|
253
|
+
|
|
254
|
+
- **插件开发指南**:[`docs/plugins.md`](docs/plugins.md)(接缝、契约、规范与验证清单)
|
|
255
|
+
- **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem)(社区插件与模板的家)
|
|
256
|
+
- **模板仓库**:[plugin-template](https://github.com/dsh-tui-ecosystem/plugin-template)(从模板起步,5 分钟出一个插件)
|
|
257
|
+
- **参考实现**:`dsh-working-activity`(实时工作状态行:TUI 槽位 + `activity/status` 会话事件双出口)
|
|
258
|
+
|
|
259
|
+
核心仓库不迁移、社区插件独立成仓——组织只负责收录与背书,插件作者对自己的仓库保持完全所有权。
|
|
260
|
+
|
|
261
|
+
## 社区
|
|
262
|
+
|
|
263
|
+
- **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem) —— 社区插件、模板与收录列表的家。欢迎来发插件、提创意、互相取暖 🐋
|
|
264
|
+
- **社区交流群**:使用问题、插件创意、功能许愿,都欢迎进来聊。
|
|
265
|
+
|
|
266
|
+
| 微信群 | QQ 群(群号 572549239) |
|
|
267
|
+
| :---: | :---: |
|
|
268
|
+
| <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> |
|
|
269
|
+
|
|
270
|
+
> 微信群二维码约 7 天过期一次,如遇失效请走 QQ 群(572549239),或开个 issue 提醒我们更新。
|
|
271
|
+
|
|
225
272
|
## 权限与安全边界
|
|
226
273
|
|
|
227
274
|
`dsh-TUI` 不实现独立沙箱,而是使用当前 DSH profile 的文件、Shell、sandbox 与
|
|
@@ -235,6 +282,12 @@ Windows 当前没有对应的沙箱后端,组合会退回到 `danger-full-acce
|
|
|
235
282
|
|
|
236
283
|
朋友们开发的[社区、相关项目与周边工具](docs/links.md)
|
|
237
284
|
|
|
285
|
+
## 趋势
|
|
286
|
+
|
|
287
|
+
<!-- star-history:start -->
|
|
288
|
+
[](https://star-history.com/#ccch1mneyyy/dsh-TUI&Date)
|
|
289
|
+
<!-- star-history:end -->
|
|
290
|
+
|
|
238
291
|
|
|
239
292
|
## License
|
|
240
293
|
|
package/bin/dsh-tui.js
CHANGED
|
@@ -9,81 +9,171 @@
|
|
|
9
9
|
* 2. 检测 $DSH_HOME/profiles/dsh-tui 是否已初始化,未初始化则自动执行
|
|
10
10
|
* `dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui@<本包版本>`
|
|
11
11
|
* 自举——版本号与本包对齐,避免 pnpm store 缓存带来的旧版漂移;
|
|
12
|
-
* 3.
|
|
12
|
+
* 3. 已初始化但版本与本包不一致时打印一行提示(TUI 内 /update 或重新 add);
|
|
13
|
+
* 4. 透传全部参数启动 `dsh --profile dsh-tui`。
|
|
13
14
|
*
|
|
14
|
-
* `--resume` 由本启动器拦截:读取 TUI
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* `--resume` 由本启动器拦截:读取 TUI 保留的 ~/.dsh-tui/resume.txt
|
|
16
|
+
* (旧路径 ~/.dsh-cc/resume.txt 兜底,直到旧版 TUI 退场——见
|
|
17
|
+
* src/sessionHistory.ts 的启动器契约,issue #120),以
|
|
18
|
+
* DSH_TUI_RESUME_SESSION(并兼容写 DSH_CC_RESUME_SESSION)环境变量喂回,
|
|
19
|
+
* 该 flag 本身不再传给 dsh。
|
|
20
|
+
*
|
|
21
|
+
* 面向用户的消息走下方 MSG 双语表:与 TUI 的语言契约一致——
|
|
22
|
+
* `DSH_TUI_LANG` 显式指定时从其值,否则默认中文(同 src/i18n.ts 的缺省)。
|
|
17
23
|
*/
|
|
18
24
|
import { spawn, spawnSync } from 'node:child_process'
|
|
19
25
|
import { existsSync, readFileSync } from 'node:fs'
|
|
20
26
|
import { homedir } from 'node:os'
|
|
21
|
-
import { join } from 'node:path'
|
|
27
|
+
import { isAbsolute, join, resolve } from 'node:path'
|
|
22
28
|
import { fileURLToPath } from 'node:url'
|
|
29
|
+
import { shellQuote } from '../lib/types/utils/shellQuote.js'
|
|
30
|
+
import { detectLegacyEnv, RENAMED_ENV } from '../lib/types/utils/paths.js'
|
|
23
31
|
|
|
24
32
|
const here = fileURLToPath(new URL('.', import.meta.url))
|
|
25
33
|
const ownVersion = JSON.parse(readFileSync(join(here, '..', 'package.json'), 'utf8')).version
|
|
26
34
|
const PACKAGE = '@deepseek-harness-tui/dsh-tui'
|
|
27
35
|
const PROFILE = 'dsh-tui'
|
|
28
36
|
|
|
37
|
+
// --- 双语消息表(启动器跑在 TUI boot 之前,无法复用 src/i18n.ts)-------------
|
|
38
|
+
// 与 TUI 一致:DSH_TUI_LANG 显式指定才生效,否则默认中文;旧名 CC_TUI_LANG
|
|
39
|
+
// 仅用于让警告本身以用户习惯的语言显示(配置不再从旧名生效)。
|
|
40
|
+
const lang = (process.env.DSH_TUI_LANG ?? process.env.CC_TUI_LANG) === 'en' ? 'en' : 'zh'
|
|
41
|
+
const MSG = {
|
|
42
|
+
noDsh: {
|
|
43
|
+
en: '[dsh-tui] dsh CLI not found. Install the official client first:\n npm install -g @deepseek-ai/dsh',
|
|
44
|
+
zh: '[dsh-tui] 未检测到 dsh CLI。请先安装官方客户端:\n npm install -g @deepseek-ai/dsh',
|
|
45
|
+
},
|
|
46
|
+
noPnpm: {
|
|
47
|
+
en: '[dsh-tui] The first-time setup needs pnpm (dsh plugin delegates installs to it):\n npm install -g pnpm (or via corepack: corepack enable pnpm)',
|
|
48
|
+
zh: '[dsh-tui] 首次安装需要 pnpm(dsh plugin 会把安装转发给它):\n npm install -g pnpm (或启用 corepack:corepack enable pnpm)',
|
|
49
|
+
},
|
|
50
|
+
bootstrapStart: {
|
|
51
|
+
en: `[dsh-tui] First run — initializing the ${PROFILE} profile (${PACKAGE}@${ownVersion})…`,
|
|
52
|
+
zh: `[dsh-tui] 首次运行,正在初始化 ${PROFILE} profile(${PACKAGE}@${ownVersion})…`,
|
|
53
|
+
},
|
|
54
|
+
installFailed: {
|
|
55
|
+
en: `[dsh-tui] Plugin install failed. Retry manually later:\n dsh plugin --profile ${PROFILE} add ${PACKAGE}@${ownVersion}`,
|
|
56
|
+
zh: `[dsh-tui] 插件安装失败。可稍后手工重试:\n dsh plugin --profile ${PROFILE} add ${PACKAGE}@${ownVersion}`,
|
|
57
|
+
},
|
|
58
|
+
versionMismatch: {
|
|
59
|
+
en: (installed, own) =>
|
|
60
|
+
`[dsh-tui] note: the profile is running v${installed} but this launcher is v${own}.\n` +
|
|
61
|
+
` To update the profile: run /update inside the TUI, or:\n` +
|
|
62
|
+
` dsh plugin --profile ${PROFILE} add ${PACKAGE}@latest`,
|
|
63
|
+
zh: (installed, own) =>
|
|
64
|
+
`[dsh-tui] 提示:profile 内运行的是 v${installed},而启动器是 v${own}。\n` +
|
|
65
|
+
` 更新 profile:在 TUI 内执行 /update,或运行:\n` +
|
|
66
|
+
` dsh plugin --profile ${PROFILE} add ${PACKAGE}@latest`,
|
|
67
|
+
},
|
|
68
|
+
launchFailed: {
|
|
69
|
+
en: err => `[dsh-tui] Failed to launch: ${err.message}`,
|
|
70
|
+
zh: err => `[dsh-tui] 启动失败:${err.message}`,
|
|
71
|
+
},
|
|
72
|
+
legacyEnv: {
|
|
73
|
+
en: (oldName, newName) => `[dsh-tui] note: env ${oldName} was renamed to ${newName}; the old name no longer takes effect.`,
|
|
74
|
+
zh: (oldName, newName) => `[dsh-tui] 提示:环境变量 ${oldName} 已更名为 ${newName},旧名不再生效。`,
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
const msg = key => MSG[key][lang]
|
|
78
|
+
|
|
29
79
|
// React 开发构建会把每次渲染的 performance.measure() 堆进无界缓冲区导致
|
|
30
80
|
// 长会话 OOM——与仓库根 dsh-tui.cmd 保持一致,强制 production。
|
|
31
81
|
process.env.NODE_ENV ??= 'production'
|
|
32
82
|
|
|
33
83
|
const isWin = process.platform === 'win32'
|
|
34
84
|
// Windows 上 .cmd shim 必须经 shell 启动(Node ≥18.20.2 的安全限制);
|
|
35
|
-
// 其余平台直接 spawn 无后缀的 dsh。
|
|
85
|
+
// 其余平台直接 spawn 无后缀的 dsh。cmd.exe 以空格拼接参数且 Node 不做
|
|
86
|
+
// 转义——shell 路径的所有参数必须先过 shellQuote(同 src/update.ts 的
|
|
87
|
+
// /update 重启路径),否则含空格/引号的参数会被拆断。
|
|
36
88
|
const shellOpt = isWin ? { shell: true } : {}
|
|
89
|
+
// DEP0190(issue #148):Node ≥22 对「shell:true + 非空参数数组」的调用
|
|
90
|
+
// 发出弃用警告,判定是语法级的——参数已过 shellQuote 也一样告警;且未来
|
|
91
|
+
// 大版本可能升级为运行时错误。把转义后的参数拼进命令字符串传入
|
|
92
|
+
// (shell:true + 空参数数组不触发),非 Windows 路径保持数组直传。
|
|
93
|
+
const cmd = (command, args) =>
|
|
94
|
+
isWin ? [`${command} ${shellQuote(args).join(' ')}`, []] : [command, args]
|
|
37
95
|
|
|
38
96
|
// --- 1. dsh CLI 预检 ---------------------------------------------------------
|
|
39
|
-
const probe = spawnSync('dsh', ['--version'], { stdio: 'pipe', ...shellOpt })
|
|
97
|
+
const probe = spawnSync(...cmd('dsh', ['--version']), { stdio: 'pipe', ...shellOpt })
|
|
40
98
|
if (probe.error || probe.status !== 0) {
|
|
41
|
-
console.error('
|
|
42
|
-
console.error(' npm install -g @deepseek-ai/dsh')
|
|
99
|
+
console.error(msg('noDsh'))
|
|
43
100
|
process.exit(1)
|
|
44
101
|
}
|
|
45
102
|
|
|
46
|
-
// --- 2. profile
|
|
103
|
+
// --- 2. profile 自举与版本检查 -------------------------------------------------
|
|
47
104
|
const dshHome = process.env.DSH_HOME || join(homedir(), '.dsh')
|
|
48
105
|
const profileDir = join(dshHome, 'profiles', PROFILE)
|
|
49
|
-
|
|
50
|
-
|
|
106
|
+
// 以已装包的 package.json 可读为准(而非目录存在):安装中途失败留下的
|
|
107
|
+
// 残骸目录会触发重新安装,而不是以坏 profile 直接启动。
|
|
108
|
+
let installedVersion
|
|
109
|
+
try {
|
|
110
|
+
installedVersion = JSON.parse(
|
|
111
|
+
readFileSync(join(profileDir, 'node_modules', '@deepseek-harness-tui', 'dsh-tui', 'package.json'), 'utf8'),
|
|
112
|
+
).version
|
|
113
|
+
} catch {
|
|
114
|
+
installedVersion = undefined
|
|
115
|
+
}
|
|
116
|
+
if (installedVersion === undefined) {
|
|
117
|
+
const pnpmProbe = spawnSync(...cmd('pnpm', ['--version']), { stdio: 'pipe', ...shellOpt })
|
|
51
118
|
if (pnpmProbe.error || pnpmProbe.status !== 0) {
|
|
52
|
-
console.error('
|
|
53
|
-
console.error(' npm install -g pnpm (或启用 corepack:corepack enable pnpm)')
|
|
119
|
+
console.error(msg('noPnpm'))
|
|
54
120
|
process.exit(1)
|
|
55
121
|
}
|
|
56
|
-
console.log(
|
|
57
|
-
const add = spawnSync('dsh', ['plugin', '--profile', PROFILE, 'add', `${PACKAGE}@${ownVersion}`], { stdio: 'inherit', ...shellOpt })
|
|
122
|
+
console.log(msg('bootstrapStart'))
|
|
123
|
+
const add = spawnSync(...cmd('dsh', ['plugin', '--profile', PROFILE, 'add', `${PACKAGE}@${ownVersion}`]), { stdio: 'inherit', ...shellOpt })
|
|
58
124
|
if (add.status !== 0) {
|
|
59
|
-
console.error('
|
|
60
|
-
console.error(` dsh plugin --profile ${PROFILE} add ${PACKAGE}@${ownVersion}`)
|
|
125
|
+
console.error(msg('installFailed'))
|
|
61
126
|
process.exit(add.status ?? 1)
|
|
62
127
|
}
|
|
128
|
+
} else if (installedVersion !== ownVersion) {
|
|
129
|
+
console.error(MSG.versionMismatch[lang](installedVersion, ownVersion))
|
|
63
130
|
}
|
|
64
131
|
|
|
65
132
|
// --- 3. --resume 拦截 ---------------------------------------------------------
|
|
133
|
+
// 换名过渡(issue #120):全局 bin 与 profile 内 TUI 包版本可能错位,所以
|
|
134
|
+
// env 双写(新旧名都设),文件读取新路径优先、旧路径兜底。
|
|
66
135
|
const args = []
|
|
67
136
|
for (const a of process.argv.slice(2)) {
|
|
68
137
|
if (a === '--resume') {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
138
|
+
let sessionId = ''
|
|
139
|
+
for (const dir of ['.dsh-tui', '.dsh-cc']) {
|
|
140
|
+
try {
|
|
141
|
+
sessionId = readFileSync(join(homedir(), dir, 'resume.txt'), 'utf8').trim()
|
|
142
|
+
if (sessionId) break
|
|
143
|
+
} catch {
|
|
144
|
+
// 没有历史会话可恢复——静默忽略,正常冷启动。
|
|
145
|
+
}
|
|
73
146
|
}
|
|
147
|
+
if (sessionId) {
|
|
148
|
+
process.env.DSH_TUI_RESUME_SESSION = sessionId
|
|
149
|
+
process.env.DSH_CC_RESUME_SESSION = sessionId
|
|
150
|
+
}
|
|
151
|
+
} else if (
|
|
152
|
+
process.env.DSH_TUI_WORKSPACE_TARGET === undefined
|
|
153
|
+
&& !a.startsWith('-')
|
|
154
|
+
&& (isAbsolute(a) || /^[a-z][a-z0-9+.-]*:\/\//iu.test(a) || existsSync(resolve(a)))
|
|
155
|
+
) {
|
|
156
|
+
// A workspace target is launcher syntax, not an argument for the profile
|
|
157
|
+
// app. The registry resolves local paths/file URLs and provider URIs.
|
|
158
|
+
process.env.DSH_TUI_WORKSPACE_TARGET = a
|
|
74
159
|
} else {
|
|
75
160
|
args.push(a)
|
|
76
161
|
}
|
|
77
162
|
}
|
|
78
163
|
|
|
164
|
+
// --- 3.5 旧环境变量警告(必须在 TUI 渲染前输出,fullscreen 下写 stderr 会破坏界面)
|
|
165
|
+
for (const oldName of detectLegacyEnv()) {
|
|
166
|
+
console.error(MSG.legacyEnv[lang](oldName, RENAMED_ENV[oldName]))
|
|
167
|
+
}
|
|
168
|
+
|
|
79
169
|
// --- 4. 启动 ------------------------------------------------------------------
|
|
80
|
-
const child = spawn('dsh', ['--profile', PROFILE, ...args], {
|
|
170
|
+
const child = spawn(...cmd('dsh', ['--profile', PROFILE, ...args]), {
|
|
81
171
|
stdio: 'inherit',
|
|
82
172
|
env: process.env,
|
|
83
173
|
...shellOpt,
|
|
84
174
|
})
|
|
85
|
-
child.on('error',
|
|
86
|
-
console.error(
|
|
175
|
+
child.on('error', err => {
|
|
176
|
+
console.error(MSG.launchFailed[lang](err))
|
|
87
177
|
process.exit(1)
|
|
88
178
|
})
|
|
89
179
|
child.on('exit', (code, signal) => {
|
package/cordis.patch.yml
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
# ── surface-specific values over the dsh-base layer ─────────────────────────
|
|
13
13
|
|
|
14
|
-
# The dsh-tui deployment persona;
|
|
14
|
+
# The dsh-tui deployment persona; DSH_TUI_PERSONA overrides the coding-agent
|
|
15
15
|
# default (the base persona is empty).
|
|
16
16
|
- id: system-prompt
|
|
17
17
|
config:
|
|
18
|
-
persona: !!js process.env.
|
|
18
|
+
persona: !!js process.env.DSH_TUI_PERSONA ?? 'You are a coding agent.'
|
|
19
19
|
|
|
20
20
|
# The native DeepSeek adapter, pinned to the harness defaults: full thinking
|
|
21
21
|
# at max effort, key and base URL from the launching environment. The base
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
# Sessions live in the shared JSONL store (~/.dsh/sessions) — the same
|
|
144
144
|
# backend dsh web writes — so /resume here and the web session list see each
|
|
145
145
|
# other (#24). The row itself comes from the dsh-base layer; this override
|
|
146
|
-
# only re-points the root when
|
|
146
|
+
# only re-points the root when DSH_TUI_SESSION_ROOT is set (test isolation).
|
|
147
147
|
- id: session-persistence-jsonl
|
|
148
148
|
config:
|
|
149
|
-
root: !!js process.env.
|
|
149
|
+
root: !!js process.env.DSH_TUI_SESSION_ROOT ?? dshHomePath('sessions')
|
|
150
150
|
|
|
151
151
|
# ── dsh-tui rows ────────────────────────────────────────────────────────────
|
|
152
152
|
|
|
@@ -159,6 +159,35 @@
|
|
|
159
159
|
# `ctx.userQuestions`.
|
|
160
160
|
|
|
161
161
|
- insert:
|
|
162
|
+
# Workspace grouping is a separate durable ledger, not a cwd-derived
|
|
163
|
+
# projection. Mount the same domain stack and storage root as dsh-web-app
|
|
164
|
+
# so TUI-created sessions can attach to the exact registry Web reads.
|
|
165
|
+
- id: storage
|
|
166
|
+
name: '@deepseek-ai/dsh-storage'
|
|
167
|
+
|
|
168
|
+
- id: storage-json
|
|
169
|
+
name: '@deepseek-ai/dsh-storage-json'
|
|
170
|
+
config:
|
|
171
|
+
root: !!js dshHomePath('storages')
|
|
172
|
+
|
|
173
|
+
- id: storage-domain
|
|
174
|
+
name: '@deepseek-ai/dsh-storage-domain'
|
|
175
|
+
config:
|
|
176
|
+
backend: json
|
|
177
|
+
|
|
178
|
+
- id: workspace
|
|
179
|
+
name: '@deepseek-ai/dsh-workspace'
|
|
180
|
+
|
|
181
|
+
# Generic terminal workspace registry. Optional plugins add providers;
|
|
182
|
+
# the TUI itself always supplies LOCAL and has no provider-specific code.
|
|
183
|
+
- id: dsh-tui-workspaces
|
|
184
|
+
name: '@deepseek-harness-tui/dsh-tui/workspaces'
|
|
185
|
+
|
|
186
|
+
# Optional plugins contribute nested slash-command completion here;
|
|
187
|
+
# execution and durable command events remain owned by dsh-commands.
|
|
188
|
+
- id: dsh-tui-command-trees
|
|
189
|
+
name: '@deepseek-harness-tui/dsh-tui/command-trees'
|
|
190
|
+
|
|
162
191
|
# The agent-preset roster (issue #8): `ctx.agentPresets`, the service the
|
|
163
192
|
# TUI composes every session's model-facing world from. No `roots` here —
|
|
164
193
|
# the dsh CLI's profile-boot overlays its shipped `config/agent-presets/`
|
|
@@ -180,10 +209,15 @@
|
|
|
180
209
|
|
|
181
210
|
# The interactive front door. The plugin creates/resumes its agent at
|
|
182
211
|
# runtime, seeds the startup status line, and disposes the whole app tree
|
|
183
|
-
# (exiting the process) when the TUI unmounts. `dsh-tui
|
|
184
|
-
# feeds the session id through
|
|
212
|
+
# (exiting the process) when the TUI unmounts. `dsh-tui --resume`
|
|
213
|
+
# feeds the session id through DSH_TUI_RESUME_SESSION (the pre-rename
|
|
214
|
+
# DSH_CC_RESUME_SESSION is still honored as a fallback for old
|
|
215
|
+
# launchers — TODO: drop once they age out, issue #120).
|
|
185
216
|
- id: dsh-tui
|
|
186
217
|
name: '@deepseek-harness-tui/dsh-tui'
|
|
218
|
+
# The entry-level dependency augments the plugin's `agents` inject and
|
|
219
|
+
# prevents startup Session creation from racing WorkspaceRegistry init.
|
|
220
|
+
inject: [workspaceRegistry, agents, tuiWorkspaces]
|
|
187
221
|
config:
|
|
188
222
|
provider: deepseek-official
|
|
189
223
|
# Alt-screen fullscreen(CC 同款):应用内鼠标选区(选择即复制, OSC 52 +
|
|
@@ -193,14 +227,34 @@
|
|
|
193
227
|
fullscreen: false
|
|
194
228
|
# 每个请求实际生效的推理强度,按当前路由的 adapter 档位校验
|
|
195
229
|
# (deepseek: off/high/max)——不在档位表里的值被忽略,回落 adapter
|
|
196
|
-
# 默认值。优先于持久化的 Shift+Tab 选择(~/.dsh-
|
|
230
|
+
# 默认值。优先于持久化的 Shift+Tab 选择(~/.dsh-tui/effort.json);
|
|
197
231
|
# 同时作为顶栏/状态栏的启动显示,首个请求头回来后以实际值为准。
|
|
198
232
|
effort: max
|
|
199
|
-
#
|
|
200
|
-
#
|
|
233
|
+
# Shift+Tab session-mode cycle (array order IS the cycle order;
|
|
234
|
+
# absent → the built-in default/plan/full trio below). Each entry
|
|
235
|
+
# may declare any subset of the plan (on/off), sandbox (read-only/
|
|
236
|
+
# workspace-write/danger-full-access), and approval (ask/never)
|
|
237
|
+
# atoms; undeclared atoms are untouched. Entry index 0 is the
|
|
238
|
+
# unmarked base mode.
|
|
239
|
+
# modes:
|
|
240
|
+
# - id: default
|
|
241
|
+
# plan: false
|
|
242
|
+
# sandbox: workspace-write
|
|
243
|
+
# approval: ask
|
|
244
|
+
# - id: plan
|
|
245
|
+
# plan: true
|
|
246
|
+
# sandbox: read-only
|
|
247
|
+
# approval: ask
|
|
248
|
+
# - id: full
|
|
249
|
+
# plan: false
|
|
250
|
+
# sandbox: danger-full-access
|
|
251
|
+
# approval: never
|
|
252
|
+
# Static preset choice (DSH_TUI_PRESET overrides): wins over the
|
|
253
|
+
# persisted `/preset` preference (~/.dsh-tui/agent-preset.json), which
|
|
201
254
|
# wins over the roster default (standard).
|
|
202
|
-
preset: !!js process.env.
|
|
203
|
-
|
|
255
|
+
preset: !!js process.env.DSH_TUI_PRESET ?? undefined
|
|
256
|
+
workspace: !!js process.env.DSH_TUI_WORKSPACE_TARGET ?? undefined
|
|
257
|
+
sessionId: !!js process.env.DSH_TUI_RESUME_SESSION ?? process.env.DSH_CC_RESUME_SESSION ?? undefined
|
|
204
258
|
|
|
205
259
|
# Live working-line data source (thinking copy / running tool / turn
|
|
206
260
|
# summary). Mounted through @deepseek-harness-tui/dsh-tui's own
|
|
@@ -210,13 +264,11 @@
|
|
|
210
264
|
# dependency into the profile root (npm's flat layout hid this), so the
|
|
211
265
|
# bare name died with ERR_MODULE_NOT_FOUND and disposed the whole app at
|
|
212
266
|
# boot (#60).
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
216
|
-
# types via src/compat/sessionLog.ts — the TUI is the protected consumer;
|
|
217
|
-
# the bare plugin stays default-off for unprotected web/headless users.
|
|
267
|
+
# The plugin stays mounted for its narration/system-prompt features. The
|
|
268
|
+
# TUI derives its working line in-process from the base session stream;
|
|
269
|
+
# never persist activity/status, so the shared log remains Web-readable.
|
|
218
270
|
- id: working-activity
|
|
219
271
|
name: '@deepseek-harness-tui/dsh-tui/working-activity'
|
|
220
272
|
config:
|
|
221
|
-
publish:
|
|
273
|
+
publish: false
|
|
222
274
|
publishIntervalMs: 500
|
package/cordis.yml
CHANGED
|
@@ -9,8 +9,29 @@
|
|
|
9
9
|
- id: user-questions
|
|
10
10
|
name: '@deepseek-ai/dsh-user-questions'
|
|
11
11
|
|
|
12
|
+
# The approval service (issue #49): the harness's sandbox escalation seam
|
|
13
|
+
# (`sandbox_permissions: danger-full-access`) asks ApprovalService.request(),
|
|
14
|
+
# which dispatches an `approval/request` waterfall; dsh-tui registers itself
|
|
15
|
+
# as the interactive answerer (ApprovalStore + approval panel). Without this
|
|
16
|
+
# row the waterfall has no service and fail-closes to 'unavailable'. Policy
|
|
17
|
+
# expression mirrors the profile cordis.patch.yml row exactly (verified by
|
|
18
|
+
# scripts/verify-cordis-approval.mjs): ask everywhere except
|
|
19
|
+
# danger-full-access (nothing needs asking) and Windows (no sandbox — the
|
|
20
|
+
# user's terminal trust model, matching every other terminal coding agent).
|
|
21
|
+
- id: approval
|
|
22
|
+
name: '@deepseek-ai/dsh-user-approval'
|
|
23
|
+
config:
|
|
24
|
+
policy: !!js "process.platform === 'win32' ? 'never' : ((process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask')"
|
|
25
|
+
|
|
26
|
+
- id: dsh-tui-workspaces
|
|
27
|
+
name: '@deepseek-harness-tui/dsh-tui/workspaces'
|
|
28
|
+
|
|
29
|
+
- id: dsh-tui-command-trees
|
|
30
|
+
name: '@deepseek-harness-tui/dsh-tui/command-trees'
|
|
31
|
+
|
|
12
32
|
- id: dsh-tui
|
|
13
33
|
name: '@deepseek-harness-tui/dsh-tui'
|
|
34
|
+
inject: [agents, tuiWorkspaces]
|
|
14
35
|
config:
|
|
15
36
|
provider: deepseek-official
|
|
16
37
|
# Alt-screen fullscreen (CC 同款): 应用内鼠标选区(选择即复制, OSC 52 +
|
|
@@ -20,11 +41,30 @@
|
|
|
20
41
|
# Reasoning effort applied to every request, validated against the live
|
|
21
42
|
# route's adapter levels (deepseek: off/high/max) — an unlisted level is
|
|
22
43
|
# ignored and the adapter default applies. Wins over the persisted
|
|
23
|
-
# Shift+Tab choice (~/.dsh-
|
|
44
|
+
# Shift+Tab choice (~/.dsh-tui/effort.json); also seeds the startup
|
|
24
45
|
# header/statusline until the first request header reports the live value.
|
|
25
46
|
effort: max
|
|
26
|
-
#
|
|
27
|
-
|
|
47
|
+
# Shift+Tab 会话模式循环(数组顺序即循环顺序;缺省为下面三档)。
|
|
48
|
+
# 每档可声明 plan(计划模式开/关)、sandbox(read-only/
|
|
49
|
+
# workspace-write/danger-full-access)、approval(ask/never)三个
|
|
50
|
+
# 原子的任意子集;未声明的原子不动。首档(index 0)为无标记基态。
|
|
51
|
+
# modes:
|
|
52
|
+
# - id: default
|
|
53
|
+
# plan: false
|
|
54
|
+
# sandbox: workspace-write
|
|
55
|
+
# approval: ask
|
|
56
|
+
# - id: plan
|
|
57
|
+
# plan: true
|
|
58
|
+
# sandbox: read-only
|
|
59
|
+
# approval: ask
|
|
60
|
+
# - id: full
|
|
61
|
+
# plan: false
|
|
62
|
+
# sandbox: danger-full-access
|
|
63
|
+
# approval: never
|
|
64
|
+
# feeds the chosen session id through this env var (DSH_TUI_ name; the
|
|
65
|
+
# pre-rename DSH_CC_ spelling is still honored, issue #120).
|
|
66
|
+
sessionId: !!js process.env.DSH_TUI_RESUME_SESSION ?? process.env.DSH_CC_RESUME_SESSION ?? undefined
|
|
67
|
+
workspace: !!js process.env.DSH_TUI_WORKSPACE_TARGET ?? undefined
|
|
28
68
|
|
|
29
69
|
# The DeepSeek adapter. Shipped default: full thinking at max effort.
|
|
30
70
|
# rc.6 schema key is `apiKeyEnv` (a credential-ref env var NAME, default
|
|
@@ -106,7 +146,7 @@
|
|
|
106
146
|
- id: agent-spine
|
|
107
147
|
name: '@deepseek-ai/dsh-agent-spine-demo'
|
|
108
148
|
config:
|
|
109
|
-
persona: !!js process.env.
|
|
149
|
+
persona: !!js process.env.DSH_TUI_PERSONA ?? 'You are a coding agent.'
|
|
110
150
|
# Workspace context (AGENTS.md injection) at the standard 64KB cap;
|
|
111
151
|
# task tools stay at their DSH defaults (on).
|
|
112
152
|
workspaceContext:
|
|
@@ -141,18 +181,16 @@
|
|
|
141
181
|
- id: command-goal
|
|
142
182
|
name: '@deepseek-ai/dsh-command-goal'
|
|
143
183
|
|
|
144
|
-
# Live working line
|
|
145
|
-
#
|
|
146
|
-
# plugin's own TUI prompt slot is skipped without an official dsh-tui.
|
|
184
|
+
# Live working line narration support. dsh-tui computes the visible status
|
|
185
|
+
# in-process from base session events; activity/status is never persisted.
|
|
147
186
|
# Mounted through @deepseek-harness-tui/dsh-tui's `./working-activity`
|
|
148
187
|
# re-export (not the bare `dsh-working-activity` name) so the row resolves
|
|
149
188
|
# from install layouts that never link transitive dependencies into the
|
|
150
189
|
# boot anchor's node_modules — pnpm's isolated profile layout, issue #60.
|
|
151
|
-
# publishIntervalMs 500: live-phase snapshots republish every 500ms so the
|
|
152
|
-
# dsh-tui status-line elapsed timers tick smoothly (default 2000ms).
|
|
153
190
|
- id: working-activity
|
|
154
191
|
name: '@deepseek-harness-tui/dsh-tui/working-activity'
|
|
155
192
|
config:
|
|
193
|
+
publish: false
|
|
156
194
|
publishIntervalMs: 500
|
|
157
195
|
|
|
158
196
|
# Durable session log (DSH's own persistence seam): /resume and rewind both
|
|
@@ -161,7 +199,7 @@
|
|
|
161
199
|
- id: sessions
|
|
162
200
|
name: '@deepseek-ai/dsh-session-persistence-jsonl'
|
|
163
201
|
config:
|
|
164
|
-
root: !!js process.env.
|
|
202
|
+
root: !!js process.env.DSH_TUI_SESSION_ROOT ?? (process.env.USERPROFILE ?? process.env.HOME) + '/.dsh-tui/sessions'
|
|
165
203
|
|
|
166
204
|
# Read-only session lineage — the subagent service's /agents listing reads it.
|
|
167
205
|
- id: session-query
|
|
@@ -181,5 +219,5 @@
|
|
|
181
219
|
# would never make manual /compact useful. Default 20% (200k tokens)
|
|
182
220
|
# with a 5% retained tail; both are overridable for tests and must keep
|
|
183
221
|
# retainRatio < thresholdRatio (BasicCompactConfig validates this).
|
|
184
|
-
thresholdRatio: !!js parseFloat(process.env.
|
|
185
|
-
retainRatio: !!js parseFloat(process.env.
|
|
222
|
+
thresholdRatio: !!js parseFloat(process.env.DSH_TUI_COMPACT_RATIO ?? '0.2')
|
|
223
|
+
retainRatio: !!js parseFloat(process.env.DSH_TUI_COMPACT_RETAIN ?? '0.05')
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Persisted working-activity indicator preference, mirroring the pi
|
|
3
3
|
* working-activity extension's `~/.pi/agent/working-activity.json`
|
|
4
4
|
* (`frames` key). dsh-tui keeps its own copy at
|
|
5
|
-
* `~/.dsh-
|
|
5
|
+
* `~/.dsh-tui/working-activity.json` so the `/activity` choice survives
|
|
6
6
|
* restarts. The file is best-effort: a missing or corrupt file (or an
|
|
7
7
|
* unknown preset left behind by an older version) just falls back to the
|
|
8
8
|
* default preset.
|