@deepseek-harness-tui/dsh-tui 0.8.5 → 0.8.6

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.
Files changed (175) hide show
  1. package/bin/dsh-tui.js +0 -0
  2. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
  3. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
  4. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
  5. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
  6. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
  7. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
  8. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
  9. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
  10. package/dsh-ecosystem-spec/registry/README.md +14 -14
  11. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
  12. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
  13. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
  14. package/lib/types/cc/figures.d.ts +7 -0
  15. package/lib/types/cc/figures.d.ts.map +1 -1
  16. package/lib/types/cc/figures.js +23 -0
  17. package/lib/types/cc/markdown.d.ts.map +1 -1
  18. package/lib/types/cc/markdown.js +47 -14
  19. package/lib/types/cc/syntaxTheme.d.ts +12 -0
  20. package/lib/types/cc/syntaxTheme.d.ts.map +1 -0
  21. package/lib/types/cc/syntaxTheme.js +76 -0
  22. package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
  23. package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
  24. package/lib/types/components/EffortChargeGlyph.js +70 -0
  25. package/lib/types/components/EffortInputBorder.d.ts +36 -0
  26. package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
  27. package/lib/types/components/EffortInputBorder.js +73 -0
  28. package/lib/types/components/EffortTierBadge.d.ts +26 -0
  29. package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
  30. package/lib/types/components/EffortTierBadge.js +97 -0
  31. package/lib/types/components/LoadedContextPanel.js +1 -1
  32. package/lib/types/components/MessageList.d.ts.map +1 -1
  33. package/lib/types/components/MessageList.js +5 -7
  34. package/lib/types/components/PromptInput.d.ts.map +1 -1
  35. package/lib/types/components/PromptInput.js +8 -3
  36. package/lib/types/components/SplitDiffView.d.ts +1 -4
  37. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  38. package/lib/types/components/SplitDiffView.js +6 -60
  39. package/lib/types/components/StreamingMarkdown.js +1 -1
  40. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
  41. package/lib/types/components/design-system/ThemedBox.js +4 -1
  42. package/lib/types/components/design-system/ThemedText.js +2 -2
  43. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +12 -6
  44. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  45. package/lib/types/components/messages/AssistantThinkingMessage.js +25 -9
  46. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  47. package/lib/types/components/messages/AssistantToolUseMessage.js +35 -18
  48. package/lib/types/components/messages/UserPromptMessage.d.ts +4 -6
  49. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  50. package/lib/types/components/messages/UserPromptMessage.js +5 -9
  51. package/lib/types/dsh-adapter/channel.d.ts +5 -0
  52. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  53. package/lib/types/dsh-adapter/channel.js +43 -0
  54. package/lib/types/screens/Chat.js +1 -2
  55. package/lib/types/theme.d.ts +12 -0
  56. package/lib/types/theme.d.ts.map +1 -1
  57. package/lib/types/theme.js +51 -21
  58. package/lib/types/trajectory/effortIgnition.d.ts +66 -0
  59. package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
  60. package/lib/types/trajectory/effortIgnition.js +142 -0
  61. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
  62. package/node_modules/@dsh-std/command/LICENSE +21 -21
  63. package/node_modules/@dsh-std/command/README.md +26 -26
  64. package/node_modules/@dsh-std/command/README.zh.md +28 -28
  65. package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
  66. package/node_modules/@dsh-std/command/package.json +22 -22
  67. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  68. package/node_modules/@dsh-std/connection/LICENSE +21 -21
  69. package/node_modules/@dsh-std/connection/README.md +42 -42
  70. package/node_modules/@dsh-std/connection/README.zh.md +42 -42
  71. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  72. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  73. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  74. package/node_modules/@dsh-std/connection/package.json +20 -20
  75. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  76. package/node_modules/@dsh-std/core/LICENSE +21 -21
  77. package/node_modules/@dsh-std/core/README.md +13 -13
  78. package/node_modules/@dsh-std/core/README.zh.md +13 -13
  79. package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  80. package/node_modules/@dsh-std/core/package.json +21 -21
  81. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  82. package/node_modules/@dsh-std/manifest/LICENSE +21 -21
  83. package/node_modules/@dsh-std/manifest/README.md +5 -5
  84. package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  85. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  86. package/node_modules/@dsh-std/manifest/package.json +20 -20
  87. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  88. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
  89. package/node_modules/@dsh-std/messages/LICENSE +21 -21
  90. package/node_modules/@dsh-std/messages/README.md +5 -5
  91. package/node_modules/@dsh-std/messages/README.zh.md +7 -7
  92. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
  93. package/node_modules/@dsh-std/messages/package.json +20 -20
  94. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
  95. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  96. package/node_modules/@dsh-std/presentation/LICENSE +21 -21
  97. package/node_modules/@dsh-std/presentation/README.md +27 -27
  98. package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  99. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  100. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  101. package/node_modules/@dsh-std/presentation/package.json +25 -25
  102. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
  103. package/node_modules/@dsh-std/storage/LICENSE +21 -21
  104. package/node_modules/@dsh-std/storage/README.md +5 -5
  105. package/node_modules/@dsh-std/storage/README.zh.md +7 -7
  106. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
  107. package/node_modules/@dsh-std/storage/package.json +20 -20
  108. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
  109. package/package.json +1 -1
  110. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  111. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
  112. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
  113. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
  114. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  115. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  116. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  117. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
  118. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  119. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
  120. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
  121. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
  122. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  123. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
  124. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  125. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
  126. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
  127. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  128. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  129. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
  130. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  131. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  132. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
  133. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
  134. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  135. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  136. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  137. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
  138. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  139. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
  140. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
  141. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
  142. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  143. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
  144. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  145. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
  146. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
  147. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
  148. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  149. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
  150. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  151. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
  152. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
  153. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
  154. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  155. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
  156. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  157. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
  158. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
  159. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
  160. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  161. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  162. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  163. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
  164. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  165. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
  166. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
  167. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
  168. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  169. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
  170. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  171. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
  172. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
  173. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
  174. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  175. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
