@deepseek-harness-tui/dsh-tui 0.9.0 → 0.9.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 +69 -256
- 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 +6 -0
- 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/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 +3 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- 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/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 +3 -1
- package/lib/types/components/FileSuggestions.d.ts.map +1 -1
- package/lib/types/components/MessageList.d.ts +3 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +13 -6
- package/lib/types/components/ModelPicker.d.ts +26 -4
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +26 -6
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +365 -57
- 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/ScrollbarGutter.d.ts.map +1 -1
- package/lib/types/components/ScrollbarGutter.js +55 -4
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +6 -4
- package/lib/types/components/SuggestionCard.d.ts +4 -2
- package/lib/types/components/SuggestionCard.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -2
- 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/AssistantToolUseMessage.d.ts +8 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +36 -8
- 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 +41 -9
- package/lib/types/dsh-adapter/channel.d.ts +101 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +969 -93
- 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 +10 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +5 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +317 -8
- 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 +604 -176
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +206 -72
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +21 -0
- 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/plugin-spec/registry.d.ts +1 -1
- package/lib/types/plugin-spec/registry.js +1 -1
- 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 +588 -64
- 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/StatusLine.d.ts +0 -9
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +215 -52
- 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/chatOverlay.d.ts +17 -1
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +3 -1
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +22 -4
- package/lib/types/update.d.ts +159 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +496 -30
- package/lib/types/utils/debug.d.ts +1 -1
- package/lib/types/utils/debug.js +3 -3
- 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/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 +17 -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
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* - Combos must carry ctrl or alt (meta) — bare letters are typing, and
|
|
11
11
|
* bare Esc/arrows are navigation. Rejected at registration.
|
|
12
|
-
* - A RESERVED list (
|
|
13
|
-
* prompt editor
|
|
14
|
-
*
|
|
12
|
+
* - A RESERVED list (fixed combos the TUI itself binds globally or in the
|
|
13
|
+
* prompt editor, PLUS the effective combos of every customizable built-in
|
|
14
|
+
* action from src/utils/keymap.ts) is refused at registration with a
|
|
15
|
+
* warning. The list is the enforcement of "locals win": collisions can
|
|
16
|
+
* never reach the matcher — and it follows user remaps made in /settings.
|
|
15
17
|
* - Overlays (pickers, dialogs, scenes, the session browser) own the
|
|
16
18
|
* keyboard while open; shortcuts match only in the plain chat state.
|
|
17
19
|
*
|
|
@@ -20,28 +22,16 @@
|
|
|
20
22
|
* handler must never break the keyboard for everyone else.
|
|
21
23
|
*/
|
|
22
24
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
tab?: boolean;
|
|
34
|
-
backspace?: boolean;
|
|
35
|
-
delete?: boolean;
|
|
36
|
-
upArrow?: boolean;
|
|
37
|
-
downArrow?: boolean;
|
|
38
|
-
leftArrow?: boolean;
|
|
39
|
-
rightArrow?: boolean;
|
|
40
|
-
home?: boolean;
|
|
41
|
-
end?: boolean;
|
|
42
|
-
pageUp?: boolean;
|
|
43
|
-
pageDown?: boolean;
|
|
44
|
-
}
|
|
25
|
+
import { comboMatchesStrict, parseCombo, type ComboKeyFlags, type ParsedCombo } from '../utils/keymap.js';
|
|
26
|
+
/**
|
|
27
|
+
* Minimal shape of the ink Key flags the matcher reads (kept structurally
|
|
28
|
+
* compatible with `Key` from the ui kit without importing React-facing
|
|
29
|
+
* modules into the adapter).
|
|
30
|
+
*/
|
|
31
|
+
export type TuiShortcutKey = ComboKeyFlags;
|
|
32
|
+
export declare const parseShortcutCombo: typeof parseCombo;
|
|
33
|
+
export declare const matchShortcut: typeof comboMatchesStrict;
|
|
34
|
+
export type { ParsedCombo };
|
|
45
35
|
/** Controls that only the Chat input path may use. They are kept out of the
|
|
46
36
|
* Cordis service object, so one plugin cannot synthesize an input event to
|
|
47
37
|
* invoke another plugin's shortcut handler. */
|
|
@@ -55,25 +45,6 @@ export interface TuiShortcutOptions {
|
|
|
55
45
|
description: string;
|
|
56
46
|
handler: () => void | Promise<void>;
|
|
57
47
|
}
|
|
58
|
-
interface ParsedCombo {
|
|
59
|
-
readonly raw: string;
|
|
60
|
-
readonly ctrl: boolean;
|
|
61
|
-
readonly meta: boolean;
|
|
62
|
-
readonly shift: boolean;
|
|
63
|
-
/** Named key flag on the Key object, or undefined for a character key. */
|
|
64
|
-
readonly named?: keyof TuiShortcutKey;
|
|
65
|
-
/** Character to match against the ink `input` string (lowercased). */
|
|
66
|
-
readonly char?: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Parse `ctrl+shift+p` style combos. Returns undefined on anything
|
|
70
|
-
* malformed or disallowed (no modifier, unknown key name); `allowReserved`
|
|
71
|
-
* is exposed for tests only.
|
|
72
|
-
*/
|
|
73
|
-
export declare function parseShortcutCombo(raw: string): ParsedCombo | undefined;
|
|
74
|
-
/** Match a keypress against a parsed combo. `input` is ink's input string
|
|
75
|
-
* (already the resolved character; ctrl+space arrives as ' '). */
|
|
76
|
-
export declare function matchShortcut(combo: ParsedCombo, input: string, key: TuiShortcutKey): boolean;
|
|
77
48
|
declare module '@deepseek-ai/cordis' {
|
|
78
49
|
interface Context {
|
|
79
50
|
tuiShortcuts: TuiShortcutRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/shortcuts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/shortcuts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAEL,kBAAkB,EAElB,UAAU,EAEV,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAA;AAE3B;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CAAA;AAI1C,eAAO,MAAM,kBAAkB,mBAAa,CAAA;AAC5C,eAAO,MAAM,aAAa,2BAAqB,CAAA;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B;;+CAE+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAA;IACrD,eAAe,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC9E;AAED,MAAM,WAAW,kBAAkB;IACjC;0CACsC;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC;AAiBD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,YAAY,EAAE,kBAAkB,CAAA;KACjC;CACF;AAED,8DAA8D;AAC9D,qBAAa,kBAAmB,SAAQ,OAAO;gBACjC,GAAG,EAAE,OAAO;IAwBxB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,IAAI;IA0FpF,wEAAwE;IACxE,IAAI,IAAI,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE;CAS1D;AAmCD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAOrG;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* - Combos must carry ctrl or alt (meta) — bare letters are typing, and
|
|
11
11
|
* bare Esc/arrows are navigation. Rejected at registration.
|
|
12
|
-
* - A RESERVED list (
|
|
13
|
-
* prompt editor
|
|
14
|
-
*
|
|
12
|
+
* - A RESERVED list (fixed combos the TUI itself binds globally or in the
|
|
13
|
+
* prompt editor, PLUS the effective combos of every customizable built-in
|
|
14
|
+
* action from src/utils/keymap.ts) is refused at registration with a
|
|
15
|
+
* warning. The list is the enforcement of "locals win": collisions can
|
|
16
|
+
* never reach the matcher — and it follows user remaps made in /settings.
|
|
15
17
|
* - Overlays (pickers, dialogs, scenes, the session browser) own the
|
|
16
18
|
* keyboard while open; shortcuts match only in the plain chat state.
|
|
17
19
|
*
|
|
@@ -22,163 +24,19 @@
|
|
|
22
24
|
import { Service } from '@deepseek-ai/cordis';
|
|
23
25
|
import { cleanScalarText } from './sanitize.js';
|
|
24
26
|
import { activationFiber, bindCallerEffect, compositionRoot, concreteService, requirePluginCaller } from './host-access.js';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
tab: 'tab',
|
|
31
|
-
backspace: 'backspace',
|
|
32
|
-
delete: 'delete',
|
|
33
|
-
up: 'upArrow',
|
|
34
|
-
down: 'downArrow',
|
|
35
|
-
left: 'leftArrow',
|
|
36
|
-
right: 'rightArrow',
|
|
37
|
-
home: 'home',
|
|
38
|
-
end: 'end',
|
|
39
|
-
pageup: 'pageUp',
|
|
40
|
-
pagedown: 'pageDown',
|
|
41
|
-
};
|
|
27
|
+
import { canonicalCombo, comboMatchesStrict, fixedReservedCombos, parseCombo, reservedActionCombos, } from '../utils/keymap.js';
|
|
28
|
+
// Shared combo grammar + built-in keymap live in src/utils/keymap.ts; the
|
|
29
|
+
// parse/match entry points stay re-exported here for API stability.
|
|
30
|
+
export const parseShortcutCombo = parseCombo;
|
|
31
|
+
export const matchShortcut = comboMatchesStrict;
|
|
42
32
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* reserved: ctrl+shift+g would shadow Ctrl+G on terminals that report both
|
|
49
|
-
* as the same keypress (ConPTY does), and would be dead weight on terminals
|
|
50
|
-
* that don't.
|
|
33
|
+
* The fixed half of the reserved set lives in src/utils/keymap.ts
|
|
34
|
+
* (FIXED_RESERVED_COMBOS) so the /settings draft validator and this
|
|
35
|
+
* registry agree on one list; the customizable action combos join here
|
|
36
|
+
* dynamically via `reservedActionCombos()` so a user remap (say
|
|
37
|
+
* paste → alt+v) moves the reservation with the binding.
|
|
51
38
|
*/
|
|
52
|
-
const
|
|
53
|
-
'ctrl+c', // interrupt / clear
|
|
54
|
-
'ctrl+d', // exit on empty input
|
|
55
|
-
'ctrl+t', // startup context panel
|
|
56
|
-
'ctrl+r', // history search
|
|
57
|
-
'ctrl+g', // external editor
|
|
58
|
-
'ctrl+o', // transcript mode toggle
|
|
59
|
-
'ctrl+l', // terminal redraw
|
|
60
|
-
'ctrl+e', // show all messages / line end
|
|
61
|
-
'ctrl+v', // paste
|
|
62
|
-
'ctrl+a', // line start
|
|
63
|
-
'ctrl+u', // kill line
|
|
64
|
-
'ctrl+k', // kill to end
|
|
65
|
-
'ctrl+w', // kill word
|
|
66
|
-
'ctrl+left', // word jump
|
|
67
|
-
'ctrl+right', // word jump
|
|
68
|
-
'ctrl+return', // newline (multi-line input)
|
|
69
|
-
'ctrl+shift+return', // shift+Enter newline (CSI 13;6u) — same editor binding
|
|
70
|
-
'alt+return', // newline fallback on terminals without shift reporting
|
|
71
|
-
'alt+up', // pull the last pending message back for editing
|
|
72
|
-
'escape', // pickers / interrupt / rewind double-tap
|
|
73
|
-
'tab', // command completion
|
|
74
|
-
'shift+tab', // session-mode cycle
|
|
75
|
-
]);
|
|
76
|
-
/**
|
|
77
|
-
* Parse `ctrl+shift+p` style combos. Returns undefined on anything
|
|
78
|
-
* malformed or disallowed (no modifier, unknown key name); `allowReserved`
|
|
79
|
-
* is exposed for tests only.
|
|
80
|
-
*/
|
|
81
|
-
export function parseShortcutCombo(raw) {
|
|
82
|
-
const parts = String(raw ?? '')
|
|
83
|
-
.toLowerCase()
|
|
84
|
-
.split('+')
|
|
85
|
-
.map(part => part.trim())
|
|
86
|
-
.filter(part => part !== '');
|
|
87
|
-
if (parts.length === 0)
|
|
88
|
-
return undefined;
|
|
89
|
-
let ctrl = false;
|
|
90
|
-
let meta = false;
|
|
91
|
-
let shift = false;
|
|
92
|
-
let named;
|
|
93
|
-
let char;
|
|
94
|
-
for (const part of parts) {
|
|
95
|
-
if (part === 'ctrl' || part === 'control') {
|
|
96
|
-
if (ctrl)
|
|
97
|
-
return undefined;
|
|
98
|
-
ctrl = true;
|
|
99
|
-
}
|
|
100
|
-
else if (part === 'alt' || part === 'meta' || part === 'option') {
|
|
101
|
-
if (meta)
|
|
102
|
-
return undefined;
|
|
103
|
-
meta = true;
|
|
104
|
-
}
|
|
105
|
-
else if (part === 'shift') {
|
|
106
|
-
if (shift)
|
|
107
|
-
return undefined;
|
|
108
|
-
shift = true;
|
|
109
|
-
}
|
|
110
|
-
else if (part === 'space') {
|
|
111
|
-
if (char !== undefined || named !== undefined)
|
|
112
|
-
return undefined;
|
|
113
|
-
char = ' ';
|
|
114
|
-
}
|
|
115
|
-
else if (part in NAMED_KEYS) {
|
|
116
|
-
if (char !== undefined || named !== undefined)
|
|
117
|
-
return undefined;
|
|
118
|
-
named = NAMED_KEYS[part];
|
|
119
|
-
}
|
|
120
|
-
else if ([...part].length === 1) {
|
|
121
|
-
if (char !== undefined || named !== undefined)
|
|
122
|
-
return undefined;
|
|
123
|
-
char = part;
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
return undefined;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (char === undefined && named === undefined)
|
|
130
|
-
return undefined;
|
|
131
|
-
// Bare keys are typing/navigation; a modifier is what makes a shortcut.
|
|
132
|
-
if (!ctrl && !meta)
|
|
133
|
-
return undefined;
|
|
134
|
-
// Escape combos are refused outright: the input layer sets key.meta = true
|
|
135
|
-
// for EVERY Escape (ink/events/input-event.ts — `keypress.meta ||
|
|
136
|
-
// keypress.name === 'escape' || keypress.option`), so an alt+escape combo
|
|
137
|
-
// would match every bare Esc press and shadow clear-input / the double-Esc
|
|
138
|
-
// rewind. Esc is fully owned by the TUI; there is no unambiguous way to
|
|
139
|
-
// bind it.
|
|
140
|
-
if (named === 'escape')
|
|
141
|
-
return undefined;
|
|
142
|
-
return { raw: parts.join('+'), ctrl, meta, shift, ...(named === undefined ? {} : { named }), ...(char === undefined ? {} : { char }) };
|
|
143
|
-
}
|
|
144
|
-
/** Canonical form for dedupe/reserved checks: modifiers sorted, key last. */
|
|
145
|
-
function comboKey(combo) {
|
|
146
|
-
const mods = [combo.ctrl ? 'ctrl' : '', combo.meta ? 'alt' : '', combo.shift ? 'shift' : '']
|
|
147
|
-
.filter(part => part !== '')
|
|
148
|
-
.sort();
|
|
149
|
-
return [...mods, combo.named === undefined ? (combo.char ?? '') : String(combo.named)].join('+');
|
|
150
|
-
}
|
|
151
|
-
/** Reserved lookup accepts user-spelled combos too (`ctrl+c`). */
|
|
152
|
-
function reservedKey(raw) {
|
|
153
|
-
const combo = parseShortcutCombo(raw);
|
|
154
|
-
return combo === undefined ? raw.toLowerCase() : comboKey(combo);
|
|
155
|
-
}
|
|
156
|
-
const RESERVED_CANONICAL = new Set([...RESERVED_COMBOS].map(reservedKey));
|
|
157
|
-
/** Match a keypress against a parsed combo. `input` is ink's input string
|
|
158
|
-
* (already the resolved character; ctrl+space arrives as ' '). */
|
|
159
|
-
export function matchShortcut(combo, input, key) {
|
|
160
|
-
if (Boolean(key.ctrl) !== combo.ctrl)
|
|
161
|
-
return false;
|
|
162
|
-
// ink reports Alt as meta; Esc itself also sets meta, which is why the
|
|
163
|
-
// modifier check runs against the combo, not a bare flag read.
|
|
164
|
-
if (Boolean(key.meta) !== combo.meta)
|
|
165
|
-
return false;
|
|
166
|
-
if (key.super)
|
|
167
|
-
return false;
|
|
168
|
-
// Shift must match for NAMED keys exactly as for characters — otherwise a
|
|
169
|
-
// registered ctrl+shift+enter would also match a plain ctrl+enter press,
|
|
170
|
-
// letting a plugin shadow the editor's built-in Ctrl+Enter delivery.
|
|
171
|
-
if (Boolean(key.shift) !== combo.shift)
|
|
172
|
-
return false;
|
|
173
|
-
if (combo.named !== undefined) {
|
|
174
|
-
return key[combo.named] === true;
|
|
175
|
-
}
|
|
176
|
-
if (combo.char === undefined)
|
|
177
|
-
return false;
|
|
178
|
-
// Shift+letter arrives as the uppercase character; compare case-folded
|
|
179
|
-
// (the shift FLAG equality above already pinned the modifier state).
|
|
180
|
-
return input.toLowerCase() === combo.char;
|
|
181
|
-
}
|
|
39
|
+
const FIXED_RESERVED_CANONICAL = fixedReservedCombos();
|
|
182
40
|
/** `ctx.tuiShortcuts` — plugin keyboard shortcut registry. */
|
|
183
41
|
export class TuiShortcutRuntime extends Service {
|
|
184
42
|
constructor(ctx) {
|
|
@@ -245,13 +103,18 @@ export class TuiShortcutRuntime extends Service {
|
|
|
245
103
|
this.ctx.logger.warn('dsh-tui: tuiShortcuts.register rejected an invalid combo — need ctrl/alt plus one key (e.g. "ctrl+shift+p")');
|
|
246
104
|
return () => { };
|
|
247
105
|
}
|
|
248
|
-
const key =
|
|
249
|
-
// Built-ins match a modifier subset (see
|
|
250
|
-
// SHIFTLESS form is reserved collides with the built-in on
|
|
251
|
-
// don't report Shift distinctly, so it is refused too.
|
|
252
|
-
// still checked for combos reserved WITH shift
|
|
253
|
-
|
|
254
|
-
|
|
106
|
+
const key = canonicalCombo(parsed);
|
|
107
|
+
// Built-ins match a modifier subset (see FIXED_RESERVED_COMBOS): a combo
|
|
108
|
+
// whose SHIFTLESS form is reserved collides with the built-in on
|
|
109
|
+
// terminals that don't report Shift distinctly, so it is refused too.
|
|
110
|
+
// The exact form is still checked for combos reserved WITH shift
|
|
111
|
+
// (ctrl+shift+return). The customizable action combos join the check
|
|
112
|
+
// dynamically, so a user remap (paste → alt+v) reserves the new combo
|
|
113
|
+
// from the moment the settings layer applies it.
|
|
114
|
+
const shiftlessKey = canonicalCombo({ ...parsed, shift: false });
|
|
115
|
+
const actionReserved = reservedActionCombos();
|
|
116
|
+
if (FIXED_RESERVED_CANONICAL.has(key) || FIXED_RESERVED_CANONICAL.has(shiftlessKey) ||
|
|
117
|
+
actionReserved.has(key) || actionReserved.has(shiftlessKey)) {
|
|
255
118
|
this.ctx.logger.warn(`dsh-tui: tuiShortcuts.register rejected "${parsed.raw}" — reserved by a built-in binding`);
|
|
256
119
|
return () => { };
|
|
257
120
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* upstream coupling in one tree (src/dsh-adapter/) so an upstream rc bump
|
|
7
7
|
* breaks exactly one module, never the whole UI.
|
|
8
8
|
*/
|
|
9
|
-
export type { LlmModelInfo } from '@deepseek-ai/dsh-llm';
|
|
9
|
+
export type { LlmModelInfo, LlmProviderInfo } from '@deepseek-ai/dsh-llm';
|
|
10
10
|
export type { Agent, AgentHandle, AgentStatus, CreateAgentOptions, ModelSelectionRef } from '@deepseek-ai/dsh-agent';
|
|
11
11
|
export type { SessionId, SessionEvent, SessionHeader } from '@deepseek-ai/dsh-session';
|
|
12
12
|
export type { CommandRuntime } from '@deepseek-ai/dsh-commands';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACzE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACpH,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACtF,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACtF,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE;;;;GAIG;AACH,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,cAAc,GACf,MAAM,uBAAuB,CAAA"}
|
package/lib/types/herdr.js
CHANGED
|
@@ -33,7 +33,7 @@ export function attachHerdrIntegration(options) {
|
|
|
33
33
|
return Promise.reject(new Error('Herdr command could not be started'));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
let sequence =
|
|
36
|
+
let sequence = Date.now() * 1000;
|
|
37
37
|
let lastConfirmedReport = '';
|
|
38
38
|
let disposed = false;
|
|
39
39
|
let running = false;
|