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