@agi-fans/dsh-tui 0.18.0 → 0.20.0

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 (227) hide show
  1. package/lib/CHANGELOG.md +115 -1
  2. package/lib/chrome/box.d.ts +2 -0
  3. package/lib/chrome/box.js +6 -12
  4. package/lib/chrome/box.js.map +1 -1
  5. package/lib/chrome/code-highlight.d.ts +26 -18
  6. package/lib/chrome/code-highlight.js +114 -39
  7. package/lib/chrome/code-highlight.js.map +1 -1
  8. package/lib/chrome/diff-render.d.ts +1 -2
  9. package/lib/chrome/diff-render.js +41 -90
  10. package/lib/chrome/diff-render.js.map +1 -1
  11. package/lib/chrome/main-screen-renderer.d.ts +52 -30
  12. package/lib/chrome/main-screen-renderer.js +1730 -79
  13. package/lib/chrome/main-screen-renderer.js.map +1 -1
  14. package/lib/chrome/markdown.js +144 -101
  15. package/lib/chrome/markdown.js.map +1 -1
  16. package/lib/chrome/math.d.ts +4 -0
  17. package/lib/chrome/math.js +340 -0
  18. package/lib/chrome/math.js.map +1 -0
  19. package/lib/chrome/md-style.d.ts +3 -0
  20. package/lib/chrome/md-style.js.map +1 -1
  21. package/lib/chrome/mermaid.d.ts +6 -0
  22. package/lib/chrome/mermaid.js +56 -0
  23. package/lib/chrome/mermaid.js.map +1 -0
  24. package/lib/chrome/renderer.d.ts +78 -0
  25. package/lib/chrome/renderer.js.map +1 -1
  26. package/lib/chrome/status-config.d.ts +5 -0
  27. package/lib/chrome/status-config.js +3 -0
  28. package/lib/chrome/status-config.js.map +1 -1
  29. package/lib/chrome/status-line.d.ts +0 -21
  30. package/lib/chrome/status-line.js +8 -65
  31. package/lib/chrome/status-line.js.map +1 -1
  32. package/lib/chrome/terminal-images.d.ts +31 -0
  33. package/lib/chrome/terminal-images.js +34 -0
  34. package/lib/chrome/terminal-images.js.map +1 -0
  35. package/lib/chrome/theme.d.ts +23 -6
  36. package/lib/chrome/theme.js +217 -109
  37. package/lib/chrome/theme.js.map +1 -1
  38. package/lib/chrome/tool-args.d.ts +24 -1
  39. package/lib/chrome/tool-args.js +40 -1
  40. package/lib/chrome/tool-args.js.map +1 -1
  41. package/lib/chrome/tool-renderers.d.ts +11 -0
  42. package/lib/chrome/tool-renderers.js +55 -5
  43. package/lib/chrome/tool-renderers.js.map +1 -1
  44. package/lib/chrome/welcome-tips.js +2 -2
  45. package/lib/chrome/welcome-tips.js.map +1 -1
  46. package/lib/chrome/width.d.ts +7 -3
  47. package/lib/chrome/width.js +78 -14
  48. package/lib/chrome/width.js.map +1 -1
  49. package/lib/commands/diff.js +49 -3
  50. package/lib/commands/diff.js.map +1 -1
  51. package/lib/commands/export.js +28 -5
  52. package/lib/commands/export.js.map +1 -1
  53. package/lib/commands/files.d.ts +8 -0
  54. package/lib/commands/files.js +137 -0
  55. package/lib/commands/files.js.map +1 -0
  56. package/lib/commands/plugins.d.ts +8 -0
  57. package/lib/commands/plugins.js +158 -0
  58. package/lib/commands/plugins.js.map +1 -0
  59. package/lib/commands/session-configuration.d.ts +4 -0
  60. package/lib/commands/session-configuration.js +39 -8
  61. package/lib/commands/session-configuration.js.map +1 -1
  62. package/lib/commands/session.js +47 -15
  63. package/lib/commands/session.js.map +1 -1
  64. package/lib/commands/steer.js +2 -2
  65. package/lib/commands/steer.js.map +1 -1
  66. package/lib/commands/terminal.d.ts +7 -0
  67. package/lib/commands/terminal.js +99 -0
  68. package/lib/commands/terminal.js.map +1 -0
  69. package/lib/definition.d.ts +180 -14
  70. package/lib/definition.js.map +1 -1
  71. package/lib/input/clipboard.d.ts +12 -7
  72. package/lib/input/clipboard.js +79 -20
  73. package/lib/input/clipboard.js.map +1 -1
  74. package/lib/input/composer-files.d.ts +26 -0
  75. package/lib/input/composer-files.js +50 -0
  76. package/lib/input/composer-files.js.map +1 -0
  77. package/lib/input/editor-discovery.d.ts +21 -0
  78. package/lib/input/editor-discovery.js +99 -0
  79. package/lib/input/editor-discovery.js.map +1 -0
  80. package/lib/input/editor.d.ts +26 -1
  81. package/lib/input/editor.js +126 -12
  82. package/lib/input/editor.js.map +1 -1
  83. package/lib/input/external-editor.d.ts +5 -2
  84. package/lib/input/external-editor.js +14 -12
  85. package/lib/input/external-editor.js.map +1 -1
  86. package/lib/input/fuzzy-search.d.ts +9 -0
  87. package/lib/input/fuzzy-search.js +113 -0
  88. package/lib/input/fuzzy-search.js.map +1 -0
  89. package/lib/input/keybindings-config.d.ts +1 -1
  90. package/lib/input/keybindings-config.js +7 -1
  91. package/lib/input/keybindings-config.js.map +1 -1
  92. package/lib/input/keys.d.ts +17 -0
  93. package/lib/input/keys.js +21 -5
  94. package/lib/input/keys.js.map +1 -1
  95. package/lib/input/mouse-policy.d.ts +3 -0
  96. package/lib/input/mouse-policy.js +14 -0
  97. package/lib/input/mouse-policy.js.map +1 -0
  98. package/lib/input/paste-burst.d.ts +16 -0
  99. package/lib/input/paste-burst.js +61 -0
  100. package/lib/input/paste-burst.js.map +1 -0
  101. package/lib/input/text-selection.d.ts +20 -0
  102. package/lib/input/text-selection.js +195 -0
  103. package/lib/input/text-selection.js.map +1 -0
  104. package/lib/runtime/composer-images.d.ts +1 -0
  105. package/lib/runtime/composer-images.js +11 -3
  106. package/lib/runtime/composer-images.js.map +1 -1
  107. package/lib/runtime/file-open.d.ts +2 -0
  108. package/lib/runtime/file-open.js +12 -0
  109. package/lib/runtime/file-open.js.map +1 -0
  110. package/lib/runtime/file-review.d.ts +24 -0
  111. package/lib/runtime/file-review.js +188 -0
  112. package/lib/runtime/file-review.js.map +1 -0
  113. package/lib/runtime/herdr-agent.d.ts +7 -15
  114. package/lib/runtime/herdr-agent.js +151 -79
  115. package/lib/runtime/herdr-agent.js.map +1 -1
  116. package/lib/runtime/hook-settings.d.ts +17 -0
  117. package/lib/runtime/hook-settings.js +57 -0
  118. package/lib/runtime/hook-settings.js.map +1 -0
  119. package/lib/runtime/human-interaction.js +1 -1
  120. package/lib/runtime/human-interaction.js.map +1 -1
  121. package/lib/runtime/image-preview.d.ts +8 -0
  122. package/lib/runtime/image-preview.js +119 -0
  123. package/lib/runtime/image-preview.js.map +1 -0
  124. package/lib/runtime/plain-tui.d.ts +2 -0
  125. package/lib/runtime/plain-tui.js +2 -2
  126. package/lib/runtime/plain-tui.js.map +1 -1
  127. package/lib/runtime/plugin-settings.d.ts +17 -0
  128. package/lib/runtime/plugin-settings.js +154 -0
  129. package/lib/runtime/plugin-settings.js.map +1 -0
  130. package/lib/runtime/provider-local.d.ts +58 -7
  131. package/lib/runtime/provider-local.js +1394 -137
  132. package/lib/runtime/provider-local.js.map +1 -1
  133. package/lib/runtime/runner.js +3 -3
  134. package/lib/runtime/runner.js.map +1 -1
  135. package/lib/runtime/session-archive.d.ts +5 -0
  136. package/lib/runtime/session-archive.js +114 -0
  137. package/lib/runtime/session-archive.js.map +1 -0
  138. package/lib/runtime/subagent-model-selection.d.ts +5 -0
  139. package/lib/runtime/subagent-model-selection.js +15 -0
  140. package/lib/runtime/subagent-model-selection.js.map +1 -0
  141. package/lib/runtime/terminal-notifications.d.ts +8 -0
  142. package/lib/runtime/terminal-notifications.js +16 -0
  143. package/lib/runtime/terminal-notifications.js.map +1 -1
  144. package/lib/runtime/terminal-reader.d.ts +11 -0
  145. package/lib/runtime/terminal-reader.js +87 -0
  146. package/lib/runtime/terminal-reader.js.map +1 -0
  147. package/lib/runtime/tool-presentation.js +43 -30
  148. package/lib/runtime/tool-presentation.js.map +1 -1
  149. package/lib/session/composer-drafts.d.ts +20 -0
  150. package/lib/session/composer-drafts.js +103 -0
  151. package/lib/session/composer-drafts.js.map +1 -0
  152. package/lib/session/conversation-turns.d.ts +16 -0
  153. package/lib/session/conversation-turns.js +33 -0
  154. package/lib/session/conversation-turns.js.map +1 -0
  155. package/lib/session/feature-toggles.d.ts +79 -0
  156. package/lib/session/feature-toggles.js +139 -0
  157. package/lib/session/feature-toggles.js.map +1 -0
  158. package/lib/session/fold-policy.d.ts +4 -0
  159. package/lib/session/fold-policy.js +4 -0
  160. package/lib/session/fold-policy.js.map +1 -0
  161. package/lib/session/interaction-adapter.d.ts +2 -2
  162. package/lib/session/interaction-adapter.js +156 -25
  163. package/lib/session/interaction-adapter.js.map +1 -1
  164. package/lib/session/job-notice.d.ts +4 -0
  165. package/lib/session/job-notice.js +44 -3
  166. package/lib/session/job-notice.js.map +1 -1
  167. package/lib/session/message-queue.d.ts +22 -0
  168. package/lib/session/message-queue.js +157 -0
  169. package/lib/session/message-queue.js.map +1 -0
  170. package/lib/session/project-file-search.js +3 -21
  171. package/lib/session/project-file-search.js.map +1 -1
  172. package/lib/session/session-controller.d.ts +11 -18
  173. package/lib/session/session-controller.js +246 -100
  174. package/lib/session/session-controller.js.map +1 -1
  175. package/lib/session/session-library.d.ts +11 -3
  176. package/lib/session/session-library.js +48 -8
  177. package/lib/session/session-library.js.map +1 -1
  178. package/lib/session/session-tree.d.ts +26 -0
  179. package/lib/session/session-tree.js +112 -0
  180. package/lib/session/session-tree.js.map +1 -0
  181. package/lib/session/steering.d.ts +3 -0
  182. package/lib/session/steering.js +9 -0
  183. package/lib/session/steering.js.map +1 -0
  184. package/lib/session/tui-settings.d.ts +23 -1
  185. package/lib/session/tui-settings.js +15 -2
  186. package/lib/session/tui-settings.js.map +1 -1
  187. package/lib/session/workflow-projection.d.ts +9 -0
  188. package/lib/session/workflow-projection.js +44 -0
  189. package/lib/session/workflow-projection.js.map +1 -0
  190. package/lib/views/agent-hub.js +9 -4
  191. package/lib/views/agent-hub.js.map +1 -1
  192. package/lib/views/autocomplete.js +5 -25
  193. package/lib/views/autocomplete.js.map +1 -1
  194. package/lib/views/document-reader.d.ts +34 -0
  195. package/lib/views/document-reader.js +145 -0
  196. package/lib/views/document-reader.js.map +1 -0
  197. package/lib/views/event-views.d.ts +26 -2
  198. package/lib/views/event-views.js +196 -42
  199. package/lib/views/event-views.js.map +1 -1
  200. package/lib/views/hotkeys.d.ts +2 -0
  201. package/lib/views/hotkeys.js +20 -8
  202. package/lib/views/hotkeys.js.map +1 -1
  203. package/lib/views/prompt-selector.d.ts +33 -3
  204. package/lib/views/prompt-selector.js +287 -43
  205. package/lib/views/prompt-selector.js.map +1 -1
  206. package/lib/views/prompt-tree.d.ts +11 -0
  207. package/lib/views/prompt-tree.js +74 -0
  208. package/lib/views/prompt-tree.js.map +1 -0
  209. package/lib/views/session-files.d.ts +7 -0
  210. package/lib/views/session-files.js +62 -0
  211. package/lib/views/session-files.js.map +1 -0
  212. package/lib/views/settings-list.d.ts +32 -4
  213. package/lib/views/settings-list.js +148 -37
  214. package/lib/views/settings-list.js.map +1 -1
  215. package/lib/views/transcript-render.d.ts +117 -18
  216. package/lib/views/transcript-render.js +1084 -126
  217. package/lib/views/transcript-render.js.map +1 -1
  218. package/lib/views/transcript-types.d.ts +80 -2
  219. package/lib/views/transcript-types.js +11 -0
  220. package/lib/views/transcript-types.js.map +1 -1
  221. package/lib/views/workspace-changes.d.ts +27 -0
  222. package/lib/views/workspace-changes.js +128 -0
  223. package/lib/views/workspace-changes.js.map +1 -0
  224. package/package.json +77 -41
  225. package/lib/chrome/style.d.ts +0 -22
  226. package/lib/chrome/style.js +0 -23
  227. package/lib/chrome/style.js.map +0 -1