@@ -1,149 +1,149 @@
1
- {
2
- "profileVersion": "tui-admission/0.15",
3
- "std": {
4
- "repository": "https://github.com/Yan-Zero/dsh-std",
5
- "submodule": "vendor/dsh-std",
6
- "manifestVersion": "0.15"
7
- },
8
- "imports": [
9
- {
10
- "name": "commands",
11
- "coordinates": {
12
- "apiVersion": "commands.dsh/v1alpha1",
13
- "kind": "Command"
14
- },
15
- "package": "@dsh-std/command",
16
- "kind": "capability",
17
- "permissions": [
18
- "commands.invoke"
19
- ]
20
- },
21
- {
22
- "name": "storage.local",
23
- "coordinates": {
24
- "apiVersion": "storage.dsh/v1alpha1",
25
- "kind": "LocalStorage"
26
- },
27
- "package": "@dsh-std/storage",
28
- "kind": "capability",
29
- "permissions": [
30
- "storage.local.read",
31
- "storage.local.write"
32
- ]
33
- },
34
- {
35
- "name": "messages.observe",
36
- "coordinates": {
37
- "apiVersion": "messages.dsh/v1alpha1",
38
- "kind": "MessageObserver"
39
- },
40
- "package": "@dsh-std/messages",
41
- "kind": "event",
42
- "permissions": [
43
- "messages.observe.read"
44
- ],
45
- "eventEnvelope": "@dsh-std/messages/schema/message-observer-envelope-0.15.json"
46
- },
47
- {
48
- "name": "presentation.open-external",
49
- "coordinates": {
50
- "apiVersion": "presentation.dsh/v1alpha1",
51
- "kind": "OpenExternal"
52
- },
53
- "package": "@dsh-std/presentation",
54
- "kind": "capability",
55
- "permissions": []
56
- },
57
- {
58
- "name": "presentation.user-interaction",
59
- "coordinates": {
60
- "apiVersion": "presentation.dsh/v1alpha1",
61
- "kind": "UserInteraction"
62
- },
63
- "package": "@dsh-std/presentation",
64
- "kind": "capability",
65
- "permissions": []
66
- },
67
- {
68
- "name": "presentation.external-redirect",
69
- "coordinates": {
70
- "apiVersion": "presentation.dsh/v1alpha1",
71
- "kind": "ExternalRedirect"
72
- },
73
- "package": "@dsh-std/presentation",
74
- "kind": "capability",
75
- "permissions": []
76
- }
77
- ],
78
- "definitions": [
79
- {
80
- "name": "tui.decision-events",
81
- "authority": "dsh-tui",
82
- "coordinates": {
83
- "apiVersion": "tui.dsh/v1alpha1",
84
- "kind": "DecisionEvents"
85
- },
86
- "kind": "capability",
87
- "profile": "registry/contracts/decision-events-v1alpha1.json",
88
- "profileHash": "sha256:56440dde1b00c210b22761a0cba139ce0a20207330567777cebe1e48b494ceb0",
89
- "permissions": [
90
- "session.input.intercept",
91
- "session.rewind.intercept",
92
- "session.switch.intercept",
93
- "session.compact.intercept"
94
- ]
95
- },
96
- {
97
- "name": "tui.channel",
98
- "authority": "dsh-tui",
99
- "coordinates": {
100
- "apiVersion": "tui.dsh/v1alpha1",
101
- "kind": "Channel"
102
- },
103
- "kind": "capability",
104
- "profile": "registry/contracts/tui-channel-v1alpha1.json",
105
- "profileHash": "sha256:2d0668656d999a8cacd363cd3c76207f9392118be8a83e6dd5f81b54ae063fe6",
106
- "permissions": []
107
- }
108
- ],
109
- "extensions": [
110
- {
111
- "name": "workspace.provider",
112
- "authority": "dsh-std",
113
- "coordinates": {
114
- "apiVersion": "workspace.dsh/v1alpha1",
115
- "kind": "WorkspaceProvider"
116
- },
117
- "kind": "extension",
118
- "package": "@dsh-std/workspace",
119
- "permissions": []
120
- },
121
- {
122
- "name": "tui.settings-section",
123
- "authority": "dsh-tui",
124
- "coordinates": {
125
- "apiVersion": "tui.dsh/v1alpha1",
126
- "kind": "SettingsSection"
127
- },
128
- "kind": "extension",
129
- "profile": "registry/contracts/settings-section-v1alpha1.json",
130
- "profileHash": "sha256:685b0f17fe489f458e9b799811f61c42b858330584e95ecb97e7216b5be100ac",
131
- "permissions": []
132
- },
133
- {
134
- "name": "tui.scene",
135
- "authority": "dsh-tui",
136
- "coordinates": {
137
- "apiVersion": "tui.dsh/v1alpha1",
138
- "kind": "Scene"
139
- },
140
- "kind": "extension",
141
- "profile": "registry/contracts/scene-v1alpha1.json",
142
- "profileHash": "sha256:69ce3ae26d60dea2ed170376db8a1fb5860c94bd192c62681423c1d848ec2b26",
143
- "permissions": []
144
- }
145
- ],
146
- "facetApiVersions": [
147
- "v1alpha1"
148
- ]
149
- }
1
+ {
2
+ "profileVersion": "tui-admission/0.15",
3
+ "std": {
4
+ "repository": "https://github.com/Yan-Zero/dsh-std",
5
+ "submodule": "vendor/dsh-std",
6
+ "manifestVersion": "0.15"
7
+ },
8
+ "imports": [
9
+ {
10
+ "name": "commands",
11
+ "coordinates": {
12
+ "apiVersion": "commands.dsh/v1alpha1",
13
+ "kind": "Command"
14
+ },
15
+ "package": "@dsh-std/command",
16
+ "kind": "capability",
17
+ "permissions": [
18
+ "commands.invoke"
19
+ ]
20
+ },
21
+ {
22
+ "name": "storage.local",
23
+ "coordinates": {
24
+ "apiVersion": "storage.dsh/v1alpha1",
25
+ "kind": "LocalStorage"
26
+ },
27
+ "package": "@dsh-std/storage",
28
+ "kind": "capability",
29
+ "permissions": [
30
+ "storage.local.read",
31
+ "storage.local.write"
32
+ ]
33
+ },
34
+ {
35
+ "name": "messages.observe",
36
+ "coordinates": {
37
+ "apiVersion": "messages.dsh/v1alpha1",
38
+ "kind": "MessageObserver"
39
+ },
40
+ "package": "@dsh-std/messages",
41
+ "kind": "event",
42
+ "permissions": [
43
+ "messages.observe.read"
44
+ ],
45
+ "eventEnvelope": "@dsh-std/messages/schema/message-observer-envelope-0.15.json"
46
+ },
47
+ {
48
+ "name": "presentation.open-external",
49
+ "coordinates": {
50
+ "apiVersion": "presentation.dsh/v1alpha1",
51
+ "kind": "OpenExternal"
52
+ },
53
+ "package": "@dsh-std/presentation",
54
+ "kind": "capability",
55
+ "permissions": []
56
+ },
57
+ {
58
+ "name": "presentation.user-interaction",
59
+ "coordinates": {
60
+ "apiVersion": "presentation.dsh/v1alpha1",
61
+ "kind": "UserInteraction"
62
+ },
63
+ "package": "@dsh-std/presentation",
64
+ "kind": "capability",
65
+ "permissions": []
66
+ },
67
+ {
68
+ "name": "presentation.external-redirect",
69
+ "coordinates": {
70
+ "apiVersion": "presentation.dsh/v1alpha1",
71
+ "kind": "ExternalRedirect"
72
+ },
73
+ "package": "@dsh-std/presentation",
74
+ "kind": "capability",
75
+ "permissions": []
76
+ }
77
+ ],
78
+ "definitions": [
79
+ {
80
+ "name": "tui.decision-events",
81
+ "authority": "dsh-tui",
82
+ "coordinates": {
83
+ "apiVersion": "tui.dsh/v1alpha1",
84
+ "kind": "DecisionEvents"
85
+ },
86
+ "kind": "capability",
87
+ "profile": "registry/contracts/decision-events-v1alpha1.json",
88
+ "profileHash": "sha256:56440dde1b00c210b22761a0cba139ce0a20207330567777cebe1e48b494ceb0",
89
+ "permissions": [
90
+ "session.input.intercept",
91
+ "session.rewind.intercept",
92
+ "session.switch.intercept",
93
+ "session.compact.intercept"
94
+ ]
95
+ },
96
+ {
97
+ "name": "tui.channel",
98
+ "authority": "dsh-tui",
99
+ "coordinates": {
100
+ "apiVersion": "tui.dsh/v1alpha1",
101
+ "kind": "Channel"
102
+ },
103
+ "kind": "capability",
104
+ "profile": "registry/contracts/tui-channel-v1alpha1.json",
105
+ "profileHash": "sha256:2d0668656d999a8cacd363cd3c76207f9392118be8a83e6dd5f81b54ae063fe6",
106
+ "permissions": []
107
+ }
108
+ ],
109
+ "extensions": [
110
+ {
111
+ "name": "workspace.provider",
112
+ "authority": "dsh-std",
113
+ "coordinates": {
114
+ "apiVersion": "workspace.dsh/v1alpha1",
115
+ "kind": "WorkspaceProvider"
116
+ },
117
+ "kind": "extension",
118
+ "package": "@dsh-std/workspace",
119
+ "permissions": []
120
+ },
121
+ {
122
+ "name": "tui.settings-section",
123
+ "authority": "dsh-tui",
124
+ "coordinates": {
125
+ "apiVersion": "tui.dsh/v1alpha1",
126
+ "kind": "SettingsSection"
127
+ },
128
+ "kind": "extension",
129
+ "profile": "registry/contracts/settings-section-v1alpha1.json",
130
+ "profileHash": "sha256:685b0f17fe489f458e9b799811f61c42b858330584e95ecb97e7216b5be100ac",
131
+ "permissions": []
132
+ },
133
+ {
134
+ "name": "tui.scene",
135
+ "authority": "dsh-tui",
136
+ "coordinates": {
137
+ "apiVersion": "tui.dsh/v1alpha1",
138
+ "kind": "Scene"
139
+ },
140
+ "kind": "extension",
141
+ "profile": "registry/contracts/scene-v1alpha1.json",
142
+ "profileHash": "sha256:69ce3ae26d60dea2ed170376db8a1fb5860c94bd192c62681423c1d848ec2b26",
143
+ "permissions": []
144
+ }
145
+ ],
146
+ "facetApiVersions": [
147
+ "v1alpha1"
148
+ ]
149
+ }
@@ -67,4 +67,11 @@ export declare const BRIDGE_SPINNER_FRAMES: string[];
67
67
  export declare const BRIDGE_READY_INDICATOR = "\u00B7\u2714\uFE0E\u00B7";
