@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
|
@@ -1,11 +1,43 @@
|
|
|
1
|
+
import { carrierKeyOf } from '@deepseek-ai/dsh-scope';
|
|
2
|
+
import { isTokenDelta, tokenDeltaChars } from './usage.js';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* ChannelProjection.
|
|
4
|
+
* Foreground transcript listeners capture a binding generation. Child event
|
|
5
|
+
* listeners instead span the Channel owner, keeping parked reducers current
|
|
6
|
+
* across rebinds. Both paths own registrations incrementally and fence retained
|
|
7
|
+
* callbacks; only ChannelProjection presents the foreground transcript.
|
|
7
8
|
*/
|
|
8
9
|
export function createBindingEvents(ctx, deps) {
|
|
10
|
+
let subagentsInstalled = false;
|
|
11
|
+
const installSubagents = () => {
|
|
12
|
+
if (subagentsInstalled)
|
|
13
|
+
return;
|
|
14
|
+
subagentsInstalled = true;
|
|
15
|
+
// Child reducers span foreground bindings. One owner subscription keeps
|
|
16
|
+
// parked stores current; only the active reducer publishes view changes.
|
|
17
|
+
deps.owner.own(ctx.on('session/event', (session, event) => {
|
|
18
|
+
if (deps.owner.current())
|
|
19
|
+
deps.subagents.onSessionEvent(session, event);
|
|
20
|
+
}));
|
|
21
|
+
deps.owner.own(ctx.on('agent/assistant-stream', ({ agent, frame }) => {
|
|
22
|
+
if (deps.owner.current())
|
|
23
|
+
deps.subagents.onStreamFrame?.(agent, frame);
|
|
24
|
+
}));
|
|
25
|
+
// Cordis binds the dispatch receiver as `this`. The upstream carrier
|
|
26
|
+
// names the direct delegating parent, even for external children absent
|
|
27
|
+
// from agents.get(); its ancestor-inclusive filter cannot identify it.
|
|
28
|
+
deps.owner.own(ctx.on('subagent/start', (function (info) {
|
|
29
|
+
if (deps.owner.current())
|
|
30
|
+
deps.subagents.onStart(info, carrierKeyOf(this) ?? null);
|
|
31
|
+
})));
|
|
32
|
+
deps.owner.own(ctx.on('subagent/end', (function (info) {
|
|
33
|
+
if (deps.owner.current())
|
|
34
|
+
deps.subagents.onEnd(info, carrierKeyOf(this) ?? null);
|
|
35
|
+
})));
|
|
36
|
+
deps.owner.own(ctx.on('agent/disposed', ({ agent }) => {
|
|
37
|
+
if (deps.owner.current())
|
|
38
|
+
deps.subagents.forget?.(agent);
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
9
41
|
const reconcileRetiredProjection = (status) => {
|
|
10
42
|
if (!deps.state.working)
|
|
11
43
|
return;
|
|
@@ -20,9 +52,10 @@ export function createBindingEvents(ctx, deps) {
|
|
|
20
52
|
const bind = () => {
|
|
21
53
|
try {
|
|
22
54
|
deps.state.agentBindingGeneration = deps.binding.bind();
|
|
55
|
+
installSubagents();
|
|
23
56
|
deps.inputConvergence.cancelInFlight = false;
|
|
24
57
|
deps.inputConvergence.interruptSeq += 1;
|
|
25
|
-
deps.
|
|
58
|
+
deps.seedActivity?.(deps.binding.agent.session);
|
|
26
59
|
deps.modelActions.selection.current = undefined;
|
|
27
60
|
deps.modelActions.selection.assembled = undefined;
|
|
28
61
|
if (deps.binding.agent.options?.model === undefined && deps.state.provider !== '' && deps.state.model !== '') {
|
|
@@ -80,7 +113,6 @@ export function createBindingEvents(ctx, deps) {
|
|
|
80
113
|
if (!current() || subject !== capture.agent)
|
|
81
114
|
return;
|
|
82
115
|
deps.state.status = status;
|
|
83
|
-
deps.activity.onAgentStatus(status);
|
|
84
116
|
if (status === 'idle')
|
|
85
117
|
reconcileRetiredProjection('idle');
|
|
86
118
|
deps.state.emit();
|
|
@@ -89,7 +121,6 @@ export function createBindingEvents(ctx, deps) {
|
|
|
89
121
|
if (!current() || subject !== capture.agent)
|
|
90
122
|
return;
|
|
91
123
|
deps.state.status = 'disposed';
|
|
92
|
-
deps.activity.stop();
|
|
93
124
|
reconcileRetiredProjection('disposed');
|
|
94
125
|
deps.state.emit();
|
|
95
126
|
});
|
|
@@ -120,12 +151,9 @@ export function createBindingEvents(ctx, deps) {
|
|
|
120
151
|
if (!current())
|
|
121
152
|
return;
|
|
122
153
|
const isMainSession = subject === session;
|
|
123
|
-
if (!isMainSession && deps.subagents.onSessionEvent(subject, event))
|
|
124
|
-
return;
|
|
125
154
|
if (!isMainSession)
|
|
126
155
|
return;
|
|
127
156
|
deps.messageObserver?.publish(subject, event);
|
|
128
|
-
deps.activity.onSessionEvent(event);
|
|
129
157
|
deps.modeActions.onSessionEvent(subject, event);
|
|
130
158
|
deps.projector.renderEvent(event);
|
|
131
159
|
if (event.type === 'assistant/chunk')
|
|
@@ -141,24 +169,45 @@ export function createBindingEvents(ctx, deps) {
|
|
|
141
169
|
on('agent/assistant-stream', ({ agent: subject, frame }) => {
|
|
142
170
|
if (!current())
|
|
143
171
|
return;
|
|
144
|
-
if (subject !== capture.agent)
|
|
145
|
-
deps.subagents.onStreamFrame?.(subject, frame);
|
|
172
|
+
if (subject !== capture.agent)
|
|
146
173
|
return;
|
|
147
|
-
}
|
|
148
174
|
deps.projector.renderStreamFrame(frame);
|
|
149
175
|
if (frame.type === 'chunk')
|
|
150
176
|
deps.state.emitStream();
|
|
151
177
|
else if (frame.type === 'end')
|
|
152
178
|
deps.state.emit();
|
|
153
179
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Live compaction progress. The summarizer is one `ctx.llm.stream()`
|
|
182
|
+
* call, so its chunks are the only work signal a compaction has between
|
|
183
|
+
* `compaction/start` and `compaction/end` (dsh-llm tags the call
|
|
184
|
+
* `purpose: 'compaction'`, and a manual one runs while the session is
|
|
185
|
+
* idle, so it cannot be confused with the foreground turn's stream).
|
|
186
|
+
* Everything else passes through untouched: the original iterable is
|
|
187
|
+
* returned for any other purpose or session.
|
|
188
|
+
*/
|
|
189
|
+
const disposeCompactionStream = ctx.on('llm/stream', (options, next) => {
|
|
190
|
+
const stream = next();
|
|
191
|
+
if (options.purpose !== 'compaction')
|
|
192
|
+
return stream;
|
|
193
|
+
if (options.sessionId === undefined || String(options.sessionId) !== String(session.id))
|
|
194
|
+
return stream;
|
|
195
|
+
return (async function* compactionStream() {
|
|
196
|
+
for await (const chunk of stream) {
|
|
197
|
+
const compaction = deps.state.compaction;
|
|
198
|
+
if (compaction !== undefined && isTokenDelta(chunk)) {
|
|
199
|
+
deps.state.compaction = {
|
|
200
|
+
...compaction,
|
|
201
|
+
phase: 'summary',
|
|
202
|
+
outputChars: compaction.outputChars + tokenDeltaChars(chunk),
|
|
203
|
+
};
|
|
204
|
+
deps.state.emitStream();
|
|
205
|
+
}
|
|
206
|
+
yield chunk;
|
|
207
|
+
}
|
|
208
|
+
})();
|
|
161
209
|
});
|
|
210
|
+
register(disposeCompactionStream);
|
|
162
211
|
}
|
|
163
212
|
catch (error) {
|
|
164
213
|
deps.owner.dispose();
|
|
@@ -2,7 +2,7 @@ import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
3
|
import type { ChannelOwner } from './owner.js';
|
|
4
4
|
import type { ChannelState } from './types.js';
|
|
5
|
-
type CompactionState = Pick<ChannelState, 'agentId' | 'cwd' | 'working'>;
|
|
5
|
+
type CompactionState = Pick<ChannelState, 'agentId' | 'cwd' | 'working' | 'compaction' | 'emit'>;
|
|
6
6
|
type Notify = ChannelState['notify'];
|
|
7
7
|
/** Owns the one manual compaction transaction that must settle before a switch. */
|
|
8
8
|
export declare function createManualCompaction(ctx: Context, state: CompactionState, deps: {
|
|
@@ -10,10 +10,10 @@ export declare function createManualCompaction(ctx: Context, state: CompactionSt
|
|
|
10
10
|
agent(): Agent;
|
|
11
11
|
withDecisionPending<T>(name: string, pending: Promise<T>): Promise<T>;
|
|
12
12
|
notify: Notify;
|
|
13
|
-
onComplete(): void;
|
|
14
13
|
}): {
|
|
15
14
|
compact: () => void;
|
|
16
15
|
settle: () => Promise<void>;
|
|
16
|
+
cancel: () => void;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAO9C,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAO9C,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC,CAAA;AAChG,KAAK,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AAEpC,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAA;IACvD,KAAK,IAAI,KAAK,CAAA;IACd,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACrE,MAAM,EAAE,MAAM,CAAA;CACf;mBA0BmB,IAAI;kBAlBC,OAAO,CAAC,IAAI,CAAC;kBA4HnB,IAAI;EAQxB"}
|
|
@@ -5,6 +5,9 @@ import { serviceForAgent } from '../presets.js';
|
|
|
5
5
|
export function createManualCompaction(ctx, state, deps) {
|
|
6
6
|
let active;
|
|
7
7
|
const cancelled = new WeakSet();
|
|
8
|
+
/** Aborts the user asked for (Esc / Ctrl+C) rather than an ownership change:
|
|
9
|
+
* only those are reported as a cancellation instead of a failure. */
|
|
10
|
+
const userCancelled = new WeakSet();
|
|
8
11
|
const settle = async () => {
|
|
9
12
|
const transaction = active;
|
|
10
13
|
if (transaction === undefined)
|
|
@@ -71,17 +74,30 @@ export function createManualCompaction(ctx, state, deps) {
|
|
|
71
74
|
deps.notify(t('compact-while-working'), { color: 'warning' });
|
|
72
75
|
return;
|
|
73
76
|
}
|
|
74
|
-
|
|
77
|
+
// The status row replaces the old 4s toast: a real compaction runs for
|
|
78
|
+
// tens of seconds (measured: median ~25s, p90 ~70s), and the toast was
|
|
79
|
+
// gone for all but the first four of them.
|
|
80
|
+
const row = {
|
|
81
|
+
startedAt: Date.now(),
|
|
82
|
+
phase: 'prefill',
|
|
83
|
+
outputChars: 0,
|
|
84
|
+
cancellable: true,
|
|
85
|
+
};
|
|
86
|
+
state.compaction = row;
|
|
87
|
+
state.emit();
|
|
75
88
|
try {
|
|
76
89
|
// Compact the entry agent, never a later binding read after await.
|
|
77
90
|
const result = await compactService.compactNow(originAgent, controller.signal);
|
|
78
91
|
if (!isCurrent())
|
|
79
92
|
return;
|
|
80
93
|
deps.notify(result ? t('compact-done') : t('compact-nothing'));
|
|
81
|
-
if (result)
|
|
82
|
-
deps.onComplete();
|
|
83
94
|
}
|
|
84
95
|
catch (error) {
|
|
96
|
+
if (userCancelled.has(controller)) {
|
|
97
|
+
if (isCurrent())
|
|
98
|
+
deps.notify(t('compact-cancelled'));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
85
101
|
if (!isCurrent() || cancelled.has(controller))
|
|
86
102
|
return;
|
|
87
103
|
if (error.code === 'persistence') {
|
|
@@ -101,6 +117,13 @@ export function createManualCompaction(ctx, state, deps) {
|
|
|
101
117
|
finally {
|
|
102
118
|
finished = true;
|
|
103
119
|
releaseOwner();
|
|
120
|
+
// The durable `compaction/end` event already cleared the row on every
|
|
121
|
+
// path that reached the host; this covers the ones that never did
|
|
122
|
+
// (vetoed decision, unavailable service, a throw before the bracket).
|
|
123
|
+
if (state.compaction?.cancellable === true) {
|
|
124
|
+
state.compaction = undefined;
|
|
125
|
+
state.emit();
|
|
126
|
+
}
|
|
104
127
|
const currentTransaction = active;
|
|
105
128
|
if (currentTransaction?.controller === controller)
|
|
106
129
|
active = undefined;
|
|
@@ -112,5 +135,13 @@ export function createManualCompaction(ctx, state, deps) {
|
|
|
112
135
|
if (!finished)
|
|
113
136
|
active = { controller, settled };
|
|
114
137
|
};
|
|
115
|
-
|
|
138
|
+
/** Abort the in-flight manual compaction the user asked to stop. */
|
|
139
|
+
const cancel = () => {
|
|
140
|
+
const transaction = active;
|
|
141
|
+
if (transaction === undefined)
|
|
142
|
+
return;
|
|
143
|
+
userCancelled.add(transaction.controller);
|
|
144
|
+
transaction.controller.abort(new Error('user cancelled compaction'));
|
|
145
|
+
};
|
|
146
|
+
return { compact, settle, cancel };
|
|
116
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/local-actions.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAA+B,KAAK,QAAQ,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEjE,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,GAAG,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IACnC,KAAK,EAAE;QAAE,OAAO,IAAI,OAAO,CAAA;KAAE,CAAA;IAC7B,OAAO,EAAE;QACP,OAAO,IAAI,OAAO,CAAA;QAClB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAA;KACvE,CAAA;IACD,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,SAAS,EAAE;QAAE,KAAK,IAAI,IAAI,CAAC;QAAC,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;QAAC,iBAAiB,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAA;KAAE,CAAA;IAClJ,SAAS,EAAE;QAAE,QAAQ,IAAI,IAAI,CAAA;KAAE,CAAA;IAC/B,IAAI,EAAE;QAAE,QAAQ,IAAI,IAAI,CAAA;KAAE,CAAA;IAC1B,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,SAAS,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAA;KAAE,CAAA;IACrJ,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;CAC/B;iBAIgB,MAAM;aAKV,IAAI;qBAYI,MAAM,SAAS,SAAS,MAAM,EAAE,GAAG,IAAI;4BAKhC,MAAM,GAAG,OAAO;qBAajB,OAAO,CAAC,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"local-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/local-actions.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAA+B,KAAK,QAAQ,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEjE,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,GAAG,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IACnC,KAAK,EAAE;QAAE,OAAO,IAAI,OAAO,CAAA;KAAE,CAAA;IAC7B,OAAO,EAAE;QACP,OAAO,IAAI,OAAO,CAAA;QAClB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAA;KACvE,CAAA;IACD,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,SAAS,EAAE;QAAE,KAAK,IAAI,IAAI,CAAC;QAAC,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;QAAC,iBAAiB,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAA;KAAE,CAAA;IAClJ,SAAS,EAAE;QAAE,QAAQ,IAAI,IAAI,CAAA;KAAE,CAAA;IAC/B,IAAI,EAAE;QAAE,QAAQ,IAAI,IAAI,CAAA;KAAE,CAAA;IAC1B,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,SAAS,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAA;KAAE,CAAA;IACrJ,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;CAC/B;iBAIgB,MAAM;aAKV,IAAI;qBAYI,MAAM,SAAS,SAAS,MAAM,EAAE,GAAG,IAAI;4BAKhC,MAAM,GAAG,OAAO;qBAajB,OAAO,CAAC,MAAM,EAAE,CAAC;6BAwBT,MAAM,oBAAoB,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;EAqBnF"}
|
|
@@ -70,7 +70,12 @@ export function createLocalActions(deps) {
|
|
|
70
70
|
return [t('subagent-none')];
|
|
71
71
|
return children.map(child => {
|
|
72
72
|
const id = typeof child.id === 'string' ? child.id : (child.id.value ?? '');
|
|
73
|
-
|
|
73
|
+
// The host's non-running activity is not proof that a child was
|
|
74
|
+
// archived: continuable children can be idle or temporarily unknown.
|
|
75
|
+
// Prefer the live projection when this process still owns the run.
|
|
76
|
+
const running = state.subagents.some(sub => sub.agentId === id && sub.status === 'running');
|
|
77
|
+
const activity = running || child.activity === 'running' ? t('subagent-running') : t('subagent-unknown');
|
|
78
|
+
return t('subagent-row', { mode: child.mode === 'continuable' ? t('subagent-resumable') : t('subagent-oneshot'), label: child.label ? `「${child.label}」` : '', activity, id: id.slice(0, 8) });
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
catch (error) {
|
|
@@ -5,7 +5,7 @@ import type { ChannelOwner } from './owner.js';
|
|
|
5
5
|
import { resetSessionProjection } from './session-reset.js';
|
|
6
6
|
import type { ChannelState } from './types.js';
|
|
7
7
|
type Binding = ReturnType<typeof createChannelBinding>;
|
|
8
|
-
type SwitchState = Parameters<typeof resetSessionProjection>[0] & Pick<ChannelState, 'cwd' | 'working' | 'status' | 'agentId' | 'agentPreset' | 'provider' | 'model' | 'contextWindow' | 'effortLevels' | 'reasoningEffort' | 'emit'>;
|
|
8
|
+
type SwitchState = Parameters<typeof resetSessionProjection>[0] & Pick<ChannelState, 'cwd' | 'working' | 'status' | 'agentId' | 'sessionId' | 'agentPreset' | 'provider' | 'model' | 'contextWindow' | 'effortLevels' | 'reasoningEffort' | 'emit'>;
|
|
9
9
|
/** Model-route adoption transaction. It settles compaction before its fork snapshot and owns the post-commit reset. */
|
|
10
10
|
export declare function createModelSwitchAction(ctx: Context, state: SwitchState, deps: {
|
|
11
11
|
owner: Pick<ChannelOwner, 'current'>;
|
|
@@ -25,7 +25,6 @@ export declare function createModelSwitchAction(ctx: Context, state: SwitchState
|
|
|
25
25
|
refreshSkillCommands(): Promise<void>;
|
|
26
26
|
clearStagedImages(): void;
|
|
27
27
|
dropModelCompletion(): void;
|
|
28
|
-
onModelSwitch(model: string): void;
|
|
29
28
|
notify: ChannelState['notify'];
|
|
30
29
|
}): (provider: string, model: string) => Promise<boolean>;
|
|
31
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-switch.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"model-switch.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,EACjF,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,cAAc,GAAG,iBAAiB,GAAG,MAAM,CAAC,CAAA;AAEhK,uHAAuH;AACvH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,CAAA;IAC3F,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,cAAc,IAAI,IAAI,CAAA;IACtB,cAAc,IAAI,IAAI,CAAA;IACtB,SAAS,IAAI,IAAI,CAAA;IACjB,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAAA;IAC7C,YAAY,IAAI,IAAI,CAAA;IACpB,SAAS,IAAI,IAAI,CAAA;IACjB,eAAe,IAAI,IAAI,CAAA;IACvB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,iBAAiB,IAAI,IAAI,CAAA;IACzB,mBAAmB,IAAI,IAAI,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;CAC/B,IAEa,UAAU,MAAM,EAAE,OAAO,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,CA+EjE"}
|
|
@@ -8,6 +8,7 @@ import { composePreset, runningPresetOf } from '../presets.js';
|
|
|
8
8
|
import { reserveNewSession } from '../../sessionMounts.js';
|
|
9
9
|
import { attachSessionToWorkspace } from '../workspace.js';
|
|
10
10
|
import { resetSessionProjection } from './session-reset.js';
|
|
11
|
+
import { childRecordsLineage } from './session-lineage.js';
|
|
11
12
|
/** Model-route adoption transaction. It settles compaction before its fork snapshot and owns the post-commit reset. */
|
|
12
13
|
export function createModelSwitchAction(ctx, state, deps) {
|
|
13
14
|
return async (provider, model) => {
|
|
@@ -48,7 +49,10 @@ export function createModelSwitchAction(ctx, state, deps) {
|
|
|
48
49
|
runtimeSession: deps.binding.agent.session,
|
|
49
50
|
inheritedCount: seed.length,
|
|
50
51
|
cwd: state.cwd,
|
|
51
|
-
|
|
52
|
+
// A session nobody has typed into has no conversation to relate, and
|
|
53
|
+
// lineage would cost its first real prompt the generated title — the
|
|
54
|
+
// child stands as its own root instead (session-lineage.ts).
|
|
55
|
+
parentSession: childRecordsLineage(seed) ? deps.binding.agent.session.id : undefined,
|
|
52
56
|
agentPreset: composed.agentPreset,
|
|
53
57
|
agentOptions: { provider, model },
|
|
54
58
|
setup: composed.setup,
|
|
@@ -76,6 +80,7 @@ export function createModelSwitchAction(ctx, state, deps) {
|
|
|
76
80
|
resetSessionProjection(state, deps.rowIds, deps.resetProjector, deps.resetSubagents, deps.resetJobs);
|
|
77
81
|
state.status = handle.agent.status;
|
|
78
82
|
state.agentId = handle.agent.id;
|
|
83
|
+
state.sessionId = handle.agent.session.id;
|
|
79
84
|
state.agentPreset = composed.agentPreset;
|
|
80
85
|
state.provider = provider;
|
|
81
86
|
state.model = model;
|
|
@@ -92,7 +97,6 @@ export function createModelSwitchAction(ctx, state, deps) {
|
|
|
92
97
|
// order).
|
|
93
98
|
deps.clearStagedImages();
|
|
94
99
|
deps.bindAgent();
|
|
95
|
-
deps.onModelSwitch(model);
|
|
96
100
|
deps.refreshCommands();
|
|
97
101
|
void deps.refreshLoadedContext();
|
|
98
102
|
void deps.refreshSkillCommands();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,8CAA8C;AAC9C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;4EAC4E;AAC5E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAG3E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,eAAe,GAAE,OAAsC,GACtD,OAAO,CAwBT;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,8CAA8C;AAC9C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;4EAC4E;AAC5E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,MAAM,CAG3E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,eAAe,GAAE,OAAsC,GACtD,OAAO,CAwBT;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA+BlK;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,gBAAgB,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAmD5I"}
|
|
@@ -59,9 +59,15 @@ export function sessionCwdMatches(stateCwd, headerCwd, caseInsensitive = process
|
|
|
59
59
|
export async function listPathCandidates(fs, cwd, query, signal, topK) {
|
|
60
60
|
const normalized = query.replaceAll('\\', '/');
|
|
61
61
|
const slash = normalized.lastIndexOf('/');
|
|
62
|
+
// Keep the user's spelling for the completion result. The normalized form
|
|
63
|
+
// is only for resolution/ranking; writing it back turns Windows `\\` paths
|
|
64
|
+
// into `/` paths and makes completion mutate otherwise valid input.
|
|
65
|
+
const rawSlash = Math.max(query.lastIndexOf('/'), query.lastIndexOf('\\'));
|
|
62
66
|
// `.` / `..` without a trailing separator are whole-directory queries too.
|
|
63
67
|
const bareDir = slash < 0 && (normalized === '.' || normalized === '..' || normalized === '~');
|
|
64
68
|
const directoryPart = slash < 0 ? (bareDir ? `${normalized}/` : '') : normalized.slice(0, slash + 1);
|
|
69
|
+
const displayDirectoryPart = rawSlash < 0 ? (bareDir ? `${query}/` : '') : query.slice(0, rawSlash + 1);
|
|
70
|
+
const displaySeparator = displayDirectoryPart.endsWith('\\') ? '\\' : '/';
|
|
65
71
|
const nameQuery = slash < 0 || bareDir ? '' : normalized.slice(slash + 1);
|
|
66
72
|
// `~/` expands against the host home (matches the cwd resolution rules);
|
|
67
73
|
// drive-letter and POSIX-absolute prefixes pass through untouched.
|
|
@@ -76,7 +82,7 @@ export async function listPathCandidates(fs, cwd, query, signal, topK) {
|
|
|
76
82
|
const target = await fs.resolve(expanded);
|
|
77
83
|
const entries = (await fs.listDir(target)).slice().sort((a, b) => a.name.localeCompare(b.name));
|
|
78
84
|
return rankFileCandidates(entries.filter(entry => entry.type === 'file' || entry.type === 'directory').map(entry => {
|
|
79
|
-
const path = `${
|
|
85
|
+
const path = `${displayDirectoryPart}${entry.name}${entry.type === 'directory' ? displaySeparator : ''}`;
|
|
80
86
|
return { id: path, path, displayPath: path, name: entry.name, kind: entry.type, score: 0 };
|
|
81
87
|
}), nameQuery, topK);
|
|
82
88
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChannelState } from '../channel/types.js';
|
|
2
|
-
export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'minimal' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setMinimal'>;
|
|
2
|
+
export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'splashFont' | 'minimal' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setWhaleGirl' | 'setSplashFont' | 'setMinimal'>;
|
|
3
3
|
//# sourceMappingURL=preferences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,eAAe,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,eAAe,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC,CAqHxnB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { setMinimalMode } from '../../minimalMode.js';
|
|
2
|
+
import { normalizeSplashFont } from '../../components/splashFonts.js';
|
|
2
3
|
import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
|
|
3
4
|
export function createPreferences(getState) {
|
|
4
5
|
return {
|
|
@@ -91,6 +92,21 @@ export function createPreferences(getState) {
|
|
|
91
92
|
state.whaleIdle = enabled;
|
|
92
93
|
state.emit();
|
|
93
94
|
},
|
|
95
|
+
setSplashFont(setting) {
|
|
96
|
+
const state = getState();
|
|
97
|
+
const normalized = normalizeSplashFont(setting);
|
|
98
|
+
if (normalized === state.splashFont)
|
|
99
|
+
return;
|
|
100
|
+
state.splashFont = normalized;
|
|
101
|
+
state.emit();
|
|
102
|
+
},
|
|
103
|
+
setWhaleGirl(enabled) {
|
|
104
|
+
const state = getState();
|
|
105
|
+
if (enabled === state.whaleGirl)
|
|
106
|
+
return;
|
|
107
|
+
state.whaleGirl = enabled;
|
|
108
|
+
state.emit();
|
|
109
|
+
},
|
|
94
110
|
setMinimal(enabled) {
|
|
95
111
|
const state = getState();
|
|
96
112
|
setMinimalMode(enabled);
|
|
@@ -6,14 +6,13 @@ import type { SelectionAttachment } from '../../adapter/ports/channel-view.js';
|
|
|
6
6
|
import type { InputConvergence } from './input-actions.js';
|
|
7
7
|
import type { BackgroundJobStore } from '../jobs.js';
|
|
8
8
|
import type { TuiRendererHost } from '../renderers.js';
|
|
9
|
-
type ProjectionState = Pick<ChannelState, 'rows' | 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'lastUsage' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'turnStart' | 'tpsSamples' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'todos' | 'agentPreset' | 'sessionColor' | 'status' | 'emit'>;
|
|
9
|
+
type ProjectionState = Pick<ChannelState, 'rows' | 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'mainCost' | 'model' | 'lastUsage' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'compaction' | 'turnStart' | 'tpsSamples' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'todos' | 'agentPreset' | 'sessionColor' | 'status' | 'emit'>;
|
|
10
10
|
interface ProjectionDependencies {
|
|
11
11
|
agent(): Agent;
|
|
12
12
|
rowIds: {
|
|
13
13
|
value: number;
|
|
14
14
|
};
|
|
15
15
|
resetContextWarning(): void;
|
|
16
|
-
pendingTaskDescriptions: string[];
|
|
17
16
|
jobs: Pick<BackgroundJobStore, 'onOutputSeen' | 'onStarted'>;
|
|
18
17
|
inputConvergence: Pick<InputConvergence, 'cancelInFlight'>;
|
|
19
18
|
checkContextWarning(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAwB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAwB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAkBtD,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,GAAG,MAAM,GAAG,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,GAAG,KAAK,GAAG,eAAe,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,iBAAiB,GAAG,cAAc,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAA;AAC9Z,UAAU,sBAAsB;IAC/B,KAAK,IAAI,KAAK,CAAA;IACd,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,mBAAmB,IAAI,IAAI,CAAA;IAC3B,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,WAAW,CAAC,CAAA;IAC5D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;IAC1D,mBAAmB,IAAI,IAAI,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B;+DAC2D;IAC3D,WAAW,IAAI,OAAO,CAAA;IACtB;4EACwE;IACxE,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAA;CACrE;AACD,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,sBAAsB;iBAgmCxE,IAAI;2BA9tBQ,SAAS,YAAY,EAAE,KAAG,IAAI;yBAkGhC,YAAY,KAAG,IAAI;+BAxBb,oBAAoB,KAAG,IAAI;2BA1MjC,IAAI;6BAmDF,IAAI;4BA9KH,MAAM,WAAW,MAAM,KAAG,YAAY,GAAG,SAAS;8BAYhD,MAAM,WAAW,MAAM,QAAQ,YAAY,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAG,cAAc,GAAG,SAAS;sBAoBvG,SAAS,YAAY,EAAE,GAAG,SAAS,KAAG,MAAM;2BASvC,SAAS,YAAY,EAAE,GAAG,SAAS,KAAG,MAAM;EAs8B3E"}
|