@deepseek-harness-tui/dsh-tui 0.8.5 → 0.8.7
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 +13 -3
- package/bin/dsh-tui.js +269 -218
- package/cordis.patch.yml +48 -22
- 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/figures.d.ts +7 -0
- package/lib/types/cc/figures.d.ts.map +1 -1
- package/lib/types/cc/figures.js +24 -0
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +47 -14
- package/lib/types/cc/syntaxRuns.d.ts +16 -0
- package/lib/types/cc/syntaxRuns.d.ts.map +1 -0
- package/lib/types/cc/syntaxRuns.js +79 -0
- package/lib/types/cc/syntaxTheme.d.ts +12 -0
- package/lib/types/cc/syntaxTheme.d.ts.map +1 -0
- package/lib/types/cc/syntaxTheme.js +76 -0
- package/lib/types/commands.d.ts +14 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +20 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts +19 -0
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -0
- package/lib/types/components/Chat/SubagentMessage.js +75 -0
- package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
- package/lib/types/components/EffortChargeGlyph.js +70 -0
- package/lib/types/components/EffortInputBorder.d.ts +36 -0
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
- package/lib/types/components/EffortInputBorder.js +73 -0
- package/lib/types/components/EffortTierBadge.d.ts +26 -0
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
- package/lib/types/components/EffortTierBadge.js +97 -0
- package/lib/types/components/HelpMenu.d.ts +8 -1
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +15 -4
- package/lib/types/components/LoadedContextPanel.js +1 -1
- package/lib/types/components/LogoV2.d.ts +3 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +2 -2
- package/lib/types/components/MessageList.d.ts +6 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +22 -13
- package/lib/types/components/ModelPicker.js +2 -2
- package/lib/types/components/PromptInput.d.ts +1 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +83 -18
- package/lib/types/components/SkillsPicker.js +2 -2
- package/lib/types/components/SplitDiffView.d.ts +2 -17
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +9 -162
- package/lib/types/components/StreamingMarkdown.js +1 -1
- package/lib/types/components/SubagentCard.d.ts +9 -0
- package/lib/types/components/SubagentCard.d.ts.map +1 -0
- package/lib/types/components/SubagentCard.js +26 -0
- package/lib/types/components/SubagentDashboard.d.ts +13 -0
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -0
- package/lib/types/components/SubagentDashboard.js +50 -0
- package/lib/types/components/SubagentDetailScene.d.ts +16 -0
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -0
- package/lib/types/components/SubagentDetailScene.js +141 -0
- package/lib/types/components/SyntaxText.d.ts +15 -0
- package/lib/types/components/SyntaxText.d.ts.map +1 -0
- package/lib/types/components/SyntaxText.js +34 -0
- package/lib/types/components/ThinkingToggle.d.ts +3 -10
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +4 -9
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +1 -1
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedBox.js +4 -1
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +12 -6
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +37 -10
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +71 -18
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -6
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +19 -10
- package/lib/types/dsh-adapter/channel.d.ts +58 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +337 -7
- package/lib/types/dsh-adapter/contract.d.ts +27 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +56 -10
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +9 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +38 -0
- package/lib/types/dsh-adapter/shortcuts.js +3 -3
- package/lib/types/dsh-adapter/subagents.d.ts +87 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/subagents.js +204 -0
- package/lib/types/herdr.d.ts +28 -0
- package/lib/types/herdr.d.ts.map +1 -0
- package/lib/types/herdr.js +133 -0
- package/lib/types/i18n.d.ts +215 -31
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +65 -14
- package/lib/types/ink/ink.d.ts +4 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +46 -15
- package/lib/types/minimalMode.d.ts +13 -0
- package/lib/types/minimalMode.d.ts.map +1 -0
- package/lib/types/minimalMode.js +17 -0
- package/lib/types/screens/Chat.d.ts +1 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +95 -45
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +6 -2
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +4 -2
- package/lib/types/theme.d.ts +20 -0
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +77 -23
- package/lib/types/tips.js +3 -3
- package/lib/types/trajectory/effortIgnition.d.ts +66 -0
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
- package/lib/types/trajectory/effortIgnition.js +142 -0
- package/lib/types/update.d.ts +18 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +73 -2
- package/lib/types/utils/execFileNoThrow.d.ts +3 -20
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -1
- package/lib/types/utils/execFileNoThrow.js +53 -32
- package/lib/types/utils/externalEditor.d.ts +12 -11
- package/lib/types/utils/externalEditor.d.ts.map +1 -1
- package/lib/types/utils/externalEditor.js +11 -11
- 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 +64 -58
- 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
package/lib/types/theme.js
CHANGED
|
@@ -58,6 +58,8 @@ const darkTheme = {
|
|
|
58
58
|
autoAccept: rgb('#B3A0D4'), // Soft violet
|
|
59
59
|
bashBorder: rgb('#D194AE'), // Mist rose
|
|
60
60
|
claude: rgb('#7DA1DE'), // Accent Soft — mist brand blue
|
|
61
|
+
toolNameMutate: rgb('#E5C07B'), // soft gold — Edit/Write (warm accent)
|
|
62
|
+
toolNameExec: rgb('#56B6C2'), // mist cyan — Bash/exec tools
|
|
61
63
|
claudeShimmer: rgb('#ABC2EC'), // Border Blue for shimmer effect
|
|
62
64
|
claudeBlue_FOR_SYSTEM_SPINNER: rgb('#7DA1DE'),
|
|
63
65
|
claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#ABC2EC'),
|
|
@@ -93,16 +95,16 @@ const darkTheme = {
|
|
|
93
95
|
toolDotWrite: rgb('#B3A0D4'), // soft violet — edit/write
|
|
94
96
|
toolDotWeb: rgb('#7DA1DE'), // mist blue — web search/fetch
|
|
95
97
|
toolDotTask: rgb('#D194AE'), // mist rose — subagent/jobs
|
|
96
|
-
syntaxKeyword: rgb('#
|
|
97
|
-
syntaxString: rgb('#
|
|
98
|
-
syntaxComment: rgb('#
|
|
99
|
-
syntaxNumber: rgb('#
|
|
100
|
-
syntaxFunction: rgb('#
|
|
101
|
-
syntaxType: rgb('#
|
|
98
|
+
syntaxKeyword: rgb('#78A0D6'), // muted anchor blue
|
|
99
|
+
syntaxString: rgb('#79AD91'), // mist green, distinct without neon saturation
|
|
100
|
+
syntaxComment: rgb('#74808D'), // neutral blue-grey
|
|
101
|
+
syntaxNumber: rgb('#C89B70'), // softened warm amber
|
|
102
|
+
syntaxFunction: rgb('#6FAEB5'), // muted cyan
|
|
103
|
+
syntaxType: rgb('#A98FBF'), // softened violet
|
|
102
104
|
syntaxVariable: rgb('#C9D1D9'), // near-text
|
|
103
105
|
syntaxOperator: rgb('#93A1B0'), // blue grey
|
|
104
106
|
syntaxPunctuation: rgb('#7A8694'), // dim blue grey
|
|
105
|
-
syntaxConstant: rgb('#
|
|
107
|
+
syntaxConstant: rgb('#C98291'), // softened rose
|
|
106
108
|
red_FOR_SUBAGENTS_ONLY: rgb('#D4685E'),
|
|
107
109
|
blue_FOR_SUBAGENTS_ONLY: rgb('#7496D6'),
|
|
108
110
|
green_FOR_SUBAGENTS_ONLY: rgb('#66B285'),
|
|
@@ -115,8 +117,8 @@ const darkTheme = {
|
|
|
115
117
|
chromeYellow: rgb('#D8B270'),
|
|
116
118
|
clawd_body: rgb('#D98A63'), // Warm mascot orange
|
|
117
119
|
clawd_background: rgb('#000000'),
|
|
118
|
-
userMessageBackground:
|
|
119
|
-
userMessageBackgroundHover: rgb('#
|
|
120
|
+
userMessageBackground: '', // user turn: no fill, gold bold text only (Kimi style)
|
|
121
|
+
userMessageBackgroundHover: rgb('#3B5BDB'), // hover/expand: blue block with gold text
|
|
120
122
|
messageActionsBackground: rgb('#2E333D'),
|
|
121
123
|
selectionBg: rgb('#3B4A66'), // Mist-blue tint on dark
|
|
122
124
|
bashMessageBackgroundColor: rgb('#2C3038'),
|
|
@@ -125,7 +127,7 @@ const darkTheme = {
|
|
|
125
127
|
rate_limit_empty: rgb('#3C414B'),
|
|
126
128
|
fastMode: rgb('#E09A58'),
|
|
127
129
|
fastModeShimmer: rgb('#EAB478'),
|
|
128
|
-
briefLabelYou: rgb('#
|
|
130
|
+
briefLabelYou: rgb('#FFDF80'),
|
|
129
131
|
briefLabelClaude: rgb('#7DA1DE'),
|
|
130
132
|
rainbow_red: rgb('#D98F8A'),
|
|
131
133
|
rainbow_orange: rgb('#D9A97E'),
|
|
@@ -141,6 +143,14 @@ const darkTheme = {
|
|
|
141
143
|
rainbow_blue_shimmer: rgb('#AFBFE2'),
|
|
142
144
|
rainbow_indigo_shimmer: rgb('#BFB4DE'),
|
|
143
145
|
rainbow_violet_shimmer: rgb('#D1B4D1'),
|
|
146
|
+
subagentBullet: rgb('#D194AE'),
|
|
147
|
+
subagentDescription: rgb('#E8E6E0'),
|
|
148
|
+
subagentModel: rgb('#8D95A6'),
|
|
149
|
+
subagentElapsed: rgb('#8D95A6'),
|
|
150
|
+
subagentToolName: rgb('#7DA1DE'),
|
|
151
|
+
subagentStatusRunning: rgb('#7DA1DE'),
|
|
152
|
+
subagentStatusCompleted: rgb('#82B89D'),
|
|
153
|
+
subagentStatusFailed: rgb('#DA8A93'),
|
|
144
154
|
};
|
|
145
155
|
/**
|
|
146
156
|
* Gentle Mist Blue light theme — the strict original card. Blue carries
|
|
@@ -152,6 +162,8 @@ const lightTheme = {
|
|
|
152
162
|
autoAccept: rgb('#9B86B8'), // Muted violet (from surface-alt pink-mist)
|
|
153
163
|
bashBorder: rgb('#C07A93'), // Muted rose (from surface-alt pink-mist)
|
|
154
164
|
claude: rgb('#3F6CC4'), // Primary Blue — brand
|
|
165
|
+
toolNameMutate: rgb('#8A6A00'), // deep gold - Edit/Write (warm accent)
|
|
166
|
+
toolNameExec: rgb('#0F7A8A'), // deep cyan - Bash/exec tools
|
|
155
167
|
claudeShimmer: rgb('#5E88CC'), // Accent Blue for shimmer effect
|
|
156
168
|
claudeBlue_FOR_SYSTEM_SPINNER: rgb('#3F6CC4'),
|
|
157
169
|
claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#5E88CC'),
|
|
@@ -187,16 +199,16 @@ const lightTheme = {
|
|
|
187
199
|
toolDotWrite: rgb('#7A5CA8'),
|
|
188
200
|
toolDotWeb: rgb('#4A63A8'),
|
|
189
201
|
toolDotTask: rgb('#B04A5A'),
|
|
190
|
-
syntaxKeyword: rgb('#
|
|
191
|
-
syntaxString: rgb('#
|
|
192
|
-
syntaxComment: rgb('#
|
|
193
|
-
syntaxNumber: rgb('#
|
|
194
|
-
syntaxFunction: rgb('#
|
|
195
|
-
syntaxType: rgb('#
|
|
202
|
+
syntaxKeyword: rgb('#3F68B5'), // clear primary blue without neon saturation
|
|
203
|
+
syntaxString: rgb('#3F805F'), // readable muted green
|
|
204
|
+
syntaxComment: rgb('#7D858F'), // neutral blue-grey
|
|
205
|
+
syntaxNumber: rgb('#A7652B'), // warm amber accent
|
|
206
|
+
syntaxFunction: rgb('#2E7E8A'), // muted cyan
|
|
207
|
+
syntaxType: rgb('#7E55A4'), // softened violet
|
|
196
208
|
syntaxVariable: rgb('#343945'),
|
|
197
209
|
syntaxOperator: rgb('#5B6672'),
|
|
198
210
|
syntaxPunctuation: rgb('#9AA0A8'),
|
|
199
|
-
syntaxConstant: rgb('#
|
|
211
|
+
syntaxConstant: rgb('#A84472'), // muted rose accent
|
|
200
212
|
red_FOR_SUBAGENTS_ONLY: rgb('#BE5A52'),
|
|
201
213
|
blue_FOR_SUBAGENTS_ONLY: rgb('#3F6CC4'),
|
|
202
214
|
green_FOR_SUBAGENTS_ONLY: rgb('#4E9675'),
|
|
@@ -209,8 +221,8 @@ const lightTheme = {
|
|
|
209
221
|
chromeYellow: rgb('#C99A3F'),
|
|
210
222
|
clawd_body: rgb('#D98A63'), // Warm mascot orange
|
|
211
223
|
clawd_background: rgb('#F6F3ED'),
|
|
212
|
-
userMessageBackground:
|
|
213
|
-
userMessageBackgroundHover: rgb('#
|
|
224
|
+
userMessageBackground: '', // user turn: no fill in light mode, gold text only
|
|
225
|
+
userMessageBackgroundHover: rgb('#DCE4FB'), // subtle blue tint on hover/expand
|
|
214
226
|
messageActionsBackground: rgb('#E4D9E5'),
|
|
215
227
|
selectionBg: rgb('#D5DEF2'), // Mist-blue tint on warm white
|
|
216
228
|
bashMessageBackgroundColor: rgb('#EAE1D3'),
|
|
@@ -219,7 +231,7 @@ const lightTheme = {
|
|
|
219
231
|
rate_limit_empty: rgb('#DDD5C7'),
|
|
220
232
|
fastMode: rgb('#D98E4A'),
|
|
221
233
|
fastModeShimmer: rgb('#E2A465'),
|
|
222
|
-
briefLabelYou: rgb('#
|
|
234
|
+
briefLabelYou: rgb('#A67600'),
|
|
223
235
|
briefLabelClaude: rgb('#3F6CC4'),
|
|
224
236
|
rainbow_red: rgb('#D98888'),
|
|
225
237
|
rainbow_orange: rgb('#D9A276'),
|
|
@@ -235,6 +247,14 @@ const lightTheme = {
|
|
|
235
247
|
rainbow_blue_shimmer: rgb('#A9BCE0'),
|
|
236
248
|
rainbow_indigo_shimmer: rgb('#B7AFD8'),
|
|
237
249
|
rainbow_violet_shimmer: rgb('#CFB0CC'),
|
|
250
|
+
subagentBullet: rgb('#C07A93'),
|
|
251
|
+
subagentDescription: rgb('#343945'),
|
|
252
|
+
subagentModel: rgb('#8991A0'),
|
|
253
|
+
subagentElapsed: rgb('#8991A0'),
|
|
254
|
+
subagentToolName: rgb('#3F6CC4'),
|
|
255
|
+
subagentStatusRunning: rgb('#3F6CC4'),
|
|
256
|
+
subagentStatusCompleted: rgb('#4E9675'),
|
|
257
|
+
subagentStatusFailed: rgb('#C65D6B'),
|
|
238
258
|
};
|
|
239
259
|
/**
|
|
240
260
|
* Dark ANSI theme using only the 16 standard ANSI colors, for terminals
|
|
@@ -248,6 +268,8 @@ const darkAnsiTheme = {
|
|
|
248
268
|
autoAccept: 'ansi:magentaBright',
|
|
249
269
|
bashBorder: 'ansi:magentaBright',
|
|
250
270
|
claude: 'ansi:blueBright',
|
|
271
|
+
toolNameMutate: 'ansi:yellowBright',
|
|
272
|
+
toolNameExec: 'ansi:cyanBright',
|
|
251
273
|
claudeShimmer: 'ansi:blueBright',
|
|
252
274
|
claudeBlue_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
|
|
253
275
|
claudeBlueShimmer_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
|
|
@@ -305,8 +327,8 @@ const darkAnsiTheme = {
|
|
|
305
327
|
chromeYellow: 'ansi:yellowBright',
|
|
306
328
|
clawd_body: 'ansi:redBright',
|
|
307
329
|
clawd_background: 'ansi:black',
|
|
308
|
-
userMessageBackground: '
|
|
309
|
-
userMessageBackgroundHover: 'ansi:
|
|
330
|
+
userMessageBackground: '',
|
|
331
|
+
userMessageBackgroundHover: 'ansi:blue',
|
|
310
332
|
messageActionsBackground: 'ansi:blackBright',
|
|
311
333
|
selectionBg: 'ansi:blue',
|
|
312
334
|
bashMessageBackgroundColor: 'ansi:black',
|
|
@@ -315,7 +337,7 @@ const darkAnsiTheme = {
|
|
|
315
337
|
rate_limit_empty: 'ansi:white',
|
|
316
338
|
fastMode: 'ansi:redBright',
|
|
317
339
|
fastModeShimmer: 'ansi:redBright',
|
|
318
|
-
briefLabelYou: 'ansi:
|
|
340
|
+
briefLabelYou: 'ansi:yellowBright',
|
|
319
341
|
briefLabelClaude: 'ansi:blueBright',
|
|
320
342
|
rainbow_red: 'ansi:red',
|
|
321
343
|
rainbow_orange: 'ansi:redBright',
|
|
@@ -331,6 +353,14 @@ const darkAnsiTheme = {
|
|
|
331
353
|
rainbow_blue_shimmer: 'ansi:cyanBright',
|
|
332
354
|
rainbow_indigo_shimmer: 'ansi:blueBright',
|
|
333
355
|
rainbow_violet_shimmer: 'ansi:magentaBright',
|
|
356
|
+
subagentBullet: 'ansi:magentaBright',
|
|
357
|
+
subagentDescription: 'ansi:whiteBright',
|
|
358
|
+
subagentModel: 'ansi:white',
|
|
359
|
+
subagentElapsed: 'ansi:white',
|
|
360
|
+
subagentToolName: 'ansi:cyanBright',
|
|
361
|
+
subagentStatusRunning: 'ansi:blueBright',
|
|
362
|
+
subagentStatusCompleted: 'ansi:greenBright',
|
|
363
|
+
subagentStatusFailed: 'ansi:redBright',
|
|
334
364
|
};
|
|
335
365
|
/**
|
|
336
366
|
* Resolve a theme name to its concrete color palette.
|
|
@@ -363,6 +393,30 @@ export function getTheme(themeName) {
|
|
|
363
393
|
* (markdown inline code) resolves user themes through getActiveTheme().
|
|
364
394
|
*/
|
|
365
395
|
let customThemeResolver;
|
|
396
|
+
/**
|
|
397
|
+
* Whether the active theme's RESOLVED palette renders on a light background.
|
|
398
|
+
* Keyed off the resolved palette's IDENTITY for the built-ins (auto resolves
|
|
399
|
+
* to the shared light/dark instance, so this covers auto-with-light-terminal
|
|
400
|
+
* that theme-NAME comparisons miss) and off the ink-text luminance for
|
|
401
|
+
* custom themes (light palettes pair with dark ink). The palette's
|
|
402
|
+
* `background` field is a badge fill, not the terminal background — never a
|
|
403
|
+
* lightness signal. Colour-pair variants (effort ignition hues) consume this.
|
|
404
|
+
*/
|
|
405
|
+
export function isLightThemeActive(themeName) {
|
|
406
|
+
const theme = getTheme(themeName);
|
|
407
|
+
if (theme === lightTheme)
|
|
408
|
+
return true;
|
|
409
|
+
if (theme === darkTheme || theme === darkAnsiTheme)
|
|
410
|
+
return false;
|
|
411
|
+
// 自定义主题:按文本墨色亮度判定——浅底配深墨(ink)、深底配亮墨。
|
|
412
|
+
// 调色板的 background 字段是徽标填充色而非终端背景,不能作判据。
|
|
413
|
+
const ink = theme.text;
|
|
414
|
+
const rgb = /^rgb\((\d+),(\d+),(\d+)\)$/.exec(ink);
|
|
415
|
+
if (rgb === null)
|
|
416
|
+
return false;
|
|
417
|
+
const [r, g, b] = [Number(rgb[1]), Number(rgb[2]), Number(rgb[3])];
|
|
418
|
+
return 0.299 * r + 0.587 * g + 0.114 * b < 140;
|
|
419
|
+
}
|
|
366
420
|
/**
|
|
367
421
|
* Register the custom-theme resolver. Called once by ThemeProvider; the
|
|
368
422
|
* resolver must return `undefined` for names it does not know so getTheme
|
package/lib/types/tips.js
CHANGED
|
@@ -60,10 +60,10 @@ export const TIPS = [
|
|
|
60
60
|
en: 'In trajectory, / queries fields like tool:, err:, >10s, tok>1k',
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
id: 'keys-ctrl-
|
|
63
|
+
id: 'keys-ctrl-g',
|
|
64
64
|
group: 'keys',
|
|
65
|
-
zh: 'Ctrl+
|
|
66
|
-
en: 'Ctrl+
|
|
65
|
+
zh: 'Ctrl+G 用 $VISUAL/$EDITOR 编辑器编辑当前输入',
|
|
66
|
+
en: 'Ctrl+G edits your input in the $VISUAL/$EDITOR editor',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
id: 'keys-ctrl-enter',
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** 三幕时间轴(ms):扫光全长、字样启动(波至中段)、字样渐亮、渐隐起止。边框扫光与输入行字样徽标共用。 */
|
|
2
|
+
export declare const IGNITION_TIMELINE: {
|
|
3
|
+
readonly sweepMs: 1000;
|
|
4
|
+
readonly labelStartMs: 600;
|
|
5
|
+
readonly labelBrightenMs: 160;
|
|
6
|
+
readonly fadeStartMs: 1500;
|
|
7
|
+
readonly fadeEndMs: 2000;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Effort ignition motion math — pure functions, zero dependencies.
|
|
11
|
+
*
|
|
12
|
+
* Waveform semantics ported from Codex CLI's effort_ignition(_styles).rs
|
|
13
|
+
* (openai/codex PR #34365) and revalidated in a dsh-TUI integration: a
|
|
14
|
+
* cosine-bell travelling wave produces per-column colours only — a renderer
|
|
15
|
+
* that keeps glyphs constant and changes colours per frame stays SGR-only
|
|
16
|
+
* by construction.
|
|
17
|
+
*
|
|
18
|
+
* Consumers ride the FOREGROUND channel (a constant block glyph under a
|
|
19
|
+
* varying fg colour): pure-background cells never reached the terminal in
|
|
20
|
+
* the fullscreen log-update pipeline, while foreground is the channel every
|
|
21
|
+
* live element already rides.
|
|
22
|
+
*/
|
|
23
|
+
import type { RGBColor } from '../components/Spinner/spinnerUtils.js';
|
|
24
|
+
/** 扫光全长(ms),仅用于把墙钟时间折算成动画秒数,不创建任何定时器。 */
|
|
25
|
+
export declare const SWEEP_TOTAL_MS = 1000;
|
|
26
|
+
export declare function ignitionHues(onLight: boolean): readonly [RGBColor, RGBColor, RGBColor];
|
|
27
|
+
/**
|
|
28
|
+
* 充能色对(前缀强调用):从带底色调暗端到全值,与波共用 hues[0]。
|
|
29
|
+
*/
|
|
30
|
+
export declare function accentRamp(onLight: boolean): {
|
|
31
|
+
dim: RGBColor;
|
|
32
|
+
full: RGBColor;
|
|
33
|
+
};
|
|
34
|
+
/** 余弦钟形:`crest(0)=1`、`crest(±1)=0`、之外为 0(负距离同样静默——
|
|
35
|
+
* 现有调用方都传 `Math.abs`,这里兜底防未来调用方拿到全强度)。 */
|
|
36
|
+
export declare function crest(distance: number): number;
|
|
37
|
+
/** ease-out cubic:`1-(1-p)³`,两端 clamp。 */
|
|
38
|
+
export declare function easeOutCubic(progress: number): number;
|
|
39
|
+
/** ease-in-out cubic:前半 `4p³`、后半镜像,两端 clamp。 */
|
|
40
|
+
export declare function easeInOutCubic(progress: number): number;
|
|
41
|
+
/** 线性混色(t=0 → a,t=1 → b,不 clamp)。 */
|
|
42
|
+
export declare function blend(a: RGBColor, b: RGBColor, t: number): RGBColor;
|
|
43
|
+
/**
|
|
44
|
+
* 扫光某一时刻的整行颜色。
|
|
45
|
+
*
|
|
46
|
+
* @param options.elapsedMs - 距触发的时间;达到 {@link SWEEP_TOTAL_MS}
|
|
47
|
+
* 后整行返回空数组(无波,行恢复本底)。
|
|
48
|
+
* @param options.width - 行列数(终端宽)。
|
|
49
|
+
* @param options.onLight - 浅色主题时用浅底色板与浅带底色。
|
|
50
|
+
* @returns 逐列颜色(`rgb(r,g,b)` 字符串);无波的列为 `undefined`,
|
|
51
|
+
* 渲染层应输出本底色,保持行宽恒定。
|
|
52
|
+
*/
|
|
53
|
+
export declare function ignitionLineColors(options: {
|
|
54
|
+
elapsedMs: number;
|
|
55
|
+
width: number;
|
|
56
|
+
onLight: boolean;
|
|
57
|
+
}): ReadonlyArray<string | undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* 顶档切入判定:从「已有档位」变为「另一档位」且新档位是档位表末位
|
|
60
|
+
* 最高档。冷启动恢复偏好、单档表、档位表未知都不触发。
|
|
61
|
+
*/
|
|
62
|
+
export declare function entersTopTier(previous: string | undefined, current: string | undefined, levels: readonly string[] | undefined): boolean;
|
|
63
|
+
/** 充能时长(ms)与充能进度(钳 [0,1],负 elapsed 钳 0)。 */
|
|
64
|
+
export declare const CHARGE_MS = 150;
|
|
65
|
+
export declare function chargeProgress(elapsedMs: number): number;
|
|
66
|
+
//# sourceMappingURL=effortIgnition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effortIgnition.d.ts","sourceRoot":"","sources":["../../../src/trajectory/effortIgnition.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAA;AAEV;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAA;AAGrE,yCAAyC;AACzC,eAAO,MAAM,cAAc,OAAO,CAAA;AA8BlC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAEtF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAG9E;AAED;0CAC0C;AAC1C,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKvD;AAaD,qCAAqC;AACrC,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAMnE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,CA0BpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACpC,OAAO,CAST;AAED,4CAA4C;AAC5C,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxD"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/** 三幕时间轴(ms):扫光全长、字样启动(波至中段)、字样渐亮、渐隐起止。边框扫光与输入行字样徽标共用。 */
|
|
2
|
+
export const IGNITION_TIMELINE = {
|
|
3
|
+
sweepMs: 1000,
|
|
4
|
+
labelStartMs: 600,
|
|
5
|
+
labelBrightenMs: 160,
|
|
6
|
+
fadeStartMs: 1500,
|
|
7
|
+
fadeEndMs: 2000,
|
|
8
|
+
};
|
|
9
|
+
import { rgbString } from './motion.js';
|
|
10
|
+
/** 扫光全长(ms),仅用于把墙钟时间折算成动画秒数,不创建任何定时器。 */
|
|
11
|
+
export const SWEEP_TOTAL_MS = 1000;
|
|
12
|
+
/** 波形宽度参数(列)。 */
|
|
13
|
+
const WAVE_HALF_WIDTH = 14;
|
|
14
|
+
/** 波形参数:`[launch, travel]`(秒)——扫光在何时启动、多久行至右缘。 */
|
|
15
|
+
const BAND = [0.1, 0.75];
|
|
16
|
+
/**
|
|
17
|
+
* 高亮彩色色板:亮蓝/亮青/亮紫三 hue(浅色背景用加深变体——浅底上
|
|
18
|
+
* 亮色没有对比度)。波只点亮 hues[0],前两个 hue 留给未来的多带风格。
|
|
19
|
+
*/
|
|
20
|
+
const HUES_DARK = [
|
|
21
|
+
{ r: 130, g: 185, b: 255 },
|
|
22
|
+
{ r: 140, g: 252, b: 248 },
|
|
23
|
+
{ r: 195, g: 172, b: 255 },
|
|
24
|
+
];
|
|
25
|
+
const HUES_LIGHT = [
|
|
26
|
+
{ r: 30, g: 95, b: 235 },
|
|
27
|
+
{ r: 10, g: 160, b: 200 },
|
|
28
|
+
{ r: 120, g: 80, b: 235 },
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* 带底色(波向终端本底淡入的目标色)。近似值:取主题深/浅背景的典
|
|
32
|
+
* 型值而非逐主题读取——波只存活一秒,色差在低 alpha 下不可辨。
|
|
33
|
+
*/
|
|
34
|
+
const BAND_DARK = { r: 27, g: 30, b: 40 };
|
|
35
|
+
const BAND_LIGHT = { r: 240, g: 240, b: 242 };
|
|
36
|
+
export function ignitionHues(onLight) {
|
|
37
|
+
return onLight ? HUES_LIGHT : HUES_DARK;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 充能色对(前缀强调用):从带底色调暗端到全值,与波共用 hues[0]。
|
|
41
|
+
*/
|
|
42
|
+
export function accentRamp(onLight) {
|
|
43
|
+
const band = onLight ? BAND_LIGHT : BAND_DARK;
|
|
44
|
+
return { dim: blend(band, ignitionHues(onLight)[0], 0.45), full: ignitionHues(onLight)[0] };
|
|
45
|
+
}
|
|
46
|
+
/** 余弦钟形:`crest(0)=1`、`crest(±1)=0`、之外为 0(负距离同样静默——
|
|
47
|
+
* 现有调用方都传 `Math.abs`,这里兜底防未来调用方拿到全强度)。 */
|
|
48
|
+
export function crest(distance) {
|
|
49
|
+
if (distance >= 1 || distance <= -1)
|
|
50
|
+
return 0;
|
|
51
|
+
return 0.5 * (1 + Math.cos(Math.PI * distance));
|
|
52
|
+
}
|
|
53
|
+
/** ease-out cubic:`1-(1-p)³`,两端 clamp。 */
|
|
54
|
+
export function easeOutCubic(progress) {
|
|
55
|
+
const p = Math.min(1, Math.max(0, progress));
|
|
56
|
+
const inverse = 1 - p;
|
|
57
|
+
return 1 - inverse * inverse * inverse;
|
|
58
|
+
}
|
|
59
|
+
/** ease-in-out cubic:前半 `4p³`、后半镜像,两端 clamp。 */
|
|
60
|
+
export function easeInOutCubic(progress) {
|
|
61
|
+
const p = Math.min(1, Math.max(0, progress));
|
|
62
|
+
if (p < 0.5)
|
|
63
|
+
return 4 * p * p * p;
|
|
64
|
+
const inverse = -2 * p + 2;
|
|
65
|
+
return 1 - (inverse * inverse * inverse) / 2;
|
|
66
|
+
}
|
|
67
|
+
/** 单列对波带的采样:三 hue 权重(未归一;单波形只点亮 hue[0])。 */
|
|
68
|
+
function sampleColumn(elapsed, column, width) {
|
|
69
|
+
const weights = [0, 0, 0];
|
|
70
|
+
const [launch, travel] = BAND;
|
|
71
|
+
const progress = (elapsed - launch) / travel;
|
|
72
|
+
if (progress < 0 || progress > 1)
|
|
73
|
+
return weights;
|
|
74
|
+
const center = easeInOutCubic(progress) * (width + 2 * WAVE_HALF_WIDTH) - WAVE_HALF_WIDTH;
|
|
75
|
+
weights[0] = crest(Math.abs(column - center) / WAVE_HALF_WIDTH);
|
|
76
|
+
return weights;
|
|
77
|
+
}
|
|
78
|
+
/** 线性混色(t=0 → a,t=1 → b,不 clamp)。 */
|
|
79
|
+
export function blend(a, b, t) {
|
|
80
|
+
return {
|
|
81
|
+
r: Math.round(a.r + (b.r - a.r) * t),
|
|
82
|
+
g: Math.round(a.g + (b.g - a.g) * t),
|
|
83
|
+
b: Math.round(a.b + (b.b - a.b) * t),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 扫光某一时刻的整行颜色。
|
|
88
|
+
*
|
|
89
|
+
* @param options.elapsedMs - 距触发的时间;达到 {@link SWEEP_TOTAL_MS}
|
|
90
|
+
* 后整行返回空数组(无波,行恢复本底)。
|
|
91
|
+
* @param options.width - 行列数(终端宽)。
|
|
92
|
+
* @param options.onLight - 浅色主题时用浅底色板与浅带底色。
|
|
93
|
+
* @returns 逐列颜色(`rgb(r,g,b)` 字符串);无波的列为 `undefined`,
|
|
94
|
+
* 渲染层应输出本底色,保持行宽恒定。
|
|
95
|
+
*/
|
|
96
|
+
export function ignitionLineColors(options) {
|
|
97
|
+
const { elapsedMs, width, onLight } = options;
|
|
98
|
+
const elapsed = elapsedMs / 1000;
|
|
99
|
+
const total = SWEEP_TOTAL_MS / 1000;
|
|
100
|
+
if (width <= 0 || !Number.isFinite(elapsed) || elapsed <= 0 || elapsed >= total)
|
|
101
|
+
return [];
|
|
102
|
+
const hue = ignitionHues(onLight)[0];
|
|
103
|
+
const band = onLight ? BAND_LIGHT : BAND_DARK;
|
|
104
|
+
const colors = new Array(width);
|
|
105
|
+
for (let column = 0; column < width; column++) {
|
|
106
|
+
const weight = sampleColumn(elapsed, column, width)[0];
|
|
107
|
+
if (weight <= 0.01) {
|
|
108
|
+
colors[column] = undefined;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// 波按强度淡入带底色:alpha=1 是纯 hue,alpha→0 收敛回本底;高亮
|
|
112
|
+
// 度档满强度纯 hue 直出。输出前通道量化到 8 步长——渐变列因此能
|
|
113
|
+
// 合并成长段(渲染层 RLE 段数降一个数量级),8/256 的色差在终端
|
|
114
|
+
// cell 分辨率下不可辨。
|
|
115
|
+
const tinted = blend(band, hue, Math.min(weight, 1));
|
|
116
|
+
colors[column] = rgbString({
|
|
117
|
+
r: Math.round(tinted.r / 8) * 8,
|
|
118
|
+
g: Math.round(tinted.g / 8) * 8,
|
|
119
|
+
b: Math.round(tinted.b / 8) * 8,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return colors;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 顶档切入判定:从「已有档位」变为「另一档位」且新档位是档位表末位
|
|
126
|
+
* 最高档。冷启动恢复偏好、单档表、档位表未知都不触发。
|
|
127
|
+
*/
|
|
128
|
+
export function entersTopTier(previous, current, levels) {
|
|
129
|
+
return (current !== undefined &&
|
|
130
|
+
previous !== undefined &&
|
|
131
|
+
current !== previous &&
|
|
132
|
+
levels !== undefined &&
|
|
133
|
+
levels.length > 1 &&
|
|
134
|
+
current === levels[levels.length - 1]);
|
|
135
|
+
}
|
|
136
|
+
/** 充能时长(ms)与充能进度(钳 [0,1],负 elapsed 钳 0)。 */
|
|
137
|
+
export const CHARGE_MS = 150;
|
|
138
|
+
export function chargeProgress(elapsedMs) {
|
|
139
|
+
if (!Number.isFinite(elapsedMs))
|
|
140
|
+
return 0;
|
|
141
|
+
return Math.min(1, Math.max(0, Math.max(0, elapsedMs) / CHARGE_MS));
|
|
142
|
+
}
|
package/lib/types/update.d.ts
CHANGED
|
@@ -88,6 +88,24 @@ export declare function tuiUpdatePluginArgs(profile: string, targetVersion?: str
|
|
|
88
88
|
* token, so matching both keeps the retry from masking real failures.
|
|
89
89
|
*/
|
|
90
90
|
export declare function isTransientUpdateFailure(stderr: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Best-effort migrate the GLOBAL launcher to the delegating shim (0.8.7):
|
|
93
|
+
* after a successful profile update, copy this package's `bin/dsh-tui.js`
|
|
94
|
+
* and `package.json` over the global install so the launcher can never lag
|
|
95
|
+
* the profile again — the shim delegates all logic to the profile copy it
|
|
96
|
+
* just updated. Single-file-safe by contract: the new bin imports nothing
|
|
97
|
+
* from lib/ (see its header), so overwriting it inside an older global
|
|
98
|
+
* install cannot dangle a missing helper.
|
|
99
|
+
*
|
|
100
|
+
* Locating the global dir relies on argv[1] being the global `dsh-tui.js`
|
|
101
|
+
* (true when booted through the `dsh-tui` command). Source checkouts and
|
|
102
|
+
* direct `dsh --profile` boots resolve nothing — the migration is a silent
|
|
103
|
+
* no-op there. Write failures (permissions, locked files) are equally
|
|
104
|
+
* silent: the launcher-alignment warning remains the fallback diagnosis.
|
|
105
|
+
*
|
|
106
|
+
* @returns true when the global launcher files were replaced.
|
|
107
|
+
*/
|
|
108
|
+
export declare function migrateGlobalLauncher(): boolean;
|
|
91
109
|
/**
|
|
92
110
|
* Update the installed dsh-tui package and restart the same launcher while
|
|
93
111
|
* preserving the active session. The TUI must already be unmounted before
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAIlD,OAAO,EAAE,UAAU,EAAE,CAAA;AAQrB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAEvB,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAiBxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,SAAS,MAAM,EAAiB,GAAG,MAAM,GAAG,SAAS,CAahG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAW5C;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AA4BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,eAAe,CAAC,CAcvE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAG5E;AA6DD,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAIrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAIlD,OAAO,EAAE,UAAU,EAAE,CAAA;AAQrB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAEvB,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAiBxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,SAAS,MAAM,EAAiB,GAAG,MAAM,GAAG,SAAS,CAahG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAW5C;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AA4BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,eAAe,CAAC,CAcvE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAG5E;AA6DD,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAIrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CA2C/C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC,CA+E1B"}
|
package/lib/types/update.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { readFileSync, realpathSync, renameSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
-
import { dirname, join } from 'node:path';
|
|
4
|
+
import { dirname, join, resolve } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { gte, gt, lt, valid } from 'semver';
|
|
7
7
|
import { shellQuote } from './utils/shellQuote.js';
|
|
@@ -225,6 +225,70 @@ export function tuiUpdatePluginArgs(profile, targetVersion) {
|
|
|
225
225
|
export function isTransientUpdateFailure(stderr) {
|
|
226
226
|
return /ENOENT|EPERM|EBUSY/i.test(stderr) && /_tmp_\d+/i.test(stderr);
|
|
227
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Best-effort migrate the GLOBAL launcher to the delegating shim (0.8.7):
|
|
230
|
+
* after a successful profile update, copy this package's `bin/dsh-tui.js`
|
|
231
|
+
* and `package.json` over the global install so the launcher can never lag
|
|
232
|
+
* the profile again — the shim delegates all logic to the profile copy it
|
|
233
|
+
* just updated. Single-file-safe by contract: the new bin imports nothing
|
|
234
|
+
* from lib/ (see its header), so overwriting it inside an older global
|
|
235
|
+
* install cannot dangle a missing helper.
|
|
236
|
+
*
|
|
237
|
+
* Locating the global dir relies on argv[1] being the global `dsh-tui.js`
|
|
238
|
+
* (true when booted through the `dsh-tui` command). Source checkouts and
|
|
239
|
+
* direct `dsh --profile` boots resolve nothing — the migration is a silent
|
|
240
|
+
* no-op there. Write failures (permissions, locked files) are equally
|
|
241
|
+
* silent: the launcher-alignment warning remains the fallback diagnosis.
|
|
242
|
+
*
|
|
243
|
+
* @returns true when the global launcher files were replaced.
|
|
244
|
+
*/
|
|
245
|
+
export function migrateGlobalLauncher() {
|
|
246
|
+
const launcherBin = process.argv[1];
|
|
247
|
+
if (launcherBin === undefined || !launcherBin.endsWith('dsh-tui.js'))
|
|
248
|
+
return false;
|
|
249
|
+
// Walk up from the bin to the containing package; accept it only when it
|
|
250
|
+
// is OUR package and not the profile copy we are running from (junction
|
|
251
|
+
// layouts collapse both onto the same real path — copying onto ourselves
|
|
252
|
+
// would be a no-op at best).
|
|
253
|
+
let dir = dirname(resolve(launcherBin));
|
|
254
|
+
const ownDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
255
|
+
for (let depth = 0; depth < 4; depth++) {
|
|
256
|
+
const manifest = join(dir, 'package.json');
|
|
257
|
+
try {
|
|
258
|
+
const parsed = JSON.parse(readFileSync(manifest, 'utf8'));
|
|
259
|
+
if (parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
260
|
+
&& parsed.name === PACKAGE_NAME) {
|
|
261
|
+
let same = false;
|
|
262
|
+
try {
|
|
263
|
+
same = realpathSync(dir) === realpathSync(ownDir);
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
same = resolve(dir) === resolve(ownDir);
|
|
267
|
+
}
|
|
268
|
+
if (same)
|
|
269
|
+
return false;
|
|
270
|
+
// tmp + rename keeps each file atomic; a crash mid-migration leaves
|
|
271
|
+
// either the old or the new file, never a truncated one.
|
|
272
|
+
const replace = (target, source) => {
|
|
273
|
+
const staged = `${target}.dsh-tui-migrate`;
|
|
274
|
+
writeFileSync(staged, readFileSync(source));
|
|
275
|
+
renameSync(staged, target);
|
|
276
|
+
};
|
|
277
|
+
replace(join(dir, 'bin', 'dsh-tui.js'), join(ownDir, 'bin', 'dsh-tui.js'));
|
|
278
|
+
replace(manifest, join(ownDir, 'package.json'));
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
// Unreadable manifest at this level — keep walking up.
|
|
284
|
+
}
|
|
285
|
+
const parent = dirname(dir);
|
|
286
|
+
if (parent === dir)
|
|
287
|
+
return false;
|
|
288
|
+
dir = parent;
|
|
289
|
+
}
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
228
292
|
/**
|
|
229
293
|
* Update the installed dsh-tui package and restart the same launcher while
|
|
230
294
|
* preserving the active session. The TUI must already be unmounted before
|
|
@@ -297,6 +361,13 @@ export async function updateTuiAndRestart(sessionId, profile, targetVersion) {
|
|
|
297
361
|
return { updateCode: 1, restartCode: 1 };
|
|
298
362
|
}
|
|
299
363
|
}
|
|
364
|
+
// Launcher migration (0.8.7): the freshly installed profile carries the
|
|
365
|
+
// delegating shim — stamp it over the global launcher so this is the LAST
|
|
366
|
+
// time the outer copy can lag. Best-effort; the alignment warning stays as
|
|
367
|
+
// the fallback when the copy is impossible.
|
|
368
|
+
if (migrateGlobalLauncher()) {
|
|
369
|
+
process.stderr.write('dsh-tui: global launcher aligned to the delegating shim (no manual npm i -g needed anymore).\n');
|
|
370
|
+
}
|
|
300
371
|
const restartCode = await runProcess(process.execPath, [...process.execArgv, ...process.argv.slice(1)], {
|
|
301
372
|
env: {
|
|
302
373
|
...process.env,
|
|
@@ -4,31 +4,14 @@ export interface ExecFileNoThrowResult {
|
|
|
4
4
|
stdout: string;
|
|
5
5
|
stderr: string;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* working directory.
|
|
10
|
-
*/
|
|
7
|
+
/** Options for {@link execFileNoThrow}: stdin payload, timeout, and child
|
|
8
|
+
* working directory. */
|
|
11
9
|
export interface ExecFileNoThrowOptions {
|
|
12
|
-
/** Stdin payload (OSC 52 clipboard helpers and tmux load-buffer). */
|
|
13
10
|
input?: string;
|
|
14
|
-
/** Kill the child after this many milliseconds. */
|
|
15
11
|
timeout?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Accepted for call-site compatibility with the original execa-based
|
|
18
|
-
* implementation; `false` (the only value the Ink core passes) matches this
|
|
19
|
-
* shim's behavior of running in the current working directory.
|
|
20
|
-
*/
|
|
21
12
|
useCwd?: boolean;
|
|
22
|
-
/** Working directory for the child; defaults to the parent's cwd. */
|
|
23
13
|
cwd?: string;
|
|
24
14
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Run a command without throwing: resolves with `{ code, stdout, stderr }`
|
|
27
|
-
* even when the process exits non-zero or cannot spawn.
|
|
28
|
-
* @param file - The executable path to spawn.
|
|
29
|
-
* @param args - Command-line arguments; defaults to none.
|
|
30
|
-
* @param options - Spawn options (input, timeout, cwd).
|
|
31
|
-
* @returns The process outcome: exit code, captured stdout, and captured stderr.
|
|
32
|
-
*/
|
|
15
|
+
/** Run a command without throwing; child output is bounded for safety. */
|
|
33
16
|
export declare function execFileNoThrow(file: string, args?: readonly string[], options?: ExecFileNoThrowOptions): Promise<ExecFileNoThrowResult>;
|
|
34
17
|
//# sourceMappingURL=execFileNoThrow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execFileNoThrow.d.ts","sourceRoot":"","sources":["../../../src/utils/execFileNoThrow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execFileNoThrow.d.ts","sourceRoot":"","sources":["../../../src/utils/execFileNoThrow.ts"],"names":[],"mappings":"AAKA,qDAAqD;AACrD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED;wBACwB;AACxB,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AA6BD,0EAA0E;AAC1E,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CA+BhC"}
|