68
68
  /** Bridge failed indicator (`×`). */
69
69
  export declare const BRIDGE_FAILED_INDICATOR = "\u00D7";
70
+ export declare const THINKING_SPINNER_FRAMES: string[];
71
+ export declare const THINKING_SPINNER_INTERVAL_MS = 80;
72
+ /** Thinking settled marker: anchor (`⚓`) — the static end-state glyph after
73
+ * the reasoning block stops streaming. U+2693 is Emoji_Presentation in
74
+ * ink/stringWidth, so it measures 2 columns; the braille spinner frames
75
+ * above are padded to the same width to keep the label stationary. */
76
+ export declare const THINKING_SETTLED_MARKER = "\u2693";
70
77
  //# sourceMappingURL=figures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../../../src/cc/figures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,eAAO,MAAM,YAAY,QAA4C,CAAA;AAGrE,kDAAkD;AAClD,eAAO,MAAM,OAAO,WAAW,CAAA;AAC/B,+BAA+B;AAC/B,eAAO,MAAM,IAAI,WAAW,CAAA;AAC5B,gDAAgD;AAChD,eAAO,MAAM,eAAe,WAAW,CAAA;AACvC,qEAAqE;AACrE,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,WAAW,CAAA;AACxC,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,iDAAiD;AACjD,eAAO,MAAM,cAAc,WAAW,CAAA;AAGtC,sBAAsB;AACtB,eAAO,MAAM,QAAQ,WAAW,CAAA;AAChC,wBAAwB;AACxB,eAAO,MAAM,UAAU,WAAW,CAAA;AAClC,2CAA2C;AAC3C,eAAO,MAAM,aAAa,WAAW,CAAA;AACrC,qDAAqD;AACrD,eAAO,MAAM,cAAc,WAAW,CAAA;AAGtC,qCAAqC;AACrC,eAAO,MAAM,UAAU,WAAW,CAAA;AAClC,+CAA+C;AAC/C,eAAO,MAAM,aAAa,WAAW,CAAA;AACrC,wCAAwC;AACxC,eAAO,MAAM,WAAW,WAAW,CAAA;AACnC,sCAAsC;AACtC,eAAO,MAAM,UAAU,WAAW,CAAA;AAGlC,0BAA0B;AAC1B,eAAO,MAAM,SAAS,WAAW,CAAA;AACjC,2BAA2B;AAC3B,eAAO,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×`). */
