@deepseek-harness-tui/dsh-tui 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -238
- package/bin/dsh-tui.js +172 -5
- package/cordis.patch.yml +16 -4
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/cc/hyperlink.d.ts +7 -1
- package/lib/types/cc/hyperlink.d.ts.map +1 -1
- package/lib/types/cc/hyperlink.js +3 -2
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +33 -3
- package/lib/types/cc/sessionColors.d.ts +27 -0
- package/lib/types/cc/sessionColors.d.ts.map +1 -0
- package/lib/types/cc/sessionColors.js +39 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +10 -2
- package/lib/types/components/ActivityPicker.d.ts +4 -1
- package/lib/types/components/ActivityPicker.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.js +2 -2
- package/lib/types/components/AutoRecapRow.d.ts +23 -0
- package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
- package/lib/types/components/AutoRecapRow.js +23 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +1 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts +2 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +11 -3
- package/lib/types/components/ColorPicker.d.ts +17 -0
- package/lib/types/components/ColorPicker.d.ts.map +1 -0
- package/lib/types/components/ColorPicker.js +20 -0
- package/lib/types/components/CommandSuggestions.d.ts +23 -4
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +41 -14
- package/lib/types/components/ContextBarView.d.ts +33 -0
- package/lib/types/components/ContextBarView.d.ts.map +1 -0
- package/lib/types/components/ContextBarView.js +46 -0
- package/lib/types/components/EffortInputBorder.d.ts +12 -1
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +22 -5
- package/lib/types/components/EffortSlider.d.ts +4 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +4 -2
- package/lib/types/components/ExtensionDialog.js +6 -2
- package/lib/types/components/FileActionsPanel.d.ts +22 -0
- package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
- package/lib/types/components/FileActionsPanel.js +28 -0
- package/lib/types/components/FileSuggestions.d.ts +26 -7
- package/lib/types/components/FileSuggestions.d.ts.map +1 -1
- package/lib/types/components/FileSuggestions.js +39 -12
- package/lib/types/components/GoalTodoPanel.d.ts +26 -2
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +86 -17
- package/lib/types/components/HelpMenu.d.ts +7 -1
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +12 -4
- package/lib/types/components/HistorySearchDialog.d.ts +4 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +2 -2
- package/lib/types/components/LangPicker.d.ts +14 -0
- package/lib/types/components/LangPicker.d.ts.map +1 -0
- package/lib/types/components/LangPicker.js +17 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +3 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +12 -3
- package/lib/types/components/MessageList.d.ts +45 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +560 -41
- package/lib/types/components/ModelPicker.d.ts +27 -2
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +26 -6
- package/lib/types/components/PermissionsPicker.d.ts +21 -0
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
- package/lib/types/components/PermissionsPicker.js +27 -0
- package/lib/types/components/PlanPicker.d.ts +15 -0
- package/lib/types/components/PlanPicker.d.ts.map +1 -0
- package/lib/types/components/PlanPicker.js +18 -0
- package/lib/types/components/PresetPicker.d.ts +4 -1
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +2 -2
- package/lib/types/components/PromptInput.d.ts +4 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +602 -75
- package/lib/types/components/RecapPanel.d.ts +25 -0
- package/lib/types/components/RecapPanel.d.ts.map +1 -0
- package/lib/types/components/RecapPanel.js +55 -0
- package/lib/types/components/RewindPicker.d.ts +12 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +6 -4
- package/lib/types/components/ScrollbarGutter.d.ts +28 -0
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
- package/lib/types/components/ScrollbarGutter.js +119 -0
- package/lib/types/components/Select.d.ts +8 -1
- package/lib/types/components/Select.d.ts.map +1 -1
- package/lib/types/components/Select.js +4 -2
- package/lib/types/components/SkillsPicker.d.ts +4 -1
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +2 -2
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +9 -2
- package/lib/types/components/SubagentDashboard.d.ts +4 -0
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +9 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +5 -4
- package/lib/types/components/SuggestionCard.d.ts +65 -0
- package/lib/types/components/SuggestionCard.d.ts.map +1 -0
- package/lib/types/components/SuggestionCard.js +77 -0
- package/lib/types/components/ThemePicker.d.ts +4 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +2 -2
- package/lib/types/components/ThinkingToggle.d.ts +4 -1
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +2 -2
- package/lib/types/components/TimelineRail.d.ts +53 -0
- package/lib/types/components/TimelineRail.d.ts.map +1 -0
- package/lib/types/components/TimelineRail.js +197 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts +6 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -2
- package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
- package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceMenuPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +4 -1
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -1
- package/lib/types/components/WorkspacePicker.js +2 -2
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +5 -1
- package/lib/types/components/design-system/ListItem.d.ts +8 -1
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +8 -3
- package/lib/types/components/design-system/ThemeProvider.d.ts +7 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +2 -1
- package/lib/types/components/messages/AssistantTextMessage.d.ts +5 -2
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantTextMessage.js +6 -2
- 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 +10 -4
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +15 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +37 -7
- package/lib/types/components/messages/UserPromptMessage.d.ts +2 -1
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +7 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +75 -11
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +13 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +4 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +4 -2
- package/lib/types/components/trajectory/HotspotView.d.ts +7 -1
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -1
- package/lib/types/components/trajectory/HotspotView.js +8 -2
- package/lib/types/components/trajectory/Ledger.d.ts +9 -1
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +23 -5
- package/lib/types/components/trajectory/WaveBand.d.ts +10 -1
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -1
- package/lib/types/components/trajectory/WaveBand.js +7 -2
- package/lib/types/dsh-adapter/channel.d.ts +117 -7
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +1301 -122
- package/lib/types/dsh-adapter/compat/index.d.ts +8 -6
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +8 -6
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +150 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +518 -41
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +1 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +1 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.d.ts +20 -2
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +9 -1
- package/lib/types/dsh-adapter/plugin.d.ts +0 -9
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +453 -14
- package/lib/types/dsh-adapter/presets.d.ts +18 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +31 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +29 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +89 -5
- package/lib/types/dsh-adapter/questions.d.ts +19 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +53 -10
- package/lib/types/dsh-adapter/recap.d.ts +49 -0
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
- package/lib/types/dsh-adapter/recap.js +121 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +314 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessionTree.js +954 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +15 -44
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +28 -165
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/herdr.js +1 -1
- package/lib/types/i18n.d.ts +770 -181
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +257 -80
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +13 -1
- package/lib/types/ink/components/App.d.ts +12 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +101 -4
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -1
- package/lib/types/ink/components/ClockContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +170 -91
- package/lib/types/ink/constants.d.ts +9 -0
- package/lib/types/ink/constants.d.ts.map +1 -1
- package/lib/types/ink/constants.js +9 -0
- package/lib/types/ink/events/click-event.d.ts +7 -16
- package/lib/types/ink/events/click-event.d.ts.map +1 -1
- package/lib/types/ink/events/click-event.js +16 -19
- package/lib/types/ink/events/event-handlers.d.ts +11 -1
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -1
- package/lib/types/ink/events/event-handlers.js +2 -0
- package/lib/types/ink/events/input-event.d.ts +9 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +4 -0
- package/lib/types/ink/events/pointer-event.d.ts +61 -0
- package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
- package/lib/types/ink/events/pointer-event.js +61 -0
- package/lib/types/ink/events/wheel-event.d.ts +17 -0
- package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
- package/lib/types/ink/events/wheel-event.js +20 -0
- package/lib/types/ink/geometry-trace.d.ts +51 -0
- package/lib/types/ink/geometry-trace.d.ts.map +1 -0
- package/lib/types/ink/geometry-trace.js +83 -0
- package/lib/types/ink/hit-test.d.ts +56 -1
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +146 -8
- package/lib/types/ink/ink.d.ts +58 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +230 -29
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +21 -0
- package/lib/types/ink/node-cache.d.ts +5 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.d.ts +8 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +101 -12
- package/lib/types/ink/render-node-to-output.d.ts +10 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +111 -18
- package/lib/types/ink/timeline-rail.d.ts +138 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -0
- package/lib/types/ink/timeline-rail.js +179 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +47 -5
- package/lib/types/migrationPrefs.d.ts +60 -0
- package/lib/types/migrationPrefs.d.ts.map +1 -0
- package/lib/types/migrationPrefs.js +97 -0
- package/lib/types/modelGroups.d.ts +72 -0
- package/lib/types/modelGroups.d.ts.map +1 -0
- package/lib/types/modelGroups.js +97 -0
- package/lib/types/modelRecents.d.ts +39 -0
- package/lib/types/modelRecents.d.ts.map +1 -0
- package/lib/types/modelRecents.js +97 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +11 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +31 -1
- package/lib/types/oauth.d.ts +15 -0
- package/lib/types/oauth.d.ts.map +1 -0
- package/lib/types/oauth.js +14 -0
- package/lib/types/reload.d.ts +109 -0
- package/lib/types/reload.d.ts.map +1 -0
- package/lib/types/reload.js +118 -0
- package/lib/types/screens/Chat.d.ts +3 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1377 -371
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionBrowser.js +56 -29
- package/lib/types/screens/SessionTree.d.ts +27 -0
- package/lib/types/screens/SessionTree.d.ts.map +1 -0
- package/lib/types/screens/SessionTree.js +555 -0
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +64 -22
- package/lib/types/screens/StatusLine.d.ts +0 -8
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +224 -45
- package/lib/types/screens/StatusMetrics.d.ts +35 -3
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +63 -8
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +81 -14
- package/lib/types/screens/chatOverlay.d.ts +237 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -0
- package/lib/types/screens/chatOverlay.js +116 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +64 -10
- package/lib/types/tuiDisplayPrefs.d.ts +15 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +9 -0
- package/lib/types/update.d.ts +139 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +382 -30
- package/lib/types/utils/debug.d.ts +10 -0
- package/lib/types/utils/debug.d.ts.map +1 -1
- package/lib/types/utils/debug.js +24 -0
- package/lib/types/utils/fileTarget.d.ts +46 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -0
- package/lib/types/utils/fileTarget.js +178 -0
- package/lib/types/utils/keymap.d.ts +134 -0
- package/lib/types/utils/keymap.d.ts.map +1 -0
- package/lib/types/utils/keymap.js +311 -0
- package/lib/types/utils/mentions.d.ts +25 -2
- package/lib/types/utils/mentions.d.ts.map +1 -1
- package/lib/types/utils/mentions.js +69 -10
- package/lib/types/utils/openExternal.d.ts +50 -0
- package/lib/types/utils/openExternal.d.ts.map +1 -0
- package/lib/types/utils/openExternal.js +170 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +1 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +140 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +11 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.d.ts +14 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.js +67 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +64 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.js +170 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +79 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +196 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +193 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.d.ts +32 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.js +101 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +31 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.d.ts +69 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +129 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +70 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +19 -5
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/instruction-hint.mjs +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -430,6 +430,17 @@ export class Node {
|
|
|
430
430
|
_cGen = -1;
|
|
431
431
|
/** Number of populated cache slots. */
|
|
432
432
|
_cN = 0;
|
|
433
|
+
/**
|
|
434
|
+
* Generation of the last MEASURE-pass call that actually computed (cache
|
|
435
|
+
* miss with performLayout=false). Such a call recurses and overwrites the
|
|
436
|
+
* subtree's layout.* fields as scratch for whatever available size it was
|
|
437
|
+
* probing — which may differ from the node's final size. A subsequent
|
|
438
|
+
* layout-pass cache hit would restore only this node's own w/h and skip
|
|
439
|
+
* the child recursion, leaving descendants at the scratch geometry (the
|
|
440
|
+
* warm-resize 106-vs-105 wrap drift). Layout-pass early returns must
|
|
441
|
+
* therefore refuse to hit while _scratchGen === _generation.
|
|
442
|
+
*/
|
|
443
|
+
_scratchGen = -1;
|
|
433
444
|
/** LRU write index into the cache arrays. */
|
|
434
445
|
_cWr = 0;
|
|
435
446
|
constructor(config) {
|
|
@@ -1281,10 +1292,21 @@ function commitCacheOutputs(node, performLayout) {
|
|
|
1281
1292
|
if (performLayout) {
|
|
1282
1293
|
node._lOutW = node.layout.width;
|
|
1283
1294
|
node._lOutH = node.layout.height;
|
|
1295
|
+
// A completed layout pass re-laid the whole subtree at the final
|
|
1296
|
+
// constraints — any measure-pass scratch below has been overwritten,
|
|
1297
|
+
// so this node may serve layout-cache hits again.
|
|
1298
|
+
node._scratchGen = -1;
|
|
1284
1299
|
}
|
|
1285
1300
|
else {
|
|
1286
1301
|
node._mOutW = node.layout.width;
|
|
1287
1302
|
node._mOutH = node.layout.height;
|
|
1303
|
+
// This measure call actually computed: its recursion overwrote the
|
|
1304
|
+
// subtree's layout.* as scratch for the probed size. Until a layout
|
|
1305
|
+
// pass re-lays this subtree, layout-cache hits here must be refused
|
|
1306
|
+
// (see _scratchGen). Leaves have no subtree to corrupt — skip them so
|
|
1307
|
+
// measure-heavy text nodes keep their layout-cache hits.
|
|
1308
|
+
if (node.children.length > 0)
|
|
1309
|
+
node._scratchGen = _generation;
|
|
1288
1310
|
}
|
|
1289
1311
|
}
|
|
1290
1312
|
// --
|
|
@@ -1331,6 +1353,10 @@ forceWidth = false, forceHeight = false) {
|
|
|
1331
1353
|
if (!node.isDirty_ || sameGen) {
|
|
1332
1354
|
if (!node.isDirty_ &&
|
|
1333
1355
|
node._hasL &&
|
|
1356
|
+
// A layout-pass hit restores only this node's own w/h and skips the
|
|
1357
|
+
// child recursion — illegal while a same-generation measure compute
|
|
1358
|
+
// has left the subtree at scratch geometry for a different probe size.
|
|
1359
|
+
!(performLayout && node._scratchGen === _generation) &&
|
|
1334
1360
|
node._lWM === widthMode &&
|
|
1335
1361
|
node._lHM === heightMode &&
|
|
1336
1362
|
node._lFW === forceWidth &&
|
|
@@ -1353,7 +1379,11 @@ forceWidth = false, forceHeight = false) {
|
|
|
1353
1379
|
// Same-generation check covers fresh-mounted (dirty) nodes during
|
|
1354
1380
|
// virtual scroll — the dirty chain invokes them ≥2^depth times, first
|
|
1355
1381
|
// call writes cache, rest hit: 105k visits → ~10k for 1593-node tree.
|
|
1356
|
-
if (node._cN > 0 &&
|
|
1382
|
+
if (node._cN > 0 &&
|
|
1383
|
+
(sameGen || !node.isDirty_) &&
|
|
1384
|
+
// Same scratch guard as _hasL: a layout-pass hit must not skip child
|
|
1385
|
+
// recursion over a measure-scratched subtree.
|
|
1386
|
+
!(performLayout && node._scratchGen === _generation)) {
|
|
1357
1387
|
const cIn = node._cIn;
|
|
1358
1388
|
for (let i = 0; i < node._cN; i++) {
|
|
1359
1389
|
const o = i * 8;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the `@deepseek-harness-tui/dsh-auth` plugin under this
|
|
3
|
+
* package's own name, so the bundle patch layer can mount the OAuth row as
|
|
4
|
+
* `@deepseek-harness-tui/dsh-tui/oauth` instead of the bare package name —
|
|
5
|
+
* the same anchor the working-activity row uses (#60): the dsh Loader
|
|
6
|
+
* resolves row names from the *profile* directory, where only the profile's
|
|
7
|
+
* direct dependencies are linked, and pnpm's isolated layout never hoists a
|
|
8
|
+
* transitive dependency there. Mounting through this subpath keeps plugin
|
|
9
|
+
* resolution anchored at @deepseek-harness-tui/dsh-tui itself, always a
|
|
10
|
+
* direct profile dependency, under every package-manager layout.
|
|
11
|
+
*
|
|
12
|
+
* @module @deepseek-harness-tui/dsh-tui/oauth
|
|
13
|
+
*/
|
|
14
|
+
export * from '@deepseek-harness-tui/dsh-auth';
|
|
15
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the `@deepseek-harness-tui/dsh-auth` plugin under this
|
|
3
|
+
* package's own name, so the bundle patch layer can mount the OAuth row as
|
|
4
|
+
* `@deepseek-harness-tui/dsh-tui/oauth` instead of the bare package name —
|
|
5
|
+
* the same anchor the working-activity row uses (#60): the dsh Loader
|
|
6
|
+
* resolves row names from the *profile* directory, where only the profile's
|
|
7
|
+
* direct dependencies are linked, and pnpm's isolated layout never hoists a
|
|
8
|
+
* transitive dependency there. Mounting through this subpath keeps plugin
|
|
9
|
+
* resolution anchored at @deepseek-harness-tui/dsh-tui itself, always a
|
|
10
|
+
* direct profile dependency, under every package-manager layout.
|
|
11
|
+
*
|
|
12
|
+
* @module @deepseek-harness-tui/dsh-tui/oauth
|
|
13
|
+
*/
|
|
14
|
+
export * from '@deepseek-harness-tui/dsh-auth';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/reload` planning — the pi-style soft reload: re-read the TUI's persisted
|
|
3
|
+
* preference files (`~/.dsh-tui/{theme,lang,agent-preset,model,
|
|
4
|
+
* working-activity}.json`) and decide what to re-apply live, honoring the
|
|
5
|
+
* same boot-time precedence every picker does:
|
|
6
|
+
*
|
|
7
|
+
* - theme: DSH_TUI_THEME wins; else theme.json.
|
|
8
|
+
* - lang: DSH_TUI_LANG > settings `dsh-tui.lang` (folded in by the
|
|
9
|
+
* caller as `langOverriddenBySettings`) > cordis.yml `lang`
|
|
10
|
+
* > lang.json.
|
|
11
|
+
* - preset: cordis.yml `preset` wins; else agent-preset.json.
|
|
12
|
+
* - model: a COMPLETE cordis.yml provider/model pair wins whole
|
|
13
|
+
* (issue #67 — never merge halves); else model.json.
|
|
14
|
+
* - activity: cordis.yml `activityFrames` wins; else
|
|
15
|
+
* working-activity.json.
|
|
16
|
+
*
|
|
17
|
+
* Settings-namespace values (settings.yaml user layer) are deliberately NOT
|
|
18
|
+
* re-read here: the dsh-tui namespace applies live through its settings
|
|
19
|
+
* watch and hot-reloads its document through the platform's file watcher,
|
|
20
|
+
* so /reload only needs the five boot-only pref files. What no reload can
|
|
21
|
+
* re-read (cordis.yml root config, frozen fullscreen layout, newly built
|
|
22
|
+
* code) is the job of `/restart`.
|
|
23
|
+
*
|
|
24
|
+
* Pure and injectable so scripts/verify-reload.ts can exercise every branch
|
|
25
|
+
* without a UI or a file system.
|
|
26
|
+
*/
|
|
27
|
+
import type { Lang } from './i18n.js';
|
|
28
|
+
import type { ModelPref } from './modelPrefs.js';
|
|
29
|
+
import type { ModelRoute } from './modelRoute.js';
|
|
30
|
+
/** The five boot-only preference surfaces /reload re-reads. */
|
|
31
|
+
export type ReloadKind = 'theme' | 'lang' | 'preset' | 'model' | 'activity';
|
|
32
|
+
export type ReloadSkipReason =
|
|
33
|
+
/** A launch-time environment variable pins the value (DSH_TUI_THEME / DSH_TUI_LANG). */
|
|
34
|
+
'env-wins'
|
|
35
|
+
/** cordis.yml or the settings user layer pins the value; the pref must not override it. */
|
|
36
|
+
| 'config-wins'
|
|
37
|
+
/** The pref file is missing or unparsable. */
|
|
38
|
+
| 'invalid';
|
|
39
|
+
/** One live change /reload applies. Kind `model` carries the route halves. */
|
|
40
|
+
export interface ReloadApply {
|
|
41
|
+
kind: ReloadKind;
|
|
42
|
+
/** The live value before this reload. */
|
|
43
|
+
from: string;
|
|
44
|
+
/** The value the pref file now names. */
|
|
45
|
+
to: string;
|
|
46
|
+
/** Present for kind `model`: the full route halves to switch to. */
|
|
47
|
+
route?: ModelRoute;
|
|
48
|
+
}
|
|
49
|
+
/** A pref /reload did not apply, and why. */
|
|
50
|
+
export interface ReloadSkip {
|
|
51
|
+
kind: ReloadKind;
|
|
52
|
+
reason: ReloadSkipReason;
|
|
53
|
+
}
|
|
54
|
+
/** What one /reload run decided, before any side effects. */
|
|
55
|
+
export interface ReloadPlan {
|
|
56
|
+
/** Apply these in order (theme → lang → preset → model → activity). */
|
|
57
|
+
apply: ReloadApply[];
|
|
58
|
+
/** Pref files whose value already matches the live state. */
|
|
59
|
+
unchanged: ReloadKind[];
|
|
60
|
+
/** Pref files not applied, and why. */
|
|
61
|
+
skipped: ReloadSkip[];
|
|
62
|
+
}
|
|
63
|
+
/** Everything the planner needs — caller reads the files and live values. */
|
|
64
|
+
export interface ReloadInput {
|
|
65
|
+
/** DSH_TUI_THEME, when it holds a valid theme name. */
|
|
66
|
+
envTheme?: string;
|
|
67
|
+
/** DSH_TUI_LANG, when it holds a valid language. */
|
|
68
|
+
envLang?: string;
|
|
69
|
+
/** Fresh readThemePref(). */
|
|
70
|
+
themePref?: string;
|
|
71
|
+
/** The live theme name (ThemeProvider state). */
|
|
72
|
+
currentTheme: string;
|
|
73
|
+
/** Fresh readLangPref(). */
|
|
74
|
+
langPref?: Lang;
|
|
75
|
+
/** The live UI language. */
|
|
76
|
+
currentLang: Lang;
|
|
77
|
+
/** True when the settings user layer (settings.yaml `dsh-tui.lang`) pins a language. */
|
|
78
|
+
langOverriddenBySettings: boolean;
|
|
79
|
+
/** cordis.yml's raw `lang` key, when set. */
|
|
80
|
+
configuredLang?: string;
|
|
81
|
+
/** cordis.yml's explicit `preset` key, when set. */
|
|
82
|
+
configuredPreset?: string;
|
|
83
|
+
/** Fresh readPresetPref(). */
|
|
84
|
+
presetPref?: string;
|
|
85
|
+
/** The live preset id (channel.agentPreset; undefined = roster default). */
|
|
86
|
+
currentPreset?: string;
|
|
87
|
+
/** cordis.yml's raw `provider`/`model` keys, when set. */
|
|
88
|
+
configuredModel?: {
|
|
89
|
+
provider?: string;
|
|
90
|
+
model?: string;
|
|
91
|
+
};
|
|
92
|
+
/** Fresh readModelPref(). */
|
|
93
|
+
modelPref?: ModelPref;
|
|
94
|
+
/** The live route (channel provider/model). */
|
|
95
|
+
currentModel?: ModelRoute;
|
|
96
|
+
/** cordis.yml's explicit `activityFrames` key, when set. */
|
|
97
|
+
configuredActivity?: string;
|
|
98
|
+
/** Fresh readActivityFrames(). */
|
|
99
|
+
activityPref?: string;
|
|
100
|
+
/** The live activity preset (channel.activityFrames). */
|
|
101
|
+
currentActivity?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Decide what one /reload applies. Pure: returns the plan, never touches
|
|
105
|
+
* the UI or the channel. The caller executes `apply` in order and renders
|
|
106
|
+
* the report.
|
|
107
|
+
*/
|
|
108
|
+
export declare function planReload(input: ReloadInput): ReloadPlan;
|
|
109
|
+
//# sourceMappingURL=reload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload.d.ts","sourceRoot":"","sources":["../../src/reload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGjD,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAA;AAE3E,MAAM,MAAM,gBAAgB;AAC1B,wFAAwF;AACtF,UAAU;AACZ,2FAA2F;GACzF,aAAa;AACf,8CAA8C;GAC5C,SAAS,CAAA;AAEb,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAA;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,oEAAoE;IACpE,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED,6DAA6D;AAC7D,MAAM,WAAW,UAAU;IACzB,uEAAuE;IACvE,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,6DAA6D;IAC7D,SAAS,EAAE,UAAU,EAAE,CAAA;IACvB,uCAAuC;IACvC,OAAO,EAAE,UAAU,EAAE,CAAA;CACtB;AAED,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,IAAI,CAAA;IACf,4BAA4B;IAC5B,WAAW,EAAE,IAAI,CAAA;IACjB,wFAAwF;IACxF,wBAAwB,EAAE,OAAO,CAAA;IACjC,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,eAAe,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACvD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,UAAU,CAAA;IACzB,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CA6EzD"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/reload` planning — the pi-style soft reload: re-read the TUI's persisted
|
|
3
|
+
* preference files (`~/.dsh-tui/{theme,lang,agent-preset,model,
|
|
4
|
+
* working-activity}.json`) and decide what to re-apply live, honoring the
|
|
5
|
+
* same boot-time precedence every picker does:
|
|
6
|
+
*
|
|
7
|
+
* - theme: DSH_TUI_THEME wins; else theme.json.
|
|
8
|
+
* - lang: DSH_TUI_LANG > settings `dsh-tui.lang` (folded in by the
|
|
9
|
+
* caller as `langOverriddenBySettings`) > cordis.yml `lang`
|
|
10
|
+
* > lang.json.
|
|
11
|
+
* - preset: cordis.yml `preset` wins; else agent-preset.json.
|
|
12
|
+
* - model: a COMPLETE cordis.yml provider/model pair wins whole
|
|
13
|
+
* (issue #67 — never merge halves); else model.json.
|
|
14
|
+
* - activity: cordis.yml `activityFrames` wins; else
|
|
15
|
+
* working-activity.json.
|
|
16
|
+
*
|
|
17
|
+
* Settings-namespace values (settings.yaml user layer) are deliberately NOT
|
|
18
|
+
* re-read here: the dsh-tui namespace applies live through its settings
|
|
19
|
+
* watch and hot-reloads its document through the platform's file watcher,
|
|
20
|
+
* so /reload only needs the five boot-only pref files. What no reload can
|
|
21
|
+
* re-read (cordis.yml root config, frozen fullscreen layout, newly built
|
|
22
|
+
* code) is the job of `/restart`.
|
|
23
|
+
*
|
|
24
|
+
* Pure and injectable so scripts/verify-reload.ts can exercise every branch
|
|
25
|
+
* without a UI or a file system.
|
|
26
|
+
*/
|
|
27
|
+
import { explicitModelRoute } from './modelRoute.js';
|
|
28
|
+
/**
|
|
29
|
+
* Decide what one /reload applies. Pure: returns the plan, never touches
|
|
30
|
+
* the UI or the channel. The caller executes `apply` in order and renders
|
|
31
|
+
* the report.
|
|
32
|
+
*/
|
|
33
|
+
export function planReload(input) {
|
|
34
|
+
const apply = [];
|
|
35
|
+
const unchanged = [];
|
|
36
|
+
const skipped = [];
|
|
37
|
+
// Theme: env override wins at launch; else the persisted choice.
|
|
38
|
+
if (input.envTheme !== undefined) {
|
|
39
|
+
skipped.push({ kind: 'theme', reason: 'env-wins' });
|
|
40
|
+
}
|
|
41
|
+
else if (input.themePref === undefined) {
|
|
42
|
+
skipped.push({ kind: 'theme', reason: 'invalid' });
|
|
43
|
+
}
|
|
44
|
+
else if (input.themePref === input.currentTheme) {
|
|
45
|
+
unchanged.push('theme');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
apply.push({ kind: 'theme', from: input.currentTheme, to: input.themePref });
|
|
49
|
+
}
|
|
50
|
+
// Language: env, then the settings user layer, then cordis.yml, then the
|
|
51
|
+
// persisted choice — mirror the boot precedence in plugin.apply.
|
|
52
|
+
if (input.envLang !== undefined) {
|
|
53
|
+
skipped.push({ kind: 'lang', reason: 'env-wins' });
|
|
54
|
+
}
|
|
55
|
+
else if (input.langOverriddenBySettings || input.configuredLang !== undefined) {
|
|
56
|
+
skipped.push({ kind: 'lang', reason: 'config-wins' });
|
|
57
|
+
}
|
|
58
|
+
else if (input.langPref === undefined) {
|
|
59
|
+
skipped.push({ kind: 'lang', reason: 'invalid' });
|
|
60
|
+
}
|
|
61
|
+
else if (input.langPref === input.currentLang) {
|
|
62
|
+
unchanged.push('lang');
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
apply.push({ kind: 'lang', from: input.currentLang, to: input.langPref });
|
|
66
|
+
}
|
|
67
|
+
// Preset: cordis.yml's static choice wins; else the persisted one.
|
|
68
|
+
if (input.configuredPreset !== undefined) {
|
|
69
|
+
skipped.push({ kind: 'preset', reason: 'config-wins' });
|
|
70
|
+
}
|
|
71
|
+
else if (input.presetPref === undefined) {
|
|
72
|
+
skipped.push({ kind: 'preset', reason: 'invalid' });
|
|
73
|
+
}
|
|
74
|
+
else if (input.presetPref === input.currentPreset) {
|
|
75
|
+
unchanged.push('preset');
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
apply.push({ kind: 'preset', from: input.currentPreset ?? '—', to: input.presetPref });
|
|
79
|
+
}
|
|
80
|
+
// Model route: the atomic rule (issue #67) — a complete cordis.yml pair
|
|
81
|
+
// wins whole; a half-pinned config never merges with the pref's other half.
|
|
82
|
+
// (Normalize to an object: callers may pass undefined when no route is pinned.)
|
|
83
|
+
if (explicitModelRoute(input.configuredModel ?? {}) !== undefined) {
|
|
84
|
+
skipped.push({ kind: 'model', reason: 'config-wins' });
|
|
85
|
+
}
|
|
86
|
+
else if (input.modelPref === undefined) {
|
|
87
|
+
skipped.push({ kind: 'model', reason: 'invalid' });
|
|
88
|
+
}
|
|
89
|
+
else if (input.currentModel !== undefined
|
|
90
|
+
&& input.currentModel.provider === input.modelPref.provider
|
|
91
|
+
&& input.currentModel.model === input.modelPref.model) {
|
|
92
|
+
unchanged.push('model');
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
apply.push({
|
|
96
|
+
kind: 'model',
|
|
97
|
+
from: input.currentModel === undefined
|
|
98
|
+
? '—'
|
|
99
|
+
: `${input.currentModel.provider}/${input.currentModel.model}`,
|
|
100
|
+
to: `${input.modelPref.provider}/${input.modelPref.model}`,
|
|
101
|
+
route: { provider: input.modelPref.provider, model: input.modelPref.model },
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
// Working-activity indicator: cordis.yml's static choice wins.
|
|
105
|
+
if (input.configuredActivity !== undefined) {
|
|
106
|
+
skipped.push({ kind: 'activity', reason: 'config-wins' });
|
|
107
|
+
}
|
|
108
|
+
else if (input.activityPref === undefined) {
|
|
109
|
+
skipped.push({ kind: 'activity', reason: 'invalid' });
|
|
110
|
+
}
|
|
111
|
+
else if (input.activityPref === input.currentActivity) {
|
|
112
|
+
unchanged.push('activity');
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
apply.push({ kind: 'activity', from: input.currentActivity ?? 'claude', to: input.activityPref });
|
|
116
|
+
}
|
|
117
|
+
return { apply, unchanged, skipped };
|
|
118
|
+
}
|
|
@@ -5,7 +5,7 @@ import { TuiDialogStore } from '../dsh-adapter/dialogs.js';
|
|
|
5
5
|
import { TuiStatusStore } from '../dsh-adapter/status.js';
|
|
6
6
|
import type { TuiShortcutHost } from '../dsh-adapter/shortcuts.js';
|
|
7
7
|
import { ApprovalStore } from '../dsh-adapter/approvals.js';
|
|
8
|
-
export declare function Chat({ channel, questionStore, approvalStore, extensionDialogs, extensionStatus, extensionShortcuts, onExit, onUpdate, fullscreen, trajectorySeen: trajectorySeenProp, }: {
|
|
8
|
+
export declare function Chat({ channel, questionStore, approvalStore, extensionDialogs, extensionStatus, extensionShortcuts, onExit, onUpdate, onRestart, fullscreen, trajectorySeen: trajectorySeenProp, }: {
|
|
9
9
|
channel: Channel;
|
|
10
10
|
questionStore: QuestionStore;
|
|
11
11
|
/**
|
|
@@ -27,6 +27,8 @@ export declare function Chat({ channel, questionStore, approvalStore, extensionD
|
|
|
27
27
|
onExit: () => void;
|
|
28
28
|
/** Update the installed package and restart the current TUI process. */
|
|
29
29
|
onUpdate?: () => void;
|
|
30
|
+
/** Restart the current TUI process and resume this session (no update). */
|
|
31
|
+
onRestart?: () => void;
|
|
30
32
|
/**
|
|
31
33
|
* True when the host already wrapped this tree in `<AlternateScreen>`
|
|
32
34
|
* (`fullscreen: true`). Both full-screen surfaces need this — the trajectory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/screens/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/screens/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAwBzB,OAAO,EAAqB,KAAK,OAAO,EAAsE,MAAM,2BAA2B,CAAA;AAC/I,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAuK3D,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAkB,EAClB,cAAc,EAAE,kBAAkB,GACnC,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,aAAa,CAAA;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAA;IACjC,oEAAoE;IACpE,eAAe,CAAC,EAAE,cAAc,CAAA;IAChC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,eAAe,CAAA;IACpC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,4BA8vGA"}
|