@deepseek-harness-tui/dsh-tui 0.11.0 → 0.11.2
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 +55 -20
- package/assets/whale-girl/whale-girl-dark.png +0 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whale-girl/whale-girl.png +0 -0
- package/bin/dsh-tui.js +63 -3
- package/cordis.patch.yml +43 -20
- package/cordis.yml +6 -4
- package/lib/settings.json +1272 -0
- package/lib/types/activityPrefs.d.ts +24 -0
- package/lib/types/activityPrefs.d.ts.map +1 -1
- package/lib/types/activityPrefs.js +50 -1
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +3 -1
- package/lib/types/adapter/channel/ui-policy.d.ts +9 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +14 -1
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
- package/lib/types/adapter/kernel/replay.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +12 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +38 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +12 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +53 -7
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +43 -12
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +4 -1
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +2 -0
- package/lib/types/components/ActivityLine.d.ts +7 -2
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityLine.js +0 -8
- package/lib/types/components/BalanceReportRow.d.ts +10 -2
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
- package/lib/types/components/BalanceReportRow.js +18 -4
- package/lib/types/components/CompactionStatusRow.d.ts +24 -0
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
- package/lib/types/components/CompactionStatusRow.js +72 -0
- package/lib/types/components/GoalTodoPanel.js +2 -2
- package/lib/types/components/HelpMenu.d.ts +2 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +5 -4
- package/lib/types/components/InlineMathParagraph.d.ts +22 -0
- package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
- package/lib/types/components/InlineMathParagraph.js +178 -0
- package/lib/types/components/LogoV2.d.ts +41 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +148 -24
- package/lib/types/components/Markdown.d.ts +10 -3
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +47 -14
- package/lib/types/components/MathBlock.d.ts +13 -0
- package/lib/types/components/MathBlock.d.ts.map +1 -0
- package/lib/types/components/MathBlock.js +136 -0
- package/lib/types/components/MessageList.d.ts +10 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +15 -5
- package/lib/types/components/MigratePicker.d.ts +30 -0
- package/lib/types/components/MigratePicker.d.ts.map +1 -0
- package/lib/types/components/MigratePicker.js +38 -0
- package/lib/types/components/PromptInput.d.ts +17 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +96 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +3 -1
- package/lib/types/components/StarPrompt.d.ts +53 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -0
- package/lib/types/components/StarPrompt.js +281 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +20 -3
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +12 -6
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +8 -3
- package/lib/types/components/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -1
- package/lib/types/components/Whale.d.ts +17 -8
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +25 -15
- package/lib/types/components/WhaleGirl.d.ts +29 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -0
- package/lib/types/components/WhaleGirl.js +32 -0
- package/lib/types/components/WorkingSpinner.d.ts +4 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/bigfont.d.ts +47 -18
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +55 -40
- package/lib/types/components/design-system/HintLine.d.ts +1 -2
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -1
- package/lib/types/components/design-system/HintLine.js +1 -2
- package/lib/types/components/design-system/ThemeProvider.d.ts +6 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +40 -1
- package/lib/types/components/maidPortrait.d.ts +44 -0
- package/lib/types/components/maidPortrait.d.ts.map +1 -0
- package/lib/types/components/maidPortrait.js +178 -0
- package/lib/types/components/mathPreview.d.ts +25 -0
- package/lib/types/components/mathPreview.d.ts.map +1 -0
- package/lib/types/components/mathPreview.js +48 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +4 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +31 -26
- package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
- package/lib/types/components/messages/TranscriptImages.js +11 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -3
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
- package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
- package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
- package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
- package/lib/types/components/sessions/SourceTabs.js +70 -0
- package/lib/types/components/splashEggs.d.ts +56 -0
- package/lib/types/components/splashEggs.d.ts.map +1 -0
- package/lib/types/components/splashEggs.js +67 -0
- package/lib/types/components/splashFonts.d.ts +119 -0
- package/lib/types/components/splashFonts.d.ts.map +1 -0
- package/lib/types/components/splashFonts.js +267 -0
- package/lib/types/components/splashLayout.d.ts +41 -0
- package/lib/types/components/splashLayout.d.ts.map +1 -0
- package/lib/types/components/splashLayout.js +40 -0
- package/lib/types/components/whaleGirlSprite.d.ts +17 -0
- package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
- package/lib/types/components/whaleGirlSprite.js +47 -0
- package/lib/types/deepseekPricing.d.ts +74 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +110 -11
- package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
- package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/activity-store.js +359 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +6 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +2 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +15 -14
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +70 -21
- package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +35 -4
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +6 -2
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +7 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +127 -17
- package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/question-record.js +107 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +42 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +10 -3
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +43 -9
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +19 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +8 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +32 -17
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +309 -8
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.d.ts +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +34 -18
- package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +1 -1
- package/lib/types/dsh-adapter/compat/messages.d.ts +6 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +9 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +18 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +18 -3
- package/lib/types/dsh-adapter/compat/settings.d.ts +2 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +14 -0
- package/lib/types/dsh-adapter/contract.d.ts +5 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +9 -5
- package/lib/types/dsh-adapter/index.d.ts +36 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +22 -6
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/browse.js +90 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/cli.js +106 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/index.js +107 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/picker.js +86 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/types.js +11 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
- package/lib/types/dsh-adapter/plugin.d.ts +5 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +168 -372
- package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +254 -66
- package/lib/types/dsh-adapter/questions.d.ts +22 -15
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +47 -45
- package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +20 -13
- package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/frames.js +5 -4
- package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +188 -164
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +62 -25
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +7 -4
- package/lib/types/dsh-adapter/sideQuestion.d.ts +41 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +98 -2
- package/lib/types/dsh-adapter/subagents.d.ts +44 -6
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +163 -26
- package/lib/types/herdr.d.ts +2 -0
- package/lib/types/herdr.d.ts.map +1 -1
- package/lib/types/herdr.js +9 -3
- package/lib/types/history.d.ts +13 -1
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +15 -2
- package/lib/types/i18n.d.ts +512 -41
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +199 -20
- package/lib/types/ink/components/App.d.ts +2 -2
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +5 -1
- package/lib/types/ink/components/Image.d.ts +14 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/events/input-event.js +3 -3
- package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-images.js +13 -0
- package/lib/types/ink/ink.d.ts +6 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +16 -1
- package/lib/types/ink/kitty-graphics.d.ts +44 -3
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +184 -23
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +19 -1
- package/lib/types/ink/output.d.ts +24 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +83 -5
- package/lib/types/ink/parse-keypress.d.ts +26 -1
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +156 -13
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +8 -1
- package/lib/types/ink/screen.d.ts +24 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +89 -0
- package/lib/types/ink/selection.d.ts +68 -18
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +178 -31
- package/lib/types/ink/sixel-codec.d.ts +12 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +29 -5
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +5 -3
- package/lib/types/ink/styles.d.ts +9 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +8 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +7 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +12 -2
- package/lib/types/ink/timeline-rail.d.ts +5 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -1
- package/lib/types/math/inline-layout.d.ts +29 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -0
- package/lib/types/math/inline-layout.js +106 -0
- package/lib/types/math/layout.d.ts +58 -0
- package/lib/types/math/layout.d.ts.map +1 -0
- package/lib/types/math/layout.js +59 -0
- package/lib/types/math/renderer.d.ts +64 -0
- package/lib/types/math/renderer.d.ts.map +1 -0
- package/lib/types/math/renderer.js +256 -0
- package/lib/types/screens/Chat.d.ts +17 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +618 -57
- package/lib/types/screens/SessionSupervisor.d.ts +2 -1
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +156 -19
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +49 -11
- package/lib/types/screens/StatusLine.d.ts +5 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +47 -17
- package/lib/types/screens/chatOverlay.d.ts +5 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +26 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
- package/lib/types/sessionHistory.d.ts +2 -2
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +31 -5
- package/lib/types/settings/definitions.d.ts +681 -0
- package/lib/types/settings/definitions.d.ts.map +1 -0
- package/lib/types/settings/definitions.js +511 -0
- package/lib/types/starAction.d.ts +44 -0
- package/lib/types/starAction.d.ts.map +1 -0
- package/lib/types/starAction.js +52 -0
- package/lib/types/terminal-utils/latex.d.ts +10 -0
- package/lib/types/terminal-utils/latex.d.ts.map +1 -0
- package/lib/types/terminal-utils/latex.js +1417 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +26 -1
- package/lib/types/terminal-utils/math.d.ts +66 -0
- package/lib/types/terminal-utils/math.d.ts.map +1 -0
- package/lib/types/terminal-utils/math.js +337 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +6 -0
- package/lib/types/tuiDisplayPrefs.d.ts +67 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +59 -0
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/usageStats.d.ts +98 -0
- package/lib/types/usageStats.d.ts.map +1 -0
- package/lib/types/usageStats.js +169 -0
- package/lib/types/utils/bmp.d.ts +17 -0
- package/lib/types/utils/bmp.d.ts.map +1 -0
- package/lib/types/utils/bmp.js +154 -0
- package/lib/types/utils/clipboard.d.ts +14 -2
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +143 -8
- package/lib/types/utils/fold-long-lines.d.ts +1 -1
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.js +3 -2
- package/lib/types/utils/keymap.d.ts +4 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +8 -0
- package/lib/types/utils/modifiers.d.ts +4 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +4 -3
- package/lib/types/working-activity.d.ts +10 -9
- package/lib/types/working-activity.d.ts.map +1 -1
- package/lib/types/working-activity.js +17 -10
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
- package/package.json +117 -99
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +0 -19
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +0 -1
- package/lib/types/components/design-system/KeyboardShortcutHint.js +0 -14
- package/lib/types/dsh-adapter/channel/activity.d.ts +0 -20
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/activity.js +0 -113
- package/lib/types/terminal-utils/terminal.d.ts +0 -18
- package/lib/types/terminal-utils/terminal.d.ts.map +0 -1
- package/lib/types/terminal-utils/terminal.js +0 -96
|
@@ -4,7 +4,8 @@ import { SessionId } from '@deepseek-ai/dsh-session';
|
|
|
4
4
|
import UserQuestionService from '@deepseek-ai/dsh-user-questions';
|
|
5
5
|
import * as toolAskUser from '@deepseek-ai/dsh-tool-ask-user';
|
|
6
6
|
import Schema from '@deepseek-ai/schemastery';
|
|
7
|
-
import {
|
|
7
|
+
import { Config } from './index.js';
|
|
8
|
+
import { configValues, createSettingsScope, resolveSettingsNamespace } from './compat/settings.js';
|
|
8
9
|
import { createChannel } from './channel.js';
|
|
9
10
|
import { createChannelSceneOutlet } from './channel-scene-outlet.js';
|
|
10
11
|
import { mountChannelUi } from './channel-ui.js';
|
|
@@ -34,7 +35,7 @@ import { readHomePrefs } from '../homePrefs.js';
|
|
|
34
35
|
import { resolveSessionCwd } from '../utils/workspaceRoot.js';
|
|
35
36
|
import { beginRestartAttempt, checkForTuiUpdate, installedTuiVersion, isBootDeadlockTarget, isStandaloneRuntime, isVersionNewer, logRestartEvent, resolveDshProfileName, resolveTuiUpdateTarget, restartTui, updateTuiAndRestart, writeHandoffNotice } from '../update.js';
|
|
36
37
|
import { getLang, isLang, resolveStartupLang, setLang, t, writeLangPref } from '../i18n.js';
|
|
37
|
-
import { DEFAULT_PAGE_MARGIN, DEFAULT_STATUS_BAR, applyMermaidDiagrams, applyPageMargin, isPageMarginMode, normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground, parsePageMarginSpec } from '../tuiDisplayPrefs.js';
|
|
38
|
+
import { DEFAULT_PAGE_MARGIN, DEFAULT_STATUS_BAR, applyImageBacking, applyMathImageBacking, applyMathImageScale, applyMathRendering, applyMermaidDiagrams, applyPageMargin, isPageMarginMode, normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground, parsePageMarginSpec, resolveMathRendering } from '../tuiDisplayPrefs.js';
|
|
38
39
|
import { draftComboConflicts, effectiveComboString, parseComboDraft, setKeymapOverrides, SHORTCUT_ACTIONS, } from '../utils/keymap.js';
|
|
39
40
|
import { attachHerdrIntegration } from '../herdr.js';
|
|
40
41
|
import { logMouseDebug } from '../utils/debug.js';
|
|
@@ -44,6 +45,7 @@ import { startSessionMountHeartbeat } from './session-mount-heartbeat.js';
|
|
|
44
45
|
import { reserveMount } from '../sessionMounts.js';
|
|
45
46
|
import { getHostDialogStore } from './dialogs.js';
|
|
46
47
|
import { getHostStatusStore } from './status.js';
|
|
48
|
+
import { createActivityStore } from './activity-store.js';
|
|
47
49
|
import { getHostToastStore } from './toast.js';
|
|
48
50
|
import { getHostShortcuts } from './shortcuts.js';
|
|
49
51
|
import { getHostThemes } from './themes.js';
|
|
@@ -53,6 +55,8 @@ import { getHostSettingsSections, getLocalSettingsSectionsHost } from './setting
|
|
|
53
55
|
import { compositionRoot, withHostRootCapability } from './host-access.js';
|
|
54
56
|
import { render, ThemeProvider, AlternateScreen } from '../ui.js';
|
|
55
57
|
import { PageMargin } from '../components/PageMargin.js';
|
|
58
|
+
import { normalizeSplashFont } from '../components/splashFonts.js';
|
|
59
|
+
import { SETTING_GROUPS, SHORTCUT_FIELD_META, settingField } from '../settings/definitions.js';
|
|
56
60
|
import instances from '../ink/instances.js';
|
|
57
61
|
import { cursorMove, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE } from '../ink/termio/csi.js';
|
|
58
62
|
import { DBP, DFE, DISABLE_MOUSE_TRACKING, EXIT_ALT_SCREEN, SHOW_CURSOR } from '../ink/termio/dec.js';
|
|
@@ -82,8 +86,10 @@ let lastBootedFullscreen;
|
|
|
82
86
|
// Image preferences also stay fixed across host recomposes until /restart.
|
|
83
87
|
let lastBootedTerminalImages;
|
|
84
88
|
/**
|
|
85
|
-
* Extract the startup prompt from raw app argv
|
|
86
|
-
*
|
|
89
|
+
* Extract the startup prompt from raw app argv, excluding session selectors
|
|
90
|
+
* and Web startup flag values. `--trusted-host` consumes multiple authorities
|
|
91
|
+
* up to the next flag; none of them are prompt text (issue #882). An app-level
|
|
92
|
+
* `--` ends flag parsing; all following tokens are literal prompt text.
|
|
87
93
|
*/
|
|
88
94
|
export function initialPromptFromCmdlineArgs(args) {
|
|
89
95
|
if (args === undefined)
|
|
@@ -91,11 +97,20 @@ export function initialPromptFromCmdlineArgs(args) {
|
|
|
91
97
|
const promptArgs = [];
|
|
92
98
|
for (let i = 0; i < args.length; i += 1) {
|
|
93
99
|
const arg = args[i];
|
|
94
|
-
if (arg === '--
|
|
100
|
+
if (arg === '--') {
|
|
101
|
+
promptArgs.push(...args.slice(i + 1));
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (arg === '--resume' || arg === '--host' || arg === '--port') {
|
|
95
105
|
if (args[i + 1] !== undefined && !args[i + 1].startsWith('-'))
|
|
96
106
|
i += 1;
|
|
97
107
|
continue;
|
|
98
108
|
}
|
|
109
|
+
if (arg === '--trusted-host') {
|
|
110
|
+
while (args[i + 1] !== undefined && !args[i + 1].startsWith('-'))
|
|
111
|
+
i += 1;
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
99
114
|
if (arg.startsWith('--resume='))
|
|
100
115
|
continue;
|
|
101
116
|
if (arg.startsWith('-'))
|
|
@@ -184,6 +199,8 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
184
199
|
ctx.logger.info('dsh-tui: non-interactive host detected (stdout is not a TTY); skipping the TUI frontend');
|
|
185
200
|
return;
|
|
186
201
|
}
|
|
202
|
+
// Validate settings before creating an agent or taking over the terminal.
|
|
203
|
+
const tuiSettingsNs = resolveSettingsNamespace(configOwner, Config);
|
|
187
204
|
// Modern hosts own a declarative registry; old hosts discover directories.
|
|
188
205
|
// A modern bundle failure must not silently fall back to obsolete files.
|
|
189
206
|
if (!await registerBundledPresets(ctx))
|
|
@@ -396,8 +413,11 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
396
413
|
const meta = { cwd: sessionCwd };
|
|
397
414
|
// Launch-time resume target: the env handoff (launchers like naive-dsh) wins;
|
|
398
415
|
// `dsh --profile tui` forwards `--resume` verbatim instead, so fall back to
|
|
399
|
-
//
|
|
400
|
-
|
|
416
|
+
// the same app-argv snapshot as the initial prompt. Raw process.argv also
|
|
417
|
+
// contains the DSH launcher's own -- and is only a legacy embedder fallback.
|
|
418
|
+
const cmdline = ctx.cmdlineArgs;
|
|
419
|
+
const cmdlineArgs = cmdline?.get?.() ?? cmdline?.args;
|
|
420
|
+
const launchSessionId = config.sessionId ?? resumeTargetFromArgv(cmdlineArgs ?? process.argv.slice(2));
|
|
401
421
|
const { agent, handle, agentPreset, route: createdRoute } = await resolveAgent(ctx, launchSessionId, configuredRoute, startupRoute, meta, config.preset);
|
|
402
422
|
try {
|
|
403
423
|
// Opening a persisted TUI session is an explicit ownership action too.
|
|
@@ -426,8 +446,27 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
426
446
|
// validated startup resolution, on resume the route the target session's
|
|
427
447
|
// own records carry (a complete cordis.yml pin wins over them).
|
|
428
448
|
const displayRoute = createdRoute ?? startupRoute;
|
|
449
|
+
// Read side of the activity projection: filled by the working-activity
|
|
450
|
+
// plugin's unit, read by the status line. Created BEFORE the channel on
|
|
451
|
+
// purpose — `createChannel` binds its agent synchronously while it is still
|
|
452
|
+
// being constructed, and that bind seeds this store (see `seedActivity`
|
|
453
|
+
// below), so a store declared after the channel is still in its temporal
|
|
454
|
+
// dead zone when the first seed arrives and takes the whole boot down with
|
|
455
|
+
// it. One store per process; a composition without the projection service
|
|
456
|
+
// simply leaves it empty. `activity: false` is a static config-time switch
|
|
457
|
+
// (the runtime `/activity` command only changes the preset), so a hidden
|
|
458
|
+
// line attaches nothing at all — no feed, no 500ms tick.
|
|
459
|
+
const activityStore = createActivityStore(ctx, config.activity !== false);
|
|
429
460
|
const rawChannel = createChannel(ctx, agent, {
|
|
461
|
+
// The namespace this boot actually registered the settings section under
|
|
462
|
+
// (the Config owner's Loader id; custom ids are supported). Chat and the
|
|
463
|
+
// channel's own settings reads look the section up by it.
|
|
464
|
+
settingsNs: tuiSettingsNs,
|
|
430
465
|
model: displayRoute.model,
|
|
466
|
+
// The activity projection only pushes on change; read the current value as
|
|
467
|
+
// soon as this session binds so a resumed or reattached session renders its
|
|
468
|
+
// line immediately instead of waiting for the next event.
|
|
469
|
+
seedActivity: session => activityStore.seed(session),
|
|
431
470
|
// A RESUMED session keeps its persisted header cwd (issue #96 review):
|
|
432
471
|
// pre-upgrade sessions recorded the launch directory, and re-resolving
|
|
433
472
|
// from the current launch directory would split @ expansion / file
|
|
@@ -470,6 +509,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
470
509
|
expandEditor: config.expandEditor,
|
|
471
510
|
smoothStreaming: config.smoothStreaming,
|
|
472
511
|
statusBar: config.statusBar,
|
|
512
|
+
// 启动种子:与上面各显示偏好同款(设置服务的 boot apply 会再对一次
|
|
513
|
+
// 值,setWhaleGirl 对同值是 no-op,不会多通知)。
|
|
514
|
+
whaleGirl: config.whaleGirl,
|
|
515
|
+
// 开屏大字字体:cordis.yml 这一层的值(未设置时 undefined → 通道归一化成
|
|
516
|
+
// `daily`);/settings 的改动由 applySplashFont 实时接上。
|
|
517
|
+
splashFont: config.splashFont,
|
|
473
518
|
handle,
|
|
474
519
|
});
|
|
475
520
|
// Register the live Channel for the adapter Kernel. The Channel driver
|
|
@@ -502,10 +547,14 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
502
547
|
// the channel version bump (which re-renders everything below Chat)
|
|
503
548
|
// cannot drive it. Seed the store from config before the tree mounts;
|
|
504
549
|
// applyDisplay below mirrors every settings change into it live. The
|
|
505
|
-
// mermaid
|
|
506
|
-
// content, so no prop reaches the diagram
|
|
550
|
+
// mermaid and LaTeX switches ride the same kind of store (Markdown is
|
|
551
|
+
// memoized by content, so no prop reaches the diagram/formula nodes).
|
|
507
552
|
applyPageMargin(config.pageMargin);
|
|
508
553
|
applyMermaidDiagrams(config.mermaidDiagrams);
|
|
554
|
+
applyMathRendering(resolveMathRendering({}, config));
|
|
555
|
+
applyMathImageScale(config.mathImageScale ?? 'auto');
|
|
556
|
+
applyMathImageBacking(config.mathImageBacking ?? 'transparent');
|
|
557
|
+
applyImageBacking(config.imageBacking ?? 'transparent');
|
|
509
558
|
// Plugin toasts ride the channel's own notification surface: the runtime
|
|
510
559
|
// already sanitized/rate-limited the delivery, the sink only forwards.
|
|
511
560
|
// Without the extensions row (tuiToast absent) plugin toasts are dropped
|
|
@@ -546,12 +595,6 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
546
595
|
// Old hosts register a settings.yaml scope. 0.1.7 projects the plugin's
|
|
547
596
|
// volatile Config fields instead; both paths apply edits without remounting.
|
|
548
597
|
ctx.inject(['settings'], (settingsCtx) => {
|
|
549
|
-
// alpha.2 removed the `settingsNamespace()` brand helper: register() now
|
|
550
|
-
// takes the raw string and validates it itself, while rc.2 still wants the
|
|
551
|
-
// branded handle. Brands are type-only, so the constant cast compiles
|
|
552
|
-
// against both lines and the runtime value is identical ('dsh-tui' always
|
|
553
|
-
// satisfied the namespace pattern).
|
|
554
|
-
const tuiSettingsNs = 'dsh-tui';
|
|
555
598
|
// Loader targets the Config owner's fiber, not the injected child fiber.
|
|
556
599
|
const scope = createSettingsScope(configOwner, settingsCtx.settings, tuiSettingsNs, Schema.object({
|
|
557
600
|
diffLayout: Schema.union(['auto', 'split', 'unified']).default('auto'),
|
|
@@ -578,6 +621,16 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
578
621
|
smoothStreaming: Schema.boolean(),
|
|
579
622
|
// Same no-default rule: applyDisplay resolves `?? config.mermaidDiagrams ?? true`.
|
|
580
623
|
mermaidDiagrams: Schema.boolean(),
|
|
624
|
+
// Same no-default rule: resolveMathRendering falls back to cordis.yml.
|
|
625
|
+
mathRendering: Schema.union(['auto', 'image', 'unicode', 'source']),
|
|
626
|
+
// Display-formula image size; unset keeps the base (text) scale.
|
|
627
|
+
mathImageScale: Schema.union(['auto', 'large', 'xlarge']),
|
|
628
|
+
// Formula-image backing; unset keeps the transparent default.
|
|
629
|
+
mathImageBacking: Schema.union(['transparent', 'terminal']),
|
|
630
|
+
// Transcript-image backing (photos); unset keeps the transparent default.
|
|
631
|
+
imageBacking: Schema.union(['transparent', 'terminal']),
|
|
632
|
+
// Pre-`mathRendering` user layers; `false` still resolves to `source`.
|
|
633
|
+
latexMath: Schema.boolean(),
|
|
581
634
|
// No default on purpose: unset keeps the boot chain decisive
|
|
582
635
|
// (applyEffortDefault hands `undefined` to channel.setDefaultEffort,
|
|
583
636
|
// which resolves cordis.yml `effort` → effort.json → adapter default).
|
|
@@ -607,6 +660,16 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
607
660
|
// the idle-wakeup gate stays: an explicit `false` keeps the settled
|
|
608
661
|
// header timer-free.
|
|
609
662
|
whaleIdle: Schema.boolean().default(true),
|
|
663
|
+
// Maid portrait instead of the pixel whale in the header splash;
|
|
664
|
+
// off by default — the portrait is static (no idle animation).
|
|
665
|
+
whaleGirl: Schema.boolean().default(false),
|
|
666
|
+
// No schema default (same rule as foldTerminalCommand below): a
|
|
667
|
+
// default here would come back from scope.get()/watch() and shadow an
|
|
668
|
+
// explicit cordis.yml `splashFont` while the user layer is unset.
|
|
669
|
+
// applySplashFont resolves `?? config.splashFont` and normalizes it
|
|
670
|
+
// (undefined → daily), so cordis.yml stays decisive and junk lands on
|
|
671
|
+
// daily.
|
|
672
|
+
splashFont: Schema.string(),
|
|
610
673
|
// Minimal mode: strips the header splash, emoji glyphs, and
|
|
611
674
|
// decorative colors; code highlight and tool colors stay.
|
|
612
675
|
minimal: Schema.boolean().default(false),
|
|
@@ -640,6 +703,17 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
640
703
|
const applyWhaleIdle = (value) => {
|
|
641
704
|
channel.setWhaleIdle(value.whaleIdle ?? true);
|
|
642
705
|
};
|
|
706
|
+
/** Apply the maid-portrait setting: live-swap the header art. */
|
|
707
|
+
const applyWhaleGirl = (value) => {
|
|
708
|
+
channel.setWhaleGirl(value.whaleGirl ?? false);
|
|
709
|
+
};
|
|
710
|
+
/** 开屏大字字体(`dsh-tui.splashFont`):`daily` 按本地日期轮换,其余 pin
|
|
711
|
+
* 住一款;设置用户层优先于 cordis.yml,非法值回落 `daily`。 */
|
|
712
|
+
const applySplashFont = (value) => {
|
|
713
|
+
if (shadow)
|
|
714
|
+
return;
|
|
715
|
+
channel.setSplashFont(normalizeSplashFont(value.splashFont ?? config.splashFont));
|
|
716
|
+
};
|
|
643
717
|
const applyMinimal = (value) => {
|
|
644
718
|
if (shadow)
|
|
645
719
|
return;
|
|
@@ -684,6 +758,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
684
758
|
channel.setExpandEditor(value.expandEditor ?? config.expandEditor ?? true);
|
|
685
759
|
channel.setSmoothStreaming(value.smoothStreaming ?? config.smoothStreaming ?? true);
|
|
686
760
|
applyMermaidDiagrams(value.mermaidDiagrams ?? config.mermaidDiagrams);
|
|
761
|
+
applyMathRendering(resolveMathRendering(value, config));
|
|
762
|
+
applyMathImageScale(value.mathImageScale ?? config.mathImageScale ?? 'auto');
|
|
763
|
+
applyMathImageBacking(value.mathImageBacking ?? config.mathImageBacking ?? 'transparent');
|
|
764
|
+
applyImageBacking(value.imageBacking ?? config.imageBacking ?? 'transparent');
|
|
687
765
|
channel.setStatusBar(normalizeStatusBar(value.statusBar ?? config.statusBar));
|
|
688
766
|
};
|
|
689
767
|
// Legacy user scopes layer over cordis.yml. Modern Config is already
|
|
@@ -722,6 +800,8 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
722
800
|
applyLayout(next);
|
|
723
801
|
applyWhale(next);
|
|
724
802
|
applyWhaleIdle(next);
|
|
803
|
+
applyWhaleGirl(next);
|
|
804
|
+
applySplashFont(next);
|
|
725
805
|
applyMinimal(next);
|
|
726
806
|
applyLang(next);
|
|
727
807
|
applyDisplay(next);
|
|
@@ -776,80 +856,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
776
856
|
// one or more ctrl+/alt+ combos (comma-separated); blank restores the
|
|
777
857
|
// default, and a combo another action or a fixed editor binding already
|
|
778
858
|
// owns is refused as invalid so remaps can never silently shadow.
|
|
779
|
-
const shortcutFieldMeta =
|
|
780
|
-
paste: {
|
|
781
|
-
label: 'Paste shortcut',
|
|
782
|
-
zh: '粘贴快捷键',
|
|
783
|
-
hintEn: d => `Clipboard paste (text, file paths, images). Default: ${d}. Alt+V works where the terminal eats Ctrl+V.`,
|
|
784
|
-
hintZh: d => `剪贴板粘贴(文本、文件路径、图片)。默认 ${d}。终端吞掉 Ctrl+V 时可用 Alt+V。`,
|
|
785
|
-
},
|
|
786
|
-
history: {
|
|
787
|
-
label: 'History search shortcut',
|
|
788
|
-
zh: '历史搜索快捷键',
|
|
789
|
-
hintEn: d => `Open the prompt-history search. Default: ${d}.`,
|
|
790
|
-
hintZh: d => `打开输入历史搜索。默认 ${d}。`,
|
|
791
|
-
},
|
|
792
|
-
editor: {
|
|
793
|
-
label: 'External editor shortcut',
|
|
794
|
-
zh: '外部编辑器快捷键',
|
|
795
|
-
hintEn: d => `Edit the draft in $VISUAL/$EDITOR. Default: ${d}.`,
|
|
796
|
-
hintZh: d => `在 $VISUAL/$EDITOR 外部编辑器中编辑草稿。默认 ${d}。`,
|
|
797
|
-
},
|
|
798
|
-
transcript: {
|
|
799
|
-
label: 'Transcript mode shortcut',
|
|
800
|
-
zh: '转录模式快捷键',
|
|
801
|
-
hintEn: d => `Toggle expanded transcript mode. Default: ${d}.`,
|
|
802
|
-
hintZh: d => `切换展开转录模式。默认 ${d}。`,
|
|
803
|
-
},
|
|
804
|
-
trajectory: {
|
|
805
|
-
label: 'Trajectory scene shortcut',
|
|
806
|
-
zh: '轨迹场景快捷键',
|
|
807
|
-
hintEn: d => `Open the trajectory scene. Default: ${d}.`,
|
|
808
|
-
hintZh: d => `打开轨迹场景。默认 ${d}。`,
|
|
809
|
-
},
|
|
810
|
-
dashboard: {
|
|
811
|
-
label: 'Subagent dashboard shortcut',
|
|
812
|
-
zh: '子代理面板快捷键',
|
|
813
|
-
hintEn: d => `Open the subagent dashboard. Default: ${d}.`,
|
|
814
|
-
hintZh: d => `打开子代理面板。默认 ${d}。`,
|
|
815
|
-
},
|
|
816
|
-
contextPanel: {
|
|
817
|
-
label: 'Loaded-context panel shortcut',
|
|
818
|
-
zh: '加载上下文面板快捷键',
|
|
819
|
-
hintEn: d => `Toggle the startup loaded-context panel. Default: ${d}.`,
|
|
820
|
-
hintZh: d => `切换启动时的已加载上下文面板。默认 ${d}。`,
|
|
821
|
-
},
|
|
822
|
-
showAll: {
|
|
823
|
-
label: 'Show-all shortcut',
|
|
824
|
-
zh: '显示全部消息快捷键',
|
|
825
|
-
hintEn: d => `Toggle show-all-messages. Default: ${d}.`,
|
|
826
|
-
hintZh: d => `切换显示全部消息。默认 ${d}。`,
|
|
827
|
-
},
|
|
828
|
-
redraw: {
|
|
829
|
-
label: 'Redraw shortcut',
|
|
830
|
-
zh: '终端重绘快捷键',
|
|
831
|
-
hintEn: d => `Clear and repaint the terminal. Default: ${d}.`,
|
|
832
|
-
hintZh: d => `清空并重绘终端。默认 ${d}。`,
|
|
833
|
-
},
|
|
834
|
-
todoFold: {
|
|
835
|
-
label: 'Todo fold shortcut',
|
|
836
|
-
zh: '待办折叠快捷键',
|
|
837
|
-
hintEn: d => `Fold/unfold the goal/todo panel. Default: ${d}.`,
|
|
838
|
-
hintZh: d => `折叠/展开目标与待办面板。默认 ${d}。`,
|
|
839
|
-
},
|
|
840
|
-
questionFold: {
|
|
841
|
-
label: 'Question panel fold shortcut',
|
|
842
|
-
zh: '提问面板折叠快捷键',
|
|
843
|
-
hintEn: d => `Fold/unfold the pending question panel. Default: ${d}.`,
|
|
844
|
-
hintZh: d => `折叠/展开等待回答的提问面板。默认 ${d}。`,
|
|
845
|
-
},
|
|
846
|
-
expandEditor: {
|
|
847
|
-
label: 'Fullscreen editor shortcut',
|
|
848
|
-
zh: '全屏草稿编辑快捷键',
|
|
849
|
-
hintEn: d => `Toggle the fullscreen draft editor (Enter inserts a newline, Ctrl+Enter sends). Default: ${d}.`,
|
|
850
|
-
hintZh: d => `切换全屏草稿编辑器(Enter 换行、Ctrl+Enter 发送)。默认 ${d}。`,
|
|
851
|
-
},
|
|
852
|
-
};
|
|
859
|
+
const shortcutFieldMeta = SHORTCUT_FIELD_META;
|
|
853
860
|
const shortcutFields = SHORTCUT_ACTIONS.map(action => {
|
|
854
861
|
const meta = shortcutFieldMeta[action.id];
|
|
855
862
|
const defaults = action.defaults.join(', ');
|
|
@@ -885,25 +892,12 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
885
892
|
{
|
|
886
893
|
const settingsSections = getHostSettingsSections(ctx.get('tuiSettingsSections')) ?? getLocalSettingsSectionsHost(ctx);
|
|
887
894
|
const unregister = settingsSections.register({
|
|
888
|
-
ns:
|
|
895
|
+
ns: tuiSettingsNs,
|
|
889
896
|
title: 'dsh-tui',
|
|
890
|
-
groups: [
|
|
891
|
-
{ id: 'status-bar', title: 'Status bar', descriptions: { zh: '底栏设置' } },
|
|
892
|
-
{ id: 'shortcuts', title: 'Shortcuts', descriptions: { zh: '快捷键' } },
|
|
893
|
-
{ id: 'session', title: 'Session', descriptions: { zh: '会话' } },
|
|
894
|
-
],
|
|
897
|
+
groups: [...SETTING_GROUPS],
|
|
895
898
|
fields: [
|
|
896
899
|
{
|
|
897
|
-
|
|
898
|
-
label: 'Language',
|
|
899
|
-
descriptions: { zh: '界面语言' },
|
|
900
|
-
hint: 'UI language for the whole interface — applies immediately and is saved.',
|
|
901
|
-
hintDescriptions: { zh: '整个界面的显示语言——立即生效并保存。' },
|
|
902
|
-
kind: 'select',
|
|
903
|
-
options: [
|
|
904
|
-
{ value: 'zh', label: '中文', descriptions: { zh: '中文' } },
|
|
905
|
-
{ value: 'en', label: 'English', descriptions: { zh: '英文' } },
|
|
906
|
-
],
|
|
900
|
+
...settingField('lang'),
|
|
907
901
|
format(value) {
|
|
908
902
|
// Unset in settings.yaml: show the effective UI language
|
|
909
903
|
// (env / cordis.yml / lang.json resolution) instead of a
|
|
@@ -912,15 +906,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
912
906
|
},
|
|
913
907
|
},
|
|
914
908
|
{
|
|
915
|
-
|
|
916
|
-
label: 'Fullscreen mode',
|
|
917
|
-
descriptions: { zh: '全屏模式' },
|
|
918
|
-
// 故意不用 "alt-screen" 这类终端术语:读者要的是行为差异。鼠标
|
|
919
|
-
// 两种模式都可用(整屏页面自带鼠标跟踪),别让描述暗示关掉就
|
|
920
|
-
// 没有鼠标——最常见的误解。长度对齐既有最长 hint(单行假设)。
|
|
921
|
-
hint: 'On: app takes the whole screen (vim/less style), in-app mouse. Off: native scrollback; full-page screens keep the mouse. Restart to apply.',
|
|
922
|
-
hintDescriptions: { zh: '开启:接管整个终端(同 vim/less),应用内鼠标;关闭:终端原生滚动选择;整屏页两种模式都有鼠标。重启生效。' },
|
|
923
|
-
kind: 'boolean',
|
|
909
|
+
...settingField('fullscreen'),
|
|
924
910
|
format(value) {
|
|
925
911
|
// Unset in settings.yaml: show what THIS session booted with
|
|
926
912
|
// (the cordis.yml resolution) instead of a misleading false.
|
|
@@ -928,7 +914,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
928
914
|
},
|
|
929
915
|
},
|
|
930
916
|
{
|
|
931
|
-
|
|
917
|
+
...settingField('terminalImages'),
|
|
932
918
|
label: terminalImagesDisabledByEnv ? 'Image previews (forced off)' : 'Terminal image previews',
|
|
933
919
|
descriptions: { zh: terminalImagesDisabledByEnv ? '图片预览(环境强制关闭)' : '终端图片预览' },
|
|
934
920
|
hint: terminalImagesDisabledByEnv
|
|
@@ -939,77 +925,26 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
939
925
|
? '勾选框保存预览偏好;移除 DSH_TUI_DISABLE_TERMINAL_IMAGES 后重新启动才能显示图片。'
|
|
940
926
|
: '在支持的终端中预览图片。修改后用 /restart 生效;不影响向模型发送图片。',
|
|
941
927
|
},
|
|
942
|
-
kind: 'boolean',
|
|
943
928
|
format(value) {
|
|
944
929
|
// The editor toggles this value; runtime overrides must not replace the preference.
|
|
945
930
|
return String(value ?? config.terminalImages ?? true);
|
|
946
931
|
},
|
|
947
932
|
},
|
|
948
933
|
{
|
|
949
|
-
|
|
950
|
-
label: 'Diff layout',
|
|
951
|
-
descriptions: { zh: 'diff 布局' },
|
|
952
|
-
hint: 'Edit/Write tool cards: auto picks by terminal width, or force one layout.',
|
|
953
|
-
hintDescriptions: { zh: 'Edit/Write 工具卡的 diff 呈现:auto 按终端宽度选择,或强制一种布局。' },
|
|
954
|
-
kind: 'select',
|
|
955
|
-
options: [
|
|
956
|
-
{ value: 'auto', label: 'Auto (by width)', descriptions: { zh: '自动(按宽度)' } },
|
|
957
|
-
{ value: 'split', label: 'Side-by-side', descriptions: { zh: '双栏对照' } },
|
|
958
|
-
{ value: 'unified', label: 'Unified', descriptions: { zh: '统一式' } },
|
|
959
|
-
],
|
|
934
|
+
...settingField('diffLayout'),
|
|
960
935
|
},
|
|
961
936
|
{
|
|
962
|
-
|
|
963
|
-
label: 'Thinking display',
|
|
964
|
-
descriptions: { zh: '思考块展示' },
|
|
965
|
-
hint: 'Preview shows 2-3 live lines; Full stays expanded until turn end. Click a streaming block to switch between preview and full.',
|
|
966
|
-
hintDescriptions: { zh: '预览模式显示 2-3 行动态思考;展开模式保持至轮末。点击流式思考块可在预览与全文间切换。' },
|
|
967
|
-
kind: 'select',
|
|
968
|
-
options: [
|
|
969
|
-
{ value: 'preview', label: 'Preview (2-3 lines)', descriptions: { zh: '预览(2-3 行)' } },
|
|
970
|
-
{ value: 'full', label: 'Full until turn end', descriptions: { zh: '展开至轮末' } },
|
|
971
|
-
],
|
|
937
|
+
...settingField('thinkingFold'),
|
|
972
938
|
},
|
|
973
939
|
{
|
|
974
|
-
|
|
975
|
-
label: 'Tool background',
|
|
976
|
-
descriptions: { zh: '工具卡背景' },
|
|
977
|
-
hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis.',
|
|
978
|
-
hintDescriptions: { zh: '选择工具调用卡片不添加、轻微或明显的背景强调。' },
|
|
979
|
-
kind: 'select',
|
|
980
|
-
options: [
|
|
981
|
-
{ value: 'none', label: 'None', descriptions: { zh: '无' } },
|
|
982
|
-
{ value: 'subtle', label: 'Subtle', descriptions: { zh: '轻微' } },
|
|
983
|
-
{ value: 'strong', label: 'Strong', descriptions: { zh: '明显' } },
|
|
984
|
-
],
|
|
940
|
+
...settingField('toolBackground'),
|
|
985
941
|
},
|
|
986
942
|
{
|
|
987
|
-
|
|
988
|
-
label: 'Transcript gutter',
|
|
989
|
-
descriptions: { zh: '转录边栏' },
|
|
990
|
-
hint: 'Right gutter of the fullscreen transcript: per-turn timeline ticks, a proportional scrollbar, or nothing.',
|
|
991
|
-
hintDescriptions: { zh: '全屏转录区右侧边栏:按轮次的时间线节点、比例滚动条,或留空。' },
|
|
992
|
-
kind: 'select',
|
|
993
|
-
options: [
|
|
994
|
-
{ value: 'timeline', label: 'Turn timeline', descriptions: { zh: '轮次时间线' } },
|
|
995
|
-
{ value: 'scrollbar', label: 'Scrollbar', descriptions: { zh: '滚动条' } },
|
|
996
|
-
{ value: 'hidden', label: 'Hidden', descriptions: { zh: '隐藏' } },
|
|
997
|
-
],
|
|
943
|
+
...settingField('scrollGutter'),
|
|
998
944
|
},
|
|
999
945
|
{
|
|
1000
|
-
|
|
1001
|
-
label: 'Page margin',
|
|
1002
|
-
descriptions: { zh: '页边距' },
|
|
1003
|
-
hint: 'Inset the whole UI from the terminal edges. ←/→ cycles presets (none / slim / normal / roomy); Enter types a custom spec `NxM`: N columns per side, M rows top/bottom (e.g. 3x1, max 8x4; a bare `N` keeps rows at 1). Empty resets to the default `normal`. Applies immediately.',
|
|
1004
|
-
hintDescriptions: { zh: '让整个界面相对终端四边内缩。←/→ 循环预设(none / slim / normal / roomy);Enter 输入自定义 `NxM`:左右各 N 列、上下各 M 行(如 3x1,上限 8x4;只填 N 则上下保持 1 行)。清空恢复默认 normal。立即生效。' },
|
|
1005
|
-
kind: 'text',
|
|
946
|
+
...settingField('pageMargin'),
|
|
1006
947
|
placeholder: 'normal',
|
|
1007
|
-
options: [
|
|
1008
|
-
{ value: 'none', label: 'None', descriptions: { zh: '无' } },
|
|
1009
|
-
{ value: 'slim', label: 'Slim', descriptions: { zh: '窄' } },
|
|
1010
|
-
{ value: 'normal', label: 'Normal', descriptions: { zh: '常规' } },
|
|
1011
|
-
{ value: 'roomy', label: 'Roomy', descriptions: { zh: '宽' } },
|
|
1012
|
-
],
|
|
1013
948
|
format(value) {
|
|
1014
949
|
return String(value ?? config.pageMargin ?? DEFAULT_PAGE_MARGIN);
|
|
1015
950
|
},
|
|
@@ -1024,12 +959,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1024
959
|
},
|
|
1025
960
|
},
|
|
1026
961
|
{
|
|
1027
|
-
|
|
1028
|
-
label: 'Fold terminal command',
|
|
1029
|
-
descriptions: { zh: '折叠终端命令' },
|
|
1030
|
-
hint: 'Terminal cards (Bash/PowerShell): collapse a multi-line command header to its first line + count; Ctrl+O or a click expands it.',
|
|
1031
|
-
hintDescriptions: { zh: '终端卡(Bash/PowerShell):多行命令头部折叠为首行 + 计数;Ctrl+O 或点击卡片展开。' },
|
|
1032
|
-
kind: 'boolean',
|
|
962
|
+
...settingField('foldTerminalCommand'),
|
|
1033
963
|
format(value) {
|
|
1034
964
|
// Unset in settings.yaml: show the effective resolution (cordis.yml
|
|
1035
965
|
// → off) instead of a blank — same rule as `fullscreen`'s field.
|
|
@@ -1037,75 +967,50 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1037
967
|
},
|
|
1038
968
|
},
|
|
1039
969
|
{
|
|
1040
|
-
|
|
1041
|
-
label: 'Session name chip',
|
|
1042
|
-
descriptions: { zh: '会话名标签' },
|
|
1043
|
-
hint: 'Show the session name on the prompt top border, right corner. Off by default.',
|
|
1044
|
-
hintDescriptions: { zh: '在输入框顶边框右上角显示会话名。默认关闭。' },
|
|
1045
|
-
kind: 'boolean',
|
|
970
|
+
...settingField('promptSessionLabel'),
|
|
1046
971
|
},
|
|
1047
972
|
{
|
|
1048
|
-
|
|
1049
|
-
label: 'Fullscreen draft editor',
|
|
1050
|
-
descriptions: { zh: '全屏草稿编辑' },
|
|
1051
|
-
hint: 'On: the ⛶ affordance in the input row and the expand-editor shortcut (default Ctrl+Shift+E) expand the draft into a whole-screen editor (Enter = newline, Ctrl+Enter = send). Off: both entry points disappear. On by default.',
|
|
1052
|
-
hintDescriptions: { zh: '开启:输入行尾 ⛶ 按钮与全屏编辑快捷键(默认 Ctrl+Shift+E)把草稿展开成整屏编辑器(Enter 换行、Ctrl+Enter 发送)。关闭:两个入口都不显示。默认开启。' },
|
|
1053
|
-
kind: 'boolean',
|
|
973
|
+
...settingField('expandEditor'),
|
|
1054
974
|
format(value) {
|
|
1055
975
|
// Unset in settings.yaml: the effective default is on.
|
|
1056
976
|
return String(typeof value === 'boolean' ? value : config.expandEditor !== false);
|
|
1057
977
|
},
|
|
1058
978
|
},
|
|
1059
979
|
{
|
|
1060
|
-
|
|
1061
|
-
label: 'Smooth streaming',
|
|
1062
|
-
descriptions: { zh: '流式平滑输出' },
|
|
1063
|
-
hint: 'Reveal live replies, expanded thinking, and tool-call bodies through an even ~30fps flow instead of per-burst jumps; one-shot non-streaming replies paint as a flow too. Replay/history always paints complete. On by default.',
|
|
1064
|
-
hintDescriptions: { zh: '把实时回复、展开的思考与工具卡正文按 ~30fps 匀速揭示,不再随供应商突发一跳一跳;一次性到达的非流式回复也会平滑打出。回放/历史内容始终完整直出。默认开启。' },
|
|
1065
|
-
kind: 'boolean',
|
|
980
|
+
...settingField('smoothStreaming'),
|
|
1066
981
|
format(value) {
|
|
1067
982
|
// Unset in settings.yaml: the effective default is on.
|
|
1068
983
|
return String(typeof value === 'boolean' ? value : config.smoothStreaming !== false);
|
|
1069
984
|
},
|
|
1070
985
|
},
|
|
1071
986
|
{
|
|
1072
|
-
|
|
1073
|
-
label: 'Mermaid diagrams',
|
|
1074
|
-
descriptions: { zh: 'Mermaid 图表' },
|
|
1075
|
-
hint: 'Render ```mermaid fences in replies as box-drawing diagrams (flowchart, sequence, state, class, ER, pie, mindmap, timeline, gitGraph). Diagrams wider than the terminal, or of an unsupported type, keep the fenced source. Applies immediately. On by default.',
|
|
1076
|
-
hintDescriptions: { zh: '把回复中的 ```mermaid 代码块画成字符图(flowchart、sequence、state、class、ER、pie、mindmap、timeline、gitGraph)。比终端宽或类型不支持的图保留源码。立即生效。默认开启。' },
|
|
1077
|
-
kind: 'boolean',
|
|
987
|
+
...settingField('mermaidDiagrams'),
|
|
1078
988
|
format(value) {
|
|
1079
989
|
// Unset in settings.yaml: the effective default is on.
|
|
1080
990
|
return String(typeof value === 'boolean' ? value : config.mermaidDiagrams !== false);
|
|
1081
991
|
},
|
|
1082
992
|
},
|
|
1083
993
|
{
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
994
|
+
...settingField('mathRendering'),
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
...settingField('mathImageScale'),
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
...settingField('mathImageBacking'),
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
...settingField('imageBacking'),
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
...settingField('recapOnOpen'),
|
|
1090
1007
|
format(value) {
|
|
1091
1008
|
// Unset in settings.yaml: the default is on.
|
|
1092
1009
|
return value === undefined || value === null ? 'true' : String(value);
|
|
1093
1010
|
},
|
|
1094
1011
|
},
|
|
1095
1012
|
{
|
|
1096
|
-
|
|
1097
|
-
label: 'Default reasoning effort',
|
|
1098
|
-
descriptions: { zh: '默认推理强度' },
|
|
1099
|
-
hint: 'Reasoning-effort level new sessions start on; the current session applies it to its next request too, when the model offers the tier (an unlisted level falls back to the model default). Auto = follow the cordis.yml `effort` pin, then the persisted /effort choice, then the model default.',
|
|
1100
|
-
hintDescriptions: { zh: '新会话起始的推理强度档位;模型提供该档位时,当前会话的下一请求也会应用(模型不提供的档位会静默回落到模型默认)。自动 = 依次跟随 cordis.yml 的 effort 配置、持久化的 /effort 选择、模型默认档。' },
|
|
1101
|
-
kind: 'select',
|
|
1102
|
-
options: [
|
|
1103
|
-
{ value: 'auto', label: 'Auto (model default)', descriptions: { zh: '自动(模型默认)' } },
|
|
1104
|
-
{ value: 'off', label: 'Off', descriptions: { zh: '关闭' } },
|
|
1105
|
-
{ value: 'low', label: 'Low', descriptions: { zh: '低' } },
|
|
1106
|
-
{ value: 'high', label: 'High', descriptions: { zh: '高' } },
|
|
1107
|
-
{ value: 'max', label: 'Max', descriptions: { zh: '最高' } },
|
|
1108
|
-
],
|
|
1013
|
+
...settingField('effortDefault'),
|
|
1109
1014
|
format(value) {
|
|
1110
1015
|
// Unset in settings.yaml: show what a boot would actually start
|
|
1111
1016
|
// on (the cordis effort pin → the persisted /effort choice)
|
|
@@ -1118,190 +1023,79 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1118
1023
|
},
|
|
1119
1024
|
...shortcutFields,
|
|
1120
1025
|
{
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1026
|
+
...settingField('statusBar.compact'),
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
...settingField('statusBar.model'),
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
...settingField('statusBar.thinking'),
|
|
1128
1033
|
},
|
|
1129
1034
|
{
|
|
1130
|
-
|
|
1131
|
-
label: 'Show model',
|
|
1132
|
-
descriptions: { zh: '显示模型' },
|
|
1133
|
-
hint: 'Show the live model id in the status bar.',
|
|
1134
|
-
hintDescriptions: { zh: '在状态栏显示当前模型标识。' },
|
|
1135
|
-
group: 'status-bar',
|
|
1136
|
-
kind: 'boolean',
|
|
1035
|
+
...settingField('statusBar.cwd'),
|
|
1137
1036
|
},
|
|
1138
1037
|
{
|
|
1139
|
-
|
|
1140
|
-
label: 'Show thinking',
|
|
1141
|
-
descriptions: { zh: '显示思考' },
|
|
1142
|
-
hint: 'Show the live reasoning effort or thinking mode.',
|
|
1143
|
-
hintDescriptions: { zh: '显示当前推理强度或思考模式。' },
|
|
1144
|
-
group: 'status-bar',
|
|
1145
|
-
kind: 'boolean',
|
|
1038
|
+
...settingField('statusBar.contextUsage'),
|
|
1146
1039
|
},
|
|
1147
1040
|
{
|
|
1148
|
-
|
|
1149
|
-
label: 'Show working directory',
|
|
1150
|
-
descriptions: { zh: '显示工作目录' },
|
|
1151
|
-
hint: 'Show the session working directory.',
|
|
1152
|
-
hintDescriptions: { zh: '显示当前会话的工作目录。' },
|
|
1153
|
-
group: 'status-bar',
|
|
1154
|
-
kind: 'boolean',
|
|
1041
|
+
...settingField('statusBar.cache'),
|
|
1155
1042
|
},
|
|
1156
1043
|
{
|
|
1157
|
-
|
|
1158
|
-
label: 'Show context usage',
|
|
1159
|
-
descriptions: { zh: '显示上下文用量' },
|
|
1160
|
-
hint: 'Show current context-window consumption.',
|
|
1161
|
-
hintDescriptions: { zh: '显示当前上下文窗口占用情况。' },
|
|
1162
|
-
group: 'status-bar',
|
|
1163
|
-
kind: 'boolean',
|
|
1044
|
+
...settingField('statusBar.tokens'),
|
|
1164
1045
|
},
|
|
1165
1046
|
{
|
|
1166
|
-
|
|
1167
|
-
label: 'Show cache',
|
|
1168
|
-
descriptions: { zh: '显示缓存' },
|
|
1169
|
-
hint: 'Show prompt-cache hit information.',
|
|
1170
|
-
hintDescriptions: { zh: '显示提示词缓存命中信息。' },
|
|
1171
|
-
group: 'status-bar',
|
|
1172
|
-
kind: 'boolean',
|
|
1047
|
+
...settingField('statusBar.cost'),
|
|
1173
1048
|
},
|
|
1174
1049
|
{
|
|
1175
|
-
|
|
1176
|
-
label: 'Show token totals',
|
|
1177
|
-
descriptions: { zh: '显示 Token 总量' },
|
|
1178
|
-
hint: 'Show running input and output token totals.',
|
|
1179
|
-
hintDescriptions: { zh: '显示累计输入与输出 Token。' },
|
|
1180
|
-
group: 'status-bar',
|
|
1181
|
-
kind: 'boolean',
|
|
1050
|
+
...settingField('statusBar.tps'),
|
|
1182
1051
|
},
|
|
1183
1052
|
{
|
|
1184
|
-
|
|
1185
|
-
label: 'Show session cost estimate',
|
|
1186
|
-
descriptions: { zh: '显示本会话花费估算' },
|
|
1187
|
-
hint: 'Show the estimated session spend (≈¥) next to the token totals. Only appears for official DeepSeek providers whose model has a known price; the estimate follows the official per-million-token rates (peak/idle hours) and is not a bill.',
|
|
1188
|
-
hintDescriptions: { zh: '在 Token 总量旁显示本会话花费估算(≈¥)。仅在使用 DeepSeek 官方 API key 且模型有已知单价时显示;按官方每百万 token 单价(高峰/空闲时段)估算,非账单。' },
|
|
1189
|
-
group: 'status-bar',
|
|
1190
|
-
kind: 'boolean',
|
|
1053
|
+
...settingField('statusBar.gitBranch'),
|
|
1191
1054
|
},
|
|
1192
1055
|
{
|
|
1193
|
-
|
|
1194
|
-
label: 'Show output speed',
|
|
1195
|
-
descriptions: { zh: '显示输出速度' },
|
|
1196
|
-
hint: 'Show live and recent tokens-per-second metrics.',
|
|
1197
|
-
hintDescriptions: { zh: '显示实时及近期每秒 Token 指标。' },
|
|
1198
|
-
group: 'status-bar',
|
|
1199
|
-
kind: 'boolean',
|
|
1056
|
+
...settingField('statusBar.sessionTitle'),
|
|
1200
1057
|
},
|
|
1201
1058
|
{
|
|
1202
|
-
|
|
1203
|
-
label: 'Show git branch',
|
|
1204
|
-
descriptions: { zh: '显示 Git 分支' },
|
|
1205
|
-
hint: 'Show the current git branch when available.',
|
|
1206
|
-
hintDescriptions: { zh: '可用时显示当前 Git 分支。' },
|
|
1207
|
-
group: 'status-bar',
|
|
1208
|
-
kind: 'boolean',
|
|
1059
|
+
...settingField('statusBar.sessionId'),
|
|
1209
1060
|
},
|
|
1210
1061
|
{
|
|
1211
|
-
|
|
1212
|
-
label: 'Show session title',
|
|
1213
|
-
descriptions: { zh: '显示会话标题' },
|
|
1214
|
-
hint: 'Show the current session title.',
|
|
1215
|
-
hintDescriptions: { zh: '显示当前会话标题。' },
|
|
1216
|
-
group: 'status-bar',
|
|
1217
|
-
kind: 'boolean',
|
|
1062
|
+
...settingField('statusBar.goal'),
|
|
1218
1063
|
},
|
|
1219
1064
|
{
|
|
1220
|
-
|
|
1221
|
-
label: 'Show session id',
|
|
1222
|
-
descriptions: { zh: '显示会话 ID' },
|
|
1223
|
-
hint: 'Show the short session id (# + first 8 chars) — it matches the session log filename for --resume.',
|
|
1224
|
-
hintDescriptions: { zh: '显示短会话 ID(# + 前 8 位)——与日志文件名对应,方便 --resume 定位。' },
|
|
1225
|
-
group: 'status-bar',
|
|
1226
|
-
kind: 'boolean',
|
|
1065
|
+
...settingField('statusBar.mode'),
|
|
1227
1066
|
},
|
|
1228
1067
|
{
|
|
1229
|
-
|
|
1230
|
-
label: 'Show goal status',
|
|
1231
|
-
descriptions: { zh: '显示 Goal 状态' },
|
|
1232
|
-
hint: 'Show a compact goal chip (phase glyph + rounds) in the status footer while a goal exists.',
|
|
1233
|
-
hintDescriptions: { zh: '存在 Goal 时,在底部状态栏显示紧凑的 Goal 状态(阶段符号与轮次)。' },
|
|
1234
|
-
group: 'status-bar',
|
|
1235
|
-
kind: 'boolean',
|
|
1068
|
+
...settingField('statusBar.contextBar'),
|
|
1236
1069
|
},
|
|
1237
1070
|
{
|
|
1238
|
-
|
|
1239
|
-
label: 'Show session mode',
|
|
1240
|
-
descriptions: { zh: '显示会话模式' },
|
|
1241
|
-
hint: 'Show the active non-default session mode.',
|
|
1242
|
-
hintDescriptions: { zh: '显示当前启用的非默认会话模式。' },
|
|
1243
|
-
group: 'status-bar',
|
|
1244
|
-
kind: 'boolean',
|
|
1071
|
+
...settingField('statusBar.activity'),
|
|
1245
1072
|
},
|
|
1246
1073
|
{
|
|
1247
|
-
|
|
1248
|
-
label: 'Show context progress bar',
|
|
1249
|
-
descriptions: { zh: '显示上下文进度条' },
|
|
1250
|
-
hint: 'Show the segmented context progress bar on its own footer row.',
|
|
1251
|
-
hintDescriptions: { zh: '在底部单独一行显示分段上下文进度条。' },
|
|
1252
|
-
group: 'status-bar',
|
|
1253
|
-
kind: 'boolean',
|
|
1074
|
+
...settingField('statusBar.trajectory'),
|
|
1254
1075
|
},
|
|
1255
1076
|
{
|
|
1256
|
-
|
|
1257
|
-
label: 'Show activity summary',
|
|
1258
|
-
descriptions: { zh: '显示活动摘要' },
|
|
1259
|
-
hint: 'Show the idle working-activity summary.',
|
|
1260
|
-
hintDescriptions: { zh: '显示空闲时的工作活动摘要。' },
|
|
1261
|
-
group: 'status-bar',
|
|
1262
|
-
kind: 'boolean',
|
|
1077
|
+
...settingField('statusBar.shortcutHint'),
|
|
1263
1078
|
},
|
|
1264
1079
|
{
|
|
1265
|
-
|
|
1266
|
-
label: 'Show trajectory strip',
|
|
1267
|
-
descriptions: { zh: '显示轨迹条' },
|
|
1268
|
-
hint: 'Show the animated mini trajectory strip at the footer edge.',
|
|
1269
|
-
hintDescriptions: { zh: '在状态栏边缘显示动态迷你轨迹条。' },
|
|
1270
|
-
group: 'status-bar',
|
|
1271
|
-
kind: 'boolean',
|
|
1080
|
+
...settingField('whale'),
|
|
1272
1081
|
},
|
|
1273
1082
|
{
|
|
1274
|
-
|
|
1275
|
-
label: 'Show shortcut reminder',
|
|
1276
|
-
descriptions: { zh: '显示快捷键提示' },
|
|
1277
|
-
hint: 'Control only the idle `? for shortcuts` reminder; pressing ? and the Esc shortcut hints are unaffected.',
|
|
1278
|
-
hintDescriptions: { zh: '仅控制空闲时的 `? for shortcuts` 提示;按 ? 打开快捷键以及 Esc 快捷提示均不受影响。' },
|
|
1279
|
-
group: 'status-bar',
|
|
1280
|
-
kind: 'boolean',
|
|
1083
|
+
...settingField('whaleIdle'),
|
|
1281
1084
|
},
|
|
1282
1085
|
{
|
|
1283
|
-
|
|
1284
|
-
label: 'Whale art',
|
|
1285
|
-
descriptions: { zh: '鲸鱼娘' },
|
|
1286
|
-
hint: 'Show the pixel whale in the header splash.',
|
|
1287
|
-
hintDescriptions: { zh: '开屏头部显示像素鲸鱼娘。' },
|
|
1288
|
-
kind: 'boolean',
|
|
1086
|
+
...settingField('whaleGirl'),
|
|
1289
1087
|
},
|
|
1290
1088
|
{
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1089
|
+
...settingField('splashFont'),
|
|
1090
|
+
format(value) {
|
|
1091
|
+
// Unset in settings.yaml: show the effective resolution
|
|
1092
|
+
// (cordis.yml → daily) instead of a blank — same rule as the
|
|
1093
|
+
// `fullscreen` field.
|
|
1094
|
+
return normalizeSplashFont(value ?? config.splashFont);
|
|
1095
|
+
},
|
|
1297
1096
|
},
|
|
1298
1097
|
{
|
|
1299
|
-
|
|
1300
|
-
label: 'Minimal mode',
|
|
1301
|
-
descriptions: { zh: '极简模式' },
|
|
1302
|
-
hint: 'Hide the header splash, emoji glyphs, and decorative colors; code highlight and tool colors stay. Trims the status bar to model + cwd.',
|
|
1303
|
-
hintDescriptions: { zh: '隐藏开屏头部、emoji 状态符与装饰性配色;代码高亮与工具配色保留,底栏只留模型与目录。' },
|
|
1304
|
-
kind: 'boolean',
|
|
1098
|
+
...settingField('minimal'),
|
|
1305
1099
|
},
|
|
1306
1100
|
],
|
|
1307
1101
|
});
|
|
@@ -1342,13 +1136,11 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1342
1136
|
}
|
|
1343
1137
|
// Positional command-line arguments are the initial prompt (issue #53):
|
|
1344
1138
|
// `dsh-tui "run the tests"` forwards positionals through the dsh CLI,
|
|
1345
|
-
// which mounts them as ctx.cmdlineArgs.
|
|
1346
|
-
//
|
|
1347
|
-
//
|
|
1348
|
-
//
|
|
1349
|
-
//
|
|
1350
|
-
const cmdline = ctx.cmdlineArgs;
|
|
1351
|
-
const cmdlineArgs = cmdline?.get?.() ?? cmdline?.args;
|
|
1139
|
+
// which mounts them as ctx.cmdlineArgs. Reuse the snapshot read for resume
|
|
1140
|
+
// selection above, supporting both `{ get() }` and legacy `{ args }` hosts.
|
|
1141
|
+
// Submit once the channel exists; delivery goes through the normal pending/inbox
|
|
1142
|
+
// chain, so no special timing is needed. The parser separates startup flags
|
|
1143
|
+
// from literal prompt text.
|
|
1352
1144
|
const initialPrompt = initialPromptFromCmdlineArgs(cmdlineArgs);
|
|
1353
1145
|
if (initialPrompt)
|
|
1354
1146
|
submitChannel(initialPrompt);
|
|
@@ -1485,7 +1277,7 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1485
1277
|
const openHomeOnBoot = !homeSeen
|
|
1486
1278
|
&& launchSessionId === undefined
|
|
1487
1279
|
&& requestedWorkspace === undefined
|
|
1488
|
-
&&
|
|
1280
|
+
&& initialPrompt === '';
|
|
1489
1281
|
const chat = React.createElement(Chat, {
|
|
1490
1282
|
channel,
|
|
1491
1283
|
renderScene: createChannelSceneOutlet(() => rawChannel.pluginScene),
|
|
@@ -1498,6 +1290,10 @@ export async function apply(ctx, runtimeConfig, configOwner = ctx) {
|
|
|
1498
1290
|
// Chat falls back to inert stores and no shortcut registry.
|
|
1499
1291
|
extensionDialogs: getHostDialogStore(ctx.get('tuiDialogs')),
|
|
1500
1292
|
extensionStatus: getHostStatusStore(ctx.get('tuiStatus')),
|
|
1293
|
+
// The working line's semantics belong to the dsh-working-activity plugin's
|
|
1294
|
+
// session projection; this store is the read side of that seam, so the TUI
|
|
1295
|
+
// no longer runs a second activity tracker of its own.
|
|
1296
|
+
activityStore,
|
|
1501
1297
|
extensionShortcuts: getHostShortcuts(ctx.get('tuiShortcuts')),
|
|
1502
1298
|
themeHost,
|
|
1503
1299
|
// Full-screen surfaces inside Chat — the trajectory scene and the session
|