82
82
  export const BRIDGE_FAILED_INDICATOR = '\u00d7';
83
+ // Thinking spinner (Kimi Code style braille cycle, shown while reasoning
84
+ // streams; the static anchor takes over once the step settles). Each frame
85
+ // is padded to 2 columns so it matches the settled ⚓ anchor exactly — a
86
+ // 1-col frame would shift the whole label right by one column the moment
87
+ // the step settles.
88
+ export const THINKING_SPINNER_FRAMES = [
89
+ '\u280b ', // ⠋
90
+ '\u2819 ', // ⠙
91
+ '\u2839 ', // ⠹
92
+ '\u2838 ', // ⠸
93
+ '\u283c ', // ⠼
94
+ '\u2834 ', // ⠴
95
+ '\u2826 ', // ⠦
96
+ '\u2827 ', // ⠧
97
+ '\u2807 ', // ⠇
98
+ '\u280f ', // ⠏
99
+ ];
100
+ export const THINKING_SPINNER_INTERVAL_MS = 80;
101
+ /** Thinking settled marker: anchor (`⚓`) — the static end-state glyph after
102
+ * the reasoning block stops streaming. U+2693 is Emoji_Presentation in
103
+ * ink/stringWidth, so it measures 2 columns; the braille spinner frames
104
+ * above are padded to the same width to keep the label stationary. */
105
+ export const THINKING_SETTLED_MARKER = '\u2693'; // ⚓
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/cc/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAA4B,KAAK,KAAK,EAAe,MAAM,QAAQ,CAAA;AAM1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA4BrD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAWtC;AAuCD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,SAAS,SAAI,EACb,iBAAiB,GAAE,MAAM,GAAG,IAAW,EACvC,MAAM,GAAE,KAAK,GAAG,IAAW,EAC3B,SAAS,GAAE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AUR"}
@@ -18,6 +18,7 @@ import { stringWidth } from '../ink/stringWidth.js';
18
18
  import { supportsHyperlinks } from '../ink/supports-hyperlinks.js';