@@ -1,7 +1,6 @@
1
1
  /**
2
- * oh-my-pi dark theme, ported to Node (no Bun.color). Semantic colors, rounded
3
- * box chrome, and status glyphs — the visual vocabulary the rest of the view
4
- * paints with.
2
+ * Semantic palettes, paired surface colors, rounded box chrome, and status
3
+ * glyphs used by terminal views.
5
4
  * @module @agi-fans/dsh-tui
6
5
  */
7
6
  /** Rounded-box drawing characters (OMP unicode preset). */
@@ -27,33 +26,51 @@ export const SYMBOL = {
27
26
  pending: '○',
28
27
  running: '⟳',
29
28
  done: '•',
29
+ /**
30
+ * The model's thinking, in the gutter. Three stacked dots read as a deduction
31
+ * and collide with no status mark, which is what `⋆` did: it looked like a
32
+ * stray speck and a `✔` column beside it carried the real weight anyway.
33
+ */
34
+ reasoning: '∴',
35
+ /** Disclosure markers for a folded process group. */
36
+ folded: '▸',
37
+ unfolded: '▾',
38
+ /**
39
+ * Tree rail. A run's shape is carried by the rail rather than by indentation
40
+ * alone, so a reader can tell where one run ends and the next begins.
41
+ */
42
+ rail: '│',
43
+ railBranch: '├',
44
+ railEnd: '└',
45
+ /** The reader's own prompt. */
46
+ prompt: '›',
30
47
  bullet: '•',
31
48
  cursor: '❯',
32
49
  };