19
19
  import { colorize } from '../ink/colorize.js';
20
20
  import { getActiveTheme } from '../theme.js';
21
+ import { buildSyntaxTheme } from './syntaxTheme.js';
21
22
  import { logForDebugging } from '../utils/debug.js';
22
23
  import { createHyperlink } from './hyperlink.js';
23
24
  // '\n' is used unconditionally — os.EOL is '\r\n' on Windows, and the stray
@@ -112,7 +113,10 @@ export function applyMarkdown(content, highlight = null) {
112
113
  .lexer(stripPromptXMLTags(content))
113
114
  .map(token => dispatch(token, rootState))
114
115
  .join('')
115
- .trim();
116
+ // trimEnd only: the input is already trimmed, so leading whitespace in
117
+ // the output is renderer-intended (e.g. the code block's 2-space indent
118
+ // on its first line). A full trim() would eat that first-line indent.
119
+ .trimEnd();
116
120
  }
117
121
  /**
118
122
  * Type guard that narrows to the concrete marked token of `kind`.
@@ -176,19 +180,39 @@ function renderBlockquote(token, state) {
176
180
  .join(EOL);
177
181
  }
178
182
  function renderCodeBlock(token, state) {
179
- if (!state.highlight) {
180
- return token.text + EOL;
181
- }
182
- let language = 'plaintext';
183
- if (token.lang) {
184
- if (state.highlight.supportsLanguage(token.lang)) {
185
- language = token.lang;
183
+ // Kimi Code style: a muted ```lang opening line (language tag + boundary
184
+ // for unhighlighted blocks) + 2-space indent; no closing fence (syntax
185
+ // colors or the indent already mark the end, it only cost vertical space).
186
+ const theme = getActiveTheme();
187
+ const openFence = colorize('```' + (token.lang ?? ''), theme.subtle, 'foreground');
188
+ const indent = ' ';
189
+ const renderBody = () => {
190
+ if (!state.highlight) {
191
+ return token.text;
186
192
  }
187
- else {
188
- logForDebugging(`Language not supported while highlighting code, falling back to plaintext: ${token.lang}`);
193
+ let language = 'plaintext';
194
+ if (token.lang) {
195
+ if (state.highlight.supportsLanguage(token.lang)) {
196
+ language = token.lang;
197
+ }
198
+ else {
199
+ logForDebugging(`Language not supported while highlighting code, falling back to plaintext: ${token.lang}`);
200
+ }
189
201
  }
202
+ return state.highlight.highlight(token.text, { language, theme: buildSyntaxTheme(theme) });
203
+ };
204
+ // Strip ALL trailing newlines: trailing blank lines would otherwise leak a
205
+ // stray blank line at the end of the block.
206
+ const body = renderBody().replace(/\n+$/, '');
207
+ if (body === '') {
208
+ return `${openFence}${EOL}`;
190
209
  }
191
- return state.highlight.highlight(token.text, { language }) + EOL;
210
+ return (openFence +
211
+ EOL +
212
+ body
213
+ .split(EOL)
214
+ .map(line => (line === '' ? line : indent + line))
215
+ .join(EOL) + EOL);
192
216
  }
193
217
  function renderEmphasis(token, state) {
194
218
  const inner = token.tokens.map(child => dispatch(child, inlineChildren(state))).join('');
@@ -200,8 +224,14 @@ function renderStrong(token, state) {
200
224
  }
201
225
  function renderHeading(token, state) {
202
226
  const text = token.tokens.map(child => dispatch(child, fresh(state))).join('');
203
- // H1 gets the full banner treatment; every deeper level shares the bold style.
204
- const styled = token.depth === 1 ? chalk.bold.italic.underline(text) : chalk.bold(text);
227
+ // Blue-primary progression: H1 gets the mist brand blue + underline, H2 the
228
+ // lighter border blue, deeper levels stay bold near-text (kimi-style).
229
+ const theme = getActiveTheme();
230
+ const styled = token.depth === 1
231
+ ? chalk.bold.underline(colorize(text, theme.claude, 'foreground'))
232
+ : token.depth === 2
233
+ ? chalk.bold(colorize(text, theme.permission, 'foreground'))
234
+ : chalk.bold(text);
205
235
  return styled + EOL + EOL;
206
236
  }
207
237
  function renderLink(token, state) {
@@ -251,7 +281,10 @@ function renderText(token, state) {
251
281
  const body = token.tokens
252
282
  ? token.tokens.map(child => dispatch(child, withParent(state, token))).join('')
253
283
  : linkifyIssueReferences(token.text);
254
- return `${bullet} ${body}${EOL}`;
284
+ // Blue bullet marker: list structure gets a tint without loading the
285
+ // whole item (kimi-style `•` in the accent color).
286
+ const tinted = colorize(bullet, getActiveTheme().permission, 'foreground');
287
+ return `${tinted} ${body}${EOL}`;
255
288
  }
256
289
  return linkifyIssueReferences(token.text);
257
290
  }
@@ -0,0 +1,12 @@
1
+ import type { Theme } from '../theme.js';
2
+ /** highlight.js token classes -> theme syntax tokens. `default` catches
3
+ * every unmapped class so cli-highlight's own yellow never leaks through
4
+ * (issue #250, P2-6). */
5
+ export declare const SYNTAX_CLASS_TO_TOKEN: Record<string, string>;
6
+ /** chalk style for one raw theme value. Accepts every form the theme
7
+ * loader documents: #rgb, #rrggbb, #rrggbbaa (alpha stripped), rgb() with
8
+ * or without spaces, ansi256(n), ansi:name (issue #250, P2-5). */
9
+ export declare function chalkFromToken(token: string): (text: string) => string;
10
+ /** Build the cli-highlight `theme` option from an active theme palette. */
11
+ export declare function buildSyntaxTheme(theme: Theme): Record<string, (text: string) => string>;
12
+ //# sourceMappingURL=syntaxTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntaxTheme.d.ts","sourceRoot":"","sources":["../../../src/cc/syntaxTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAQxC;;0BAE0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4BxD,CAAA;AAED;;mEAEmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAmBtE;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,GACX,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAQ1C"}
@@ -0,0 +1,76 @@
1
+ import chalk from 'chalk';
2
+ // --- syntax highlighting theme bridge ----------------------------------------
3
+ // Shared by SplitDiffView (diff panes) and the markdown renderer (fenced
4
+ // code blocks). Both feed cli-highlight's `theme` option so code colors come
5
+ // from the active dsh-tui theme instead of cli-highlight's own sparse
6
+ // default palette.
7
+ /** highlight.js token classes -> theme syntax tokens. `default` catches
8
+ * every unmapped class so cli-highlight's own yellow never leaks through
9
+ * (issue #250, P2-6). */
10
+ export const SYNTAX_CLASS_TO_TOKEN = {
11
+ keyword: 'syntaxKeyword',
12
+ built_in: 'syntaxKeyword',
13
+ literal: 'syntaxKeyword',
14
+ string: 'syntaxString',
15
+ subst: 'syntaxString',
16
+ quote: 'syntaxString',
17
+ comment: 'syntaxComment',
18
+ number: 'syntaxNumber',
19
+ title: 'syntaxFunction',
20
+ 'title.function_': 'syntaxFunction',
21
+ function: 'syntaxFunction',
22
+ 'title.class_': 'syntaxType',
23
+ type: 'syntaxType',
24
+ class: 'syntaxType',
25
+ tag: 'syntaxType',
26
+ name: 'syntaxType',
27
+ attr: 'syntaxVariable',
28
+ attribute: 'syntaxVariable',
29
+ variable: 'syntaxVariable',
30
+ 'template-variable': 'syntaxVariable',
31
+ params: 'syntaxVariable',
32
+ operator: 'syntaxOperator',
33
+ punctuation: 'syntaxPunctuation',
34
+ meta: 'syntaxPunctuation',
35
+ symbol: 'syntaxConstant',
36
+ regexp: 'syntaxConstant',
37
+ default: 'syntaxVariable',
38
+ };
39
+ /** chalk style for one raw theme value. Accepts every form the theme
40
+ * loader documents: #rgb, #rrggbb, #rrggbbaa (alpha stripped), rgb() with
41
+ * or without spaces, ansi256(n), ansi:name (issue #250, P2-5). */
42
+ export function chalkFromToken(token) {
43
+ let match = /^#([0-9a-fA-F]{3})$/.exec(token);
44
+ if (match !== null) {
45
+ const [r, g, b] = match[1].split('').map(c => parseInt(c + c, 16));
46
+ return chalk.rgb(r, g, b);
47
+ }
48
+ match = /^#([0-9a-fA-F]{6})(?:[0-9a-fA-F]{2})?$/.exec(token);
49
+ if (match !== null)
50
+ return chalk.hex(`#${match[1]}`);
51
+ match = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/.exec(token);
52
+ if (match !== null)
53
+ return chalk.rgb(Number(match[1]), Number(match[2]), Number(match[3]));
54
+ match = /^ansi256\((\d+)\)$/.exec(token);
55
+ if (match !== null)
56
+ return chalk.ansi256(Number(match[1]));
57
+ match = /^ansi:(\w+)$/.exec(token);
58
+ if (match !== null) {
59
+ const name = match[1] === 'blackBright' ? 'gray' : match[1];
60
+ const style = chalk[name];
61
+ if (style !== undefined)
62
+ return style;
63
+ }
64
+ return (text) => text;
65
+ }
66
+ /** Build the cli-highlight `theme` option from an active theme palette. */
67
+ export function buildSyntaxTheme(theme) {
68
+ const palette = theme;
69
+ const out = {};
70
+ for (const [tokenClass, tokenKey] of Object.entries(SYNTAX_CLASS_TO_TOKEN)) {
71
+ const value = palette[tokenKey];
72
+ if (value !== undefined)
73
+ out[tokenClass] = chalkFromToken(value);
74
+ }
75
+ return out;
76
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * EffortChargeGlyph — 输入提示前缀 `❯ ` 的最高档强调与充能。
3
+ *
4
+ * 思考强度处于当前路线最高档期间,前缀换为点火强调色(加粗,与点焰波
5
+ * 共用 hues[0]——同一瞬间前缀与波是同一种橙);切到最高档的瞬间做一次
6
+ * 150ms「充能」渐变(accentRamp 的暗端 → 全值)。冷启动已在最高档时
7
+ * 不充能(充能只属于切换瞬间),离开最高档恢复原样的 dim 行为。
8
+ *
9
+ * 触发判定在渲染期做(React 官方的「props 变化即调整 state」模式,
10
+ * 与 EffortInputBorder 同一模式)——放 effect 会晚一帧,effort 变化
11
+ * 的首帧以全亮闪现、下一帧才跌回暗端重来。充能只动颜色,glyph 恒为
12
+ * `❯ `,SGR-only 规则天然成立。
13
+ *
14
+ * 时钟复用 Ink core 共享时钟,且只在充能未满的那 150ms 内订阅;稳态
15
+ * 零定时器、零重渲染,前缀色取记忆化常量。
16
+ */
17
+ import React from 'react';
18
+ export declare function EffortChargeGlyph({ effort, levels, working, }: {
19
+ /** 当前思考强度档 id;`undefined` 表示路线未声明。 */
20
+ effort: string | undefined;
21
+ /** 当前路线的档位表(低→高,末位为最高档)。 */
22
+ levels: readonly string[] | undefined;
23
+ /** 模型工作中时前缀照旧压暗(既有语义)。 */
24
+ working: boolean;
25
+ }): React.ReactNode;
26
+ //# sourceMappingURL=EffortChargeGlyph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EffortChargeGlyph.d.ts","sourceRoot":"","sources":["../../../src/components/EffortChargeGlyph.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAsD,MAAM,OAAO,CAAA;AAW1E,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,MAAM,EACN,OAAO,GACR,EAAE;IACD,sCAAsC;IACtC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,4BAA4B;IAC5B,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IACrC,0BAA0B;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,KAAK,CAAC,SAAS,CAuDlB"}
@@ -0,0 +1,70 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * EffortChargeGlyph — 输入提示前缀 `❯ ` 的最高档强调与充能。
4
+ *
5
+ * 思考强度处于当前路线最高档期间,前缀换为点火强调色(加粗,与点焰波
6
+ * 共用 hues[0]——同一瞬间前缀与波是同一种橙);切到最高档的瞬间做一次
7
+ * 150ms「充能」渐变(accentRamp 的暗端 → 全值)。冷启动已在最高档时
8
+ * 不充能(充能只属于切换瞬间),离开最高档恢复原样的 dim 行为。
9
+ *
10
+ * 触发判定在渲染期做(React 官方的「props 变化即调整 state」模式,
11
+ * 与 EffortInputBorder 同一模式)——放 effect 会晚一帧,effort 变化
12
+ * 的首帧以全亮闪现、下一帧才跌回暗端重来。充能只动颜色,glyph 恒为
13
+ * `❯ `,SGR-only 规则天然成立。
14
+ *
15
+ * 时钟复用 Ink core 共享时钟,且只在充能未满的那 150ms 内订阅;稳态
16
+ * 零定时器、零重渲染,前缀色取记忆化常量。
17
+ */
18
+ import { useContext, useEffect, useReducer, useState } from 'react';
19
+ import { Text, useTheme } from '../ui.js';
20
+ import { ClockContext } from '../ink/components/ClockContext.js';
21
+ import { accentRamp } from '../trajectory/effortIgnition.js';
22
+ import { rgbString } from '../trajectory/motion.js';
23
+ import { interpolateColor } from './Spinner/spinnerUtils.js';
24
+ import { isLightThemeActive } from '../theme.js';
25
+ /** 充能时长(ms)。 */
26
+ const CHARGE_MS = 150;
27
+ export function EffortChargeGlyph({ effort, levels, working, }) {
28
+ const clock = useContext(ClockContext);
29
+ const [themeName] = useTheme();
30
+ const [chargeStartedAt, setChargeStartedAt] = useState(null);
31
+ const [prevEffort, setPrevEffort] = useState(effort);
32
+ const [, forceRender] = useReducer((tick) => tick + 1, 0);
33
+ const topActive = effort !== undefined && levels !== undefined && levels.length > 1 && effort === levels[levels.length - 1];
34
+ // Render-phase trigger (same pattern as EffortInputBorder): switching from
35
+ // an existing tier onto the top tier starts the charge NOW, not one effect
36
+ // later — the first frame of the new effort must not flash fully lit.
37
+ // Cold mounts enter the steady state directly; without a shared clock
38
+ // (headless embeds) there is no charge either — no frames would ever arrive.
39
+ if (effort !== prevEffort) {
40
+ setPrevEffort(effort);
41
+ if (topActive && clock !== null) {
42
+ setChargeStartedAt(clock.now());
43
+ }
44
+ }
45
+ // Only the 150ms charge window subscribes to the shared clock; steady
46
+ // state has zero timers and zero re-renders.
47
+ const chargeElapsed = chargeStartedAt === null
48
+ ? Infinity
49
+ : // Clamp at zero: the shared clock can hand back a stale tickTime for
50
+ // one frame after waking from pause.
51
+ Math.max(0, (clock?.now() ?? Date.now()) - chargeStartedAt);
52
+ const charging = chargeElapsed < CHARGE_MS;
53
+ useEffect(() => {
54
+ if (!charging || clock === null)
55
+ return;
56
+ return clock.subscribe(() => forceRender(), /* keepAlive */ true);
57
+ }, [charging, clock]);
58
+ if (!topActive)
59
+ return _jsx(Text, { dimColor: working, children: "\u276F " });
60
+ const ramp = accentRamp(isLightThemeActive(themeName));
61
+ if (!charging) {
62
+ // Steady state re-derives on every render (two allocations + one blend
63
+ // per keystroke — negligible) instead of caching: a cached colour would
64
+ // go stale across a light/dark theme flip while the tier stays active.
65
+ const color = rgbString(ramp.full);
66
+ return (_jsxs(Text, { bold: true, color: color, dimColor: working, children: ["\u276F", ' '] }));
67
+ }
68
+ const charge = Math.min(1, chargeElapsed / CHARGE_MS);
69
+ return (_jsxs(Text, { bold: true, color: rgbString(interpolateColor(ramp.dim, ramp.full, charge)), dimColor: working, children: ["\u276F", ' '] }));
70
+ }