33
50
  /** Braille activity spinner (OMP unicode activity frames). */
34
51
  export const SPINNER = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
35
- /** OMP `dark.json` palette. */
52
+ /** Dark palette with paired card ink and backgrounds. */
36
53
  const DARK_PALETTE = {
37
54
  accent: '#febc38',
38
55
  border: '#178fb9',
39
56
  borderAccent: '#0088fa',
40
57
  borderMuted: '#3d424a',
41
58
  success: '#89d281',
42
- error: '#fc3a4b',
59
+ error: '#fc4353',
43
60
  warning: '#e4c00f',
44
- muted: '#777d88',
45
- dim: '#5f6673',
61
+ muted: '#858a94',
62
+ dim: '#666d7b',
46
63
  text: '',
47
- userMessageText: '',
64
+ userMessageText: '#e0e0e0',
48
65
  userMessageBg: '#221d1a',
49
66
  toolPendingBg: '#1d2129',
50
67
  toolSuccessBg: '#161a1f',
51
68
  toolErrorBg: '#291d1d',
52
- toolTitle: '',
53
- toolOutput: '#777d88',
69
+ toolTitle: '#e0e0e0',
70
+ toolOutput: '#858a94',
54
71
  toolDiffAdded: '#89d281',
55
- toolDiffRemoved: '#fc3a4b',
56
- toolDiffContext: '#5f6673',
72
+ toolDiffRemoved: '#fc4353',
73
+ toolDiffContext: '#838a98',
57
74
  mdHeading: '#febc38',
58
75
  mdLink: '#0088fa',
59
76
  mdLinkUrl: '#5f6673',
@@ -61,40 +78,48 @@ const DARK_PALETTE = {
61
78
  mdCodeBlock: '#9cdcfe',
62
79
  mdCodeBlockBorder: '#3d424a',
63
80
  mdKeyword: '#569cd6',
81
+ syntaxString: '#ce9178',
82
+ syntaxNumber: '#b5cea8',
83
+ syntaxFunction: '#dcdcaa',
84
+ syntaxType: '#4ec9b0',
64
85
  mdQuote: '#777d88',
65
86
  mdListBullet: '#febc38',
66
87
  thinkingText: '#6b7280',
67
88
  customMessageLabel: '#b281d6',
68
89
  };
69
- /** OMP `light.json` palette. */
90
+ /** Light palette with paired card ink and backgrounds. */
70
91
  const LIGHT_PALETTE = {
71
- accent: '#5a8080',
92
+ accent: '#4c6c6c',
72
93
  border: '#547da7',
73
94
  borderAccent: '#5a8080',
74
95
  borderMuted: '#b0b0b0',
75
96
  success: '#588458',
76
- error: '#aa5555',
97
+ error: '#9f4f4f',
77
98
  warning: '#9a7326',
78
- muted: '#6c6c6c',
99
+ muted: '#666666',
79
100
  dim: '#767676',
80
101
  text: '',
81
- userMessageText: '',
102
+ userMessageText: '#242424',
82
103
  userMessageBg: '#e8e8e8',
83
104
  toolPendingBg: '#e8e8f0',
84
105
  toolSuccessBg: '#e8f0e8',
85
106
  toolErrorBg: '#f0e8e8',
86
- toolTitle: '',
87
- toolOutput: '#6c6c6c',
88
- toolDiffAdded: '#588458',
89
- toolDiffRemoved: '#aa5555',
90
- toolDiffContext: '#767676',
107
+ toolTitle: '#242424',
108
+ toolOutput: '#666666',
109
+ toolDiffAdded: '#4a6f4a',
110
+ toolDiffRemoved: '#9f4f4f',
111
+ toolDiffContext: '#666666',
91
112
  mdHeading: '#9a7326',
92
- mdLink: '#547da7',
113
+ mdLink: '#5077a0',
93
114
  mdLinkUrl: '#767676',
94
- mdCode: '#5a8080',
95
- mdCodeBlock: '#5a8080',
115
+ mdCode: '#567b7b',
116
+ mdCodeBlock: '#567b7b',
96
117
  mdCodeBlockBorder: '#6c6c6c',
97
118
  mdKeyword: '#0451a5',
119
+ syntaxString: '#a31515',
120
+ syntaxNumber: '#098558',
121
+ syntaxFunction: '#795e26',
122
+ syntaxType: '#267e97',
98
123
  mdQuote: '#6c6c6c',
99
124
  mdListBullet: '#588458',
100
125
  thinkingText: '#6c6c6c',
@@ -109,60 +134,72 @@ const MIDNIGHT_PALETTE = {
109
134
  success: '#9ece6a',
110
135
  error: '#f7768e',
111
136
  warning: '#e0af68',
112
- muted: '#777d88',
113
- dim: '#5f6673',
137
+ muted: '#878d96',
138
+ dim: '#686f7e',
114
139
  text: '',
115
140
  userMessageBg: '#1a1b26',
116
141
  toolPendingBg: '#16161e',
117
142
  toolSuccessBg: '#1b2430',
118
143
  toolErrorBg: '#2a1b26',
119
- toolOutput: '#777d88',
144
+ toolOutput: '#878d96',
120
145
  toolDiffAdded: '#9ece6a',
121
146
  toolDiffRemoved: '#f7768e',
122
- toolDiffContext: '#5f6673',
147
+ toolDiffContext: '#858d9a',
123
148
  mdHeading: '#bb9af7',
124
149
  mdLink: '#7dcfff',
125
- mdLinkUrl: '#5f6673',
150
+ mdLinkUrl: '#626a77',
126
151
  mdCode: '#7f8799',
127
152
  mdCodeBlock: '#9aa5ce',
128
153
  mdCodeBlockBorder: '#3d424a',
129
154
  mdKeyword: '#bb9af7',
155
+ syntaxString: '#9ece6a',
156
+ syntaxNumber: '#ff9e64',
157
+ syntaxFunction: '#7aa2f7',
158
+ syntaxType: '#2ac3de',
130
159
  mdQuote: '#777d88',
131
160
  mdListBullet: '#7aa2f7',
132
161
  thinkingText: '#6a7394',
133
162
  customMessageLabel: '#bb9af7',
163
+ userMessageText: '#c0caf5',
164
+ toolTitle: '#c0caf5',
134
165
  };
135
166
  const SOLARIZED_PALETTE = {
136
167
  ...DARK_PALETTE,
137
- accent: '#b58900',
168
+ accent: '#c39400',
138
169
  border: '#268bd2',
139
170
  borderAccent: '#2aa198',
140
171
  borderMuted: '#586e75',
141
172
  success: '#859900',
142
- error: '#dc322f',
173
+ error: '#e87b79',
143
174
  warning: '#cb4b16',
144
- muted: '#839496',
145
- dim: '#586e75',
175
+ muted: '#8e9e9f',
176
+ dim: '#668088',
146
177
  text: '',
147
178
  userMessageBg: '#073642',
148
179
  toolPendingBg: '#002b36',
149
180
  toolSuccessBg: '#073642',
150
181
  toolErrorBg: '#3b2020',
151
- toolOutput: '#839496',
152
- toolDiffAdded: '#859900',
153
- toolDiffRemoved: '#dc322f',
154
- toolDiffContext: '#586e75',
182
+ toolOutput: '#8e9e9f',
183
+ toolDiffAdded: '#8fa500',
184
+ toolDiffRemoved: '#e87b79',
185
+ toolDiffContext: '#889fa6',
155
186
  mdHeading: '#b58900',
156
- mdLink: '#268bd2',
157
- mdLinkUrl: '#586e75',
187
+ mdLink: '#3496da',
188
+ mdLinkUrl: '#5e767d',
158
189
  mdCode: '#93a1a1',
159
190
  mdCodeBlock: '#2aa198',
160
191
  mdCodeBlockBorder: '#073642',
161
192
  mdKeyword: '#859900',
193
+ syntaxString: '#2aa198',
194
+ syntaxNumber: '#de66a0',
195
+ syntaxFunction: '#3496da',
196
+ syntaxType: '#b58900',
162
197
  mdQuote: '#839496',
163
198
  mdListBullet: '#b58900',
164
- thinkingText: '#586e75',
199
+ thinkingText: '#5e767d',
165
200
  customMessageLabel: '#6c71c4',
201
+ userMessageText: '#93a1a1',
202
+ toolTitle: '#93a1a1',
166
203
  };
167
204
  const CATPPUCCIN_PALETTE = {
168
205
  ...DARK_PALETTE,
@@ -173,18 +210,18 @@ const CATPPUCCIN_PALETTE = {
173
210
  success: '#a6e3a1',
174
211
  error: '#f38ba8',
175
212
  warning: '#f9e2af',
176
- muted: '#7f849c',
177
- dim: '#6c7086',
213
+ muted: '#989db0',
214
+ dim: '#7a7d93',
178
215
  text: '',
179
216
  userMessageBg: '#181825',
180
217
  toolPendingBg: '#313244',
181
218
  toolSuccessBg: '#181825',
182
219
  toolErrorBg: '#11111b',
183
220
  toolTitle: '#b4befe',
184
- toolOutput: '#7f849c',
221
+ toolOutput: '#989db0',
185
222
  toolDiffAdded: '#a6e3a1',
186
223
  toolDiffRemoved: '#f38ba8',
187
- toolDiffContext: '#7f849c',
224
+ toolDiffContext: '#989db0',
188
225
  mdHeading: '#fab387',
189
226
  mdLink: '#89b4fa',
190
227
  mdLinkUrl: '#6c7086',
@@ -192,10 +229,15 @@ const CATPPUCCIN_PALETTE = {
192
229
  mdCodeBlock: '#cdd6f4',
193
230
  mdCodeBlockBorder: '#313244',
194
231
  mdKeyword: '#cba6f7',
232
+ syntaxString: '#a6e3a1',
233
+ syntaxNumber: '#fab387',
234
+ syntaxFunction: '#89b4fa',
235
+ syntaxType: '#f9e2af',
195
236
  mdQuote: '#7f849c',
196
237
  mdListBullet: '#fab387',
197
238
  thinkingText: '#6c7086',
198
239
  customMessageLabel: '#cba6f7',
240
+ userMessageText: '#cdd6f4',
199
241
  };
200
242
  const DRACULA_PALETTE = {
201
243
  ...DARK_PALETTE,
@@ -204,31 +246,36 @@ const DRACULA_PALETTE = {
204
246
  borderAccent: '#ff79c6',
205
247
  borderMuted: '#44475a',
206
248
  success: '#50fa7b',
207
- error: '#ff5555',
249
+ error: '#ff5a5a',
208
250
  warning: '#f1fa8c',
209
- muted: '#6272a4',
210
- dim: '#44475a',
251
+ muted: '#8693b9',
252
+ dim: '#6f7492',
211
253
  text: '',
212
254
  userMessageBg: '#1f2029',
213
255
  toolPendingBg: '#21222c',
214
256
  toolSuccessBg: '#1a1f1e',
215
257
  toolErrorBg: '#2a2028',
216
258
  toolTitle: '#8be9fd',
217
- toolOutput: '#6272a4',
259
+ toolOutput: '#8693b9',
218
260
  toolDiffAdded: '#50fa7b',
219
- toolDiffRemoved: '#ff5555',
220
- toolDiffContext: '#6272a4',
261
+ toolDiffRemoved: '#ff5a5a',
262
+ toolDiffContext: '#8693b9',
221
263
  mdHeading: '#bd93f9',
222
264
  mdLink: '#8be9fd',
223
- mdLinkUrl: '#6272a4',
265
+ mdLinkUrl: '#6474a5',
224
266
  mdCode: '#9aa3c7',
225
267
  mdCodeBlock: '#f8f8f2',
226
268
  mdCodeBlockBorder: '#44475a',
227
269
  mdKeyword: '#ff79c6',
228
- mdQuote: '#6272a4',
270
+ syntaxString: '#f1fa8c',
271
+ syntaxNumber: '#bd93f9',
272
+ syntaxFunction: '#50fa7b',
273
+ syntaxType: '#8be9fd',
274
+ mdQuote: '#6474a5',
229
275
  mdListBullet: '#ff79c6',
230
- thinkingText: '#6272a4',
276
+ thinkingText: '#6474a5',
231
277
  customMessageLabel: '#bd93f9',
278
+ userMessageText: '#f8f8f2',
232
279
  };
233
280
  const NORD_PALETTE = {
234
281
  ...DARK_PALETTE,
@@ -237,31 +284,36 @@ const NORD_PALETTE = {
237
284
  borderAccent: '#88c0d0',
238
285
  borderMuted: '#434c5e',
239
286
  success: '#a3be8c',
240
- error: '#bf616a',
287
+ error: '#daa2a8',
241
288
  warning: '#ebcb8b',
242
- muted: '#7b88a1',
243
- dim: '#4c566a',
289
+ muted: '#a8b1c1',
290
+ dim: '#8490a7',
244
291
  text: '',
245
292
  userMessageBg: '#3b4252',
246
293
  toolPendingBg: '#3b4252',
247
294
  toolSuccessBg: '#2e3440',
248
295
  toolErrorBg: '#3b2f31',
249
296
  toolTitle: '#88c0d0',
250
- toolOutput: '#7b88a1',
297
+ toolOutput: '#a8b1c1',
251
298
  toolDiffAdded: '#a3be8c',
252
- toolDiffRemoved: '#bf616a',
253
- toolDiffContext: '#7b88a1',
299
+ toolDiffRemoved: '#daa2a8',
300
+ toolDiffContext: '#a8b1c1',
254
301
  mdHeading: '#88c0d0',
255
302
  mdLink: '#88c0d0',
256
- mdLinkUrl: '#4c566a',
257
- mdCode: '#81a1c1',
303
+ mdLinkUrl: '#727f9a',
304
+ mdCode: '#82a2c1',
258
305
  mdCodeBlock: '#d8dee9',
259
306
  mdCodeBlockBorder: '#434c5e',
260
- mdKeyword: '#81a1c1',
307
+ mdKeyword: '#82a2c1',
308
+ syntaxString: '#a3be8c',
309
+ syntaxNumber: '#b793b1',
310
+ syntaxFunction: '#88c0d0',
311
+ syntaxType: '#8fbcbb',
261
312
  mdQuote: '#7b88a1',
262
313
  mdListBullet: '#81a1c1',
263
- thinkingText: '#6b768d',
314
+ thinkingText: '#747f95',
264
315
  customMessageLabel: '#b48ead',
316
+ userMessageText: '#d8dee9',
265
317
  };
266
318
  const GRUVBOX_PALETTE = {
267
319
  ...DARK_PALETTE,
@@ -270,31 +322,36 @@ const GRUVBOX_PALETTE = {
270
322
  borderAccent: '#8ec07c',
271
323
  borderMuted: '#504945',
272
324
  success: '#b8bb26',
273
- error: '#fb4934',
325
+ error: '#fc6c5c',
274
326
  warning: '#fabd2f',
275
- muted: '#928374',
276
- dim: '#7c6f64',
327
+ muted: '#a4988b',
328
+ dim: '#87796d',
277
329
  text: '',
278
330
  userMessageBg: '#1d2021',
279
331
  toolPendingBg: '#32302f',
280
332
  toolSuccessBg: '#1d2021',
281
333
  toolErrorBg: '#3c2021',
282
334
  toolTitle: '#ebdbb2',
283
- toolOutput: '#928374',
335
+ toolOutput: '#a4988b',
284
336
  toolDiffAdded: '#b8bb26',
285
- toolDiffRemoved: '#fb4934',
286
- toolDiffContext: '#928374',
337
+ toolDiffRemoved: '#fc6c5c',
338
+ toolDiffContext: '#a4988b',
287
339
  mdHeading: '#fabd2f',
288
340
  mdLink: '#8ec07c',
289
- mdLinkUrl: '#7c6f64',
341
+ mdLinkUrl: '#7e7165',
290
342
  mdCode: '#bdae93',
291
343
  mdCodeBlock: '#ebdbb2',
292
344
  mdCodeBlockBorder: '#504945',
293
345
  mdKeyword: '#d3869b',
346
+ syntaxString: '#b8bb26',
347
+ syntaxNumber: '#d3869b',
348
+ syntaxFunction: '#fabd2f',
349
+ syntaxType: '#8ec07c',
294
350
  mdQuote: '#928374',
295
351
  mdListBullet: '#fe8019',
296
- thinkingText: '#7c6f64',
352
+ thinkingText: '#7e7165',
297
353
  customMessageLabel: '#d3869b',
354
+ userMessageText: '#ebdbb2',
298
355
  };
299
356
  const ROSE_PINE_PALETTE = {
300
357
  ...DARK_PALETTE,
@@ -305,29 +362,34 @@ const ROSE_PINE_PALETTE = {
305
362
  success: '#9ccfd8',
306
363
  error: '#eb6f92',
307
364
  warning: '#f6c177',
308
- muted: '#6e6a86',
309
- dim: '#524f67',
365
+ muted: '#8c89a2',
366
+ dim: '#6f6b8b',
310
367
  text: '',
311
368
  userMessageBg: '#21202e',
312
369
  toolPendingBg: '#1f1d2e',
313
370
  toolSuccessBg: '#21202e',
314
371
  toolErrorBg: '#2d1f26',
315
372
  toolTitle: '#9ccfd8',
316
- toolOutput: '#6e6a86',
373
+ toolOutput: '#8c89a2',
317
374
  toolDiffAdded: '#9ccfd8',
318
375
  toolDiffRemoved: '#eb6f92',
319
- toolDiffContext: '#6e6a86',
376
+ toolDiffContext: '#8c89a2',
320
377
  mdHeading: '#c4a7e7',
321
378
  mdLink: '#9ccfd8',
322
379
  mdLinkUrl: '#908caa',
323
380
  mdCode: '#a8a4c4',
324
381
  mdCodeBlock: '#e0def4',
325
382
  mdCodeBlockBorder: '#403d52',
326
- mdKeyword: '#31748f',
383
+ mdKeyword: '#3b8cac',
384
+ syntaxString: '#f6c177',
385
+ syntaxNumber: '#ebbcba',
386
+ syntaxFunction: '#9ccfd8',
387
+ syntaxType: '#c4a7e7',
327
388
  mdQuote: '#6e6a86',
328
389
  mdListBullet: '#c4a7e7',
329
390
  thinkingText: '#6e6a86',
330
391
  customMessageLabel: '#c4a7e7',
392
+ userMessageText: '#e0def4',
331
393
  };
332
394
  const MONO_PALETTE = {
333
395
  accent: '#e8e8e8',
@@ -337,19 +399,19 @@ const MONO_PALETTE = {
337
399
  success: '#c0c0c0',
338
400
  error: '#f0f0f0',
339
401
  warning: '#a8a8a8',
340
- muted: '#888888',
341
- dim: '#666666',
402
+ muted: '#939393',
403
+ dim: '#757575',
342
404
  text: '',
343
- userMessageText: '',
405
+ userMessageText: '#e8e8e8',
344
406
  userMessageBg: '#202020',
345
407
  toolPendingBg: '#242424',
346
408
  toolSuccessBg: '#1c1c1c',
347
409
  toolErrorBg: '#2a2a2a',
348
- toolTitle: '',
349
- toolOutput: '#888888',
410
+ toolTitle: '#e8e8e8',
411
+ toolOutput: '#939393',
350
412
  toolDiffAdded: '#c0c0c0',
351
413
  toolDiffRemoved: '#f0f0f0',
352
- toolDiffContext: '#666666',
414
+ toolDiffContext: '#939393',
353
415
  mdHeading: '#e8e8e8',
354
416
  mdLink: '#b8b8b8',
355
417
  mdLinkUrl: '#666666',
@@ -357,6 +419,10 @@ const MONO_PALETTE = {
357
419
  mdCodeBlock: '#c0c0c0',
358
420
  mdCodeBlockBorder: '#444444',
359
421
  mdKeyword: '#b8b8b8',
422
+ syntaxString: '#c0c0c0',
423
+ syntaxNumber: '#a0a0a0',
424
+ syntaxFunction: '#e8e8e8',
425
+ syntaxType: '#b8b8b8',
360
426
  mdQuote: '#888888',
361
427
  mdListBullet: '#b8b8b8',
362
428
  thinkingText: '#767676',
@@ -380,6 +446,10 @@ const PALETTES = {
380
446
  * shift in {@link ANSI16_BG} yields the intended background SGR.
381
447
  */
382
448
  const DARK_ANSI16 = {
449
+ syntaxString: '32',
450
+ syntaxNumber: '35',
451
+ syntaxFunction: '33',
452
+ syntaxType: '36',
383
453
  accent: '33',
384
454
  border: '36',
385
455
  borderAccent: '36',
@@ -390,14 +460,13 @@ const DARK_ANSI16 = {
390
460
  muted: '37',
391
461
  dim: '90',
392
462
  text: '39',
393
- userMessageText: '39',
463
+ userMessageText: '37',
394
464
  userMessageBg: '30',
395
- // SGR 40 is the only 16-color background dark tool cards can share, so
396
- // pending and successful states stay visually identical without 256 colors.
465
+ // Neutral fills avoid same-index collisions with error and diff ink.
397
466
  toolPendingBg: '30',
398
467
  toolSuccessBg: '30',
399
- toolErrorBg: '31',
400
- toolTitle: '39',
468
+ toolErrorBg: '30',
469
+ toolTitle: '37',
401
470
  toolOutput: '37',
402
471
  toolDiffAdded: '32',
403
472
  toolDiffRemoved: '31',
@@ -415,35 +484,39 @@ const DARK_ANSI16 = {
415
484
  customMessageLabel: '35',
416
485
  };
417
486
  const LIGHT_ANSI16 = {
418
- accent: '36',
487
+ syntaxString: '31',
488
+ syntaxNumber: '30',
489
+ syntaxFunction: '30',
490
+ syntaxType: '34',
491
+ accent: '34',
419
492
  border: '34',
420
- borderAccent: '36',
493
+ borderAccent: '34',
421
494
  borderMuted: '90',
422
- success: '32',
495
+ success: '30',
423
496
  error: '31',
424
- warning: '33',
497
+ warning: '30',
425
498
  muted: '30',
426
499
  dim: '90',
427
500
  text: '39',
428
- userMessageText: '39',
501
+ userMessageText: '30',
429
502
  userMessageBg: '37',
430
503
  toolPendingBg: '37',
431
- toolSuccessBg: '32',
432
- toolErrorBg: '31',
433
- toolTitle: '39',
504
+ toolSuccessBg: '37',
505
+ toolErrorBg: '37',
506
+ toolTitle: '30',
434
507
  toolOutput: '30',
435
- toolDiffAdded: '32',
508
+ toolDiffAdded: '30',
436
509
  toolDiffRemoved: '31',
437
510
  toolDiffContext: '90',
438
- mdHeading: '33',
511
+ mdHeading: '30',
439
512
  mdLink: '34',
440
513
  mdLinkUrl: '90',
441
- mdCode: '90',
442
- mdCodeBlock: '36',
514
+ mdCode: '30',
515
+ mdCodeBlock: '34',
443
516
  mdCodeBlockBorder: '90',
444
517
  mdKeyword: '34',
445
518
  mdQuote: '30',
446
- mdListBullet: '32',
519
+ mdListBullet: '30',
447
520
  thinkingText: '90',
448
521
  customMessageLabel: '35',
449
522
  };
@@ -527,6 +600,10 @@ const ROSE_PINE_ANSI16 = {
527
600
  };
528
601
  const MONO_ANSI16 = {
529
602
  ...DARK_ANSI16,
603
+ syntaxString: '37',
604
+ syntaxNumber: '37',
605
+ syntaxFunction: '97',
606
+ syntaxType: '37',
530
607
  accent: '97',
531
608
  border: '37',
532
609
  borderAccent: '97',
@@ -602,6 +679,45 @@ export function isThemeName(value) {
602
679
  export function parseThemeName(value) {
603
680
  return value !== undefined && isThemeName(value) ? value : 'dark';
604
681
  }
682
+ /** Paint a fixed surface, restoring its paired ink and fill after nested resets. */
683
+ export function paintSurface(theme, background, foreground, text) {
684
+ if (!theme.colors)
685
+ return text;
686
+ const fg = theme.getFgAnsi(foreground);
687
+ const bg = theme.getBgAnsi(background);
688
+ const restored = text.replace(/\x1b\[([0-9;]*)m/gu, (escape, params) => {
689
+ const codes = params.split(';').map(Number);
690
+ let resetFg = false, resetBg = false;
691
+ for (let at = 0; at < codes.length; at += 1) {
692
+ const code = codes[at];
693
+ if (code === 0) {
694
+ resetFg = true;
695
+ resetBg = true;
696
+ }
697
+ else if (code === 39)
698
+ resetFg = true;
699
+ else if (code === 49)
700
+ resetBg = true;
701
+ else if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97))
702
+ resetFg = false;
703
+ else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107))
704
+ resetBg = false;
705
+ else if (code === 38 || code === 48) {
706
+ if (code === 38)
707
+ resetFg = false;
708
+ else
709
+ resetBg = false;
710
+ // Color channels and palette indices are data, including zero.
711
+ if (codes[at + 1] === 2)
712
+ at += 4;
713
+ else if (codes[at + 1] === 5)
714
+ at += 2;
715
+ }
716
+ }
717
+ return escape + (resetFg ? fg : '') + (resetBg ? bg : '');
718
+ });
719
+ return bg + fg + restored + FG_RESET + BG_RESET;
720
+ }
605
721
  function hexToRgb(hex) {
606
722
  const body = hex.startsWith('#') ? hex.slice(1) : hex;
607
723
  return [
@@ -697,14 +813,6 @@ export const DEEPSEEK_LOGO = [
697
813
  ' ⠙⠻⢿⣶⣦⣼⣿⣷⣦⣭⣿⠿⣿⣷⠦ ',
698
814
  ' ⠉⠉⠉⠉⠉⠁ ',
699
815
  ];
700
- /** @deprecated Use {@link DEEPSEEK_LOGO}; retained for API compatibility. */
701
- export const PI_LOGO = [
702
- '▀██████████▀',
703
- ' ╘██ ██ ',
704
- ' ██ ██ ',
705
- ' ██ ██ ',
706
- ' ▄██▄ ▄██▄ ',
707
- ];
708
816
  const GRADIENT_STOPS = [
709
817
  [255, 92, 200],
710
818
  [200, 110, 255],