@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.
- package/lib/CHANGELOG.md +115 -1
- package/lib/chrome/box.d.ts +2 -0
- package/lib/chrome/box.js +6 -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 +52 -30
- package/lib/chrome/main-screen-renderer.js +1730 -79
- package/lib/chrome/main-screen-renderer.js.map +1 -1
- package/lib/chrome/markdown.js +144 -101
- 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 +78 -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 +23 -6
- package/lib/chrome/theme.js +217 -109
- package/lib/chrome/theme.js.map +1 -1
- package/lib/chrome/tool-args.d.ts +24 -1
- package/lib/chrome/tool-args.js +40 -1
- package/lib/chrome/tool-args.js.map +1 -1
- package/lib/chrome/tool-renderers.d.ts +11 -0
- package/lib/chrome/tool-renderers.js +55 -5
- package/lib/chrome/tool-renderers.js.map +1 -1
- package/lib/chrome/welcome-tips.js +2 -2
- package/lib/chrome/welcome-tips.js.map +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 +180 -14
- package/lib/definition.js.map +1 -1
- 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 +7 -1
- package/lib/input/keybindings-config.js.map +1 -1
- package/lib/input/keys.d.ts +17 -0
- package/lib/input/keys.js +21 -5
- 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 +58 -7
- package/lib/runtime/provider-local.js +1394 -137
- 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/runtime/tool-presentation.js +43 -30
- package/lib/runtime/tool-presentation.js.map +1 -1
- 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 +79 -0
- package/lib/session/feature-toggles.js +139 -0
- package/lib/session/feature-toggles.js.map +1 -0
- package/lib/session/fold-policy.d.ts +4 -0
- package/lib/session/fold-policy.js +4 -0
- package/lib/session/fold-policy.js.map +1 -0
- 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/job-notice.d.ts +4 -0
- package/lib/session/job-notice.js +44 -3
- package/lib/session/job-notice.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 +246 -100
- 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 +23 -1
- package/lib/session/tui-settings.js +15 -2
- 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.d.ts +26 -2
- package/lib/views/event-views.js +196 -42
- package/lib/views/event-views.js.map +1 -1
- package/lib/views/hotkeys.d.ts +2 -0
- package/lib/views/hotkeys.js +20 -8
- 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 +32 -4
- package/lib/views/settings-list.js +148 -37
- package/lib/views/settings-list.js.map +1 -1
- package/lib/views/transcript-render.d.ts +117 -18
- package/lib/views/transcript-render.js +1084 -126
- package/lib/views/transcript-render.js.map +1 -1
- package/lib/views/transcript-types.d.ts +80 -2
- package/lib/views/transcript-types.js +11 -0
- package/lib/views/transcript-types.js.map +1 -1
- package/lib/views/workspace-changes.d.ts +27 -0
- package/lib/views/workspace-changes.js +128 -0
- package/lib/views/workspace-changes.js.map +1 -0
- package/package.json +77 -41
- 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). */
|
|
@@ -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
|
-
/**
|
|
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: '#
|
|
59
|
+
error: '#fc4353',
|
|
43
60
|
warning: '#e4c00f',
|
|
44
|
-
muted: '#
|
|
45
|
-
dim: '#
|
|
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: '#
|
|
69
|
+
toolTitle: '#e0e0e0',
|
|
70
|
+
toolOutput: '#858a94',
|
|
54
71
|
toolDiffAdded: '#89d281',
|
|
55
|
-
toolDiffRemoved: '#
|
|
56
|
-
toolDiffContext: '#
|
|
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
|
-
/**
|
|
90
|
+
/** Light palette with paired card ink and backgrounds. */
|
|
70
91
|
const LIGHT_PALETTE = {
|
|
71
|
-
accent: '#
|
|
92
|
+
accent: '#4c6c6c',
|
|
72
93
|
border: '#547da7',
|
|
73
94
|
borderAccent: '#5a8080',
|
|
74
95
|
borderMuted: '#b0b0b0',
|
|
75
96
|
success: '#588458',
|
|
76
|
-
error: '#
|
|
97
|
+
error: '#9f4f4f',
|
|
77
98
|
warning: '#9a7326',
|
|
78
|
-
muted: '#
|
|
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: '#
|
|
88
|
-
toolDiffAdded: '#
|
|
89
|
-
toolDiffRemoved: '#
|
|
90
|
-
toolDiffContext: '#
|
|
107
|
+
toolTitle: '#242424',
|
|
108
|
+
toolOutput: '#666666',
|
|
109
|
+
toolDiffAdded: '#4a6f4a',
|
|
110
|
+
toolDiffRemoved: '#9f4f4f',
|
|
111
|
+
toolDiffContext: '#666666',
|
|
91
112
|
mdHeading: '#9a7326',
|
|
92
|
-
mdLink: '#
|
|
113
|
+
mdLink: '#5077a0',
|
|
93
114
|
mdLinkUrl: '#767676',
|
|
94
|
-
mdCode: '#
|
|
95
|
-
mdCodeBlock: '#
|
|
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: '#
|
|
113
|
-
dim: '#
|
|
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: '#
|
|
144
|
+
toolOutput: '#878d96',
|
|
120
145
|
toolDiffAdded: '#9ece6a',
|
|
121
146
|
toolDiffRemoved: '#f7768e',
|
|
122
|
-
toolDiffContext: '#
|
|
147
|
+
toolDiffContext: '#858d9a',
|
|
123
148
|
mdHeading: '#bb9af7',
|
|
124
149
|
mdLink: '#7dcfff',
|
|
125
|
-
mdLinkUrl: '#
|
|
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: '#
|
|
168
|
+
accent: '#c39400',
|
|
138
169
|
border: '#268bd2',
|
|
139
170
|
borderAccent: '#2aa198',
|
|
140
171
|
borderMuted: '#586e75',
|
|
141
172
|
success: '#859900',
|
|
142
|
-
error: '#
|
|
173
|
+
error: '#e87b79',
|
|
143
174
|
warning: '#cb4b16',
|
|
144
|
-
muted: '#
|
|
145
|
-
dim: '#
|
|
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: '#
|
|
152
|
-
toolDiffAdded: '#
|
|
153
|
-
toolDiffRemoved: '#
|
|
154
|
-
toolDiffContext: '#
|
|
182
|
+
toolOutput: '#8e9e9f',
|
|
183
|
+
toolDiffAdded: '#8fa500',
|
|
184
|
+
toolDiffRemoved: '#e87b79',
|
|
185
|
+
toolDiffContext: '#889fa6',
|
|
155
186
|
mdHeading: '#b58900',
|
|
156
|
-
mdLink: '#
|
|
157
|
-
mdLinkUrl: '#
|
|
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: '#
|
|
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: '#
|
|
177
|
-
dim: '#
|
|
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: '#
|
|
221
|
+
toolOutput: '#989db0',
|
|
185
222
|
toolDiffAdded: '#a6e3a1',
|
|
186
223
|
toolDiffRemoved: '#f38ba8',
|
|
187
|
-
toolDiffContext: '#
|
|
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: '#
|
|
249
|
+
error: '#ff5a5a',
|
|
208
250
|
warning: '#f1fa8c',
|
|
209
|
-
muted: '#
|
|
210
|
-
dim: '#
|
|
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: '#
|
|
259
|
+
toolOutput: '#8693b9',
|
|
218
260
|
toolDiffAdded: '#50fa7b',
|
|
219
|
-
toolDiffRemoved: '#
|
|
220
|
-
toolDiffContext: '#
|
|
261
|
+
toolDiffRemoved: '#ff5a5a',
|
|
262
|
+
toolDiffContext: '#8693b9',
|
|
221
263
|
mdHeading: '#bd93f9',
|
|
222
264
|
mdLink: '#8be9fd',
|
|
223
|
-
mdLinkUrl: '#
|
|
265
|
+
mdLinkUrl: '#6474a5',
|
|
224
266
|
mdCode: '#9aa3c7',
|
|
225
267
|
mdCodeBlock: '#f8f8f2',
|
|
226
268
|
mdCodeBlockBorder: '#44475a',
|
|
227
269
|
mdKeyword: '#ff79c6',
|
|
228
|
-
|
|
270
|
+
syntaxString: '#f1fa8c',
|
|
271
|
+
syntaxNumber: '#bd93f9',
|
|
272
|
+
syntaxFunction: '#50fa7b',
|
|
273
|
+
syntaxType: '#8be9fd',
|
|
274
|
+
mdQuote: '#6474a5',
|
|
229
275
|
mdListBullet: '#ff79c6',
|
|
230
|
-
thinkingText: '#
|
|
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: '#
|
|
287
|
+
error: '#daa2a8',
|
|
241
288
|
warning: '#ebcb8b',
|
|
242
|
-
muted: '#
|
|
243
|
-
dim: '#
|
|
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: '#
|
|
297
|
+
toolOutput: '#a8b1c1',
|
|
251
298
|
toolDiffAdded: '#a3be8c',
|
|
252
|
-
toolDiffRemoved: '#
|
|
253
|
-
toolDiffContext: '#
|
|
299
|
+
toolDiffRemoved: '#daa2a8',
|
|
300
|
+
toolDiffContext: '#a8b1c1',
|
|
254
301
|
mdHeading: '#88c0d0',
|
|
255
302
|
mdLink: '#88c0d0',
|
|
256
|
-
mdLinkUrl: '#
|
|
257
|
-
mdCode: '#
|
|
303
|
+
mdLinkUrl: '#727f9a',
|
|
304
|
+
mdCode: '#82a2c1',
|
|
258
305
|
mdCodeBlock: '#d8dee9',
|
|
259
306
|
mdCodeBlockBorder: '#434c5e',
|
|
260
|
-
mdKeyword: '#
|
|
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: '#
|
|
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: '#
|
|
325
|
+
error: '#fc6c5c',
|
|
274
326
|
warning: '#fabd2f',
|
|
275
|
-
muted: '#
|
|
276
|
-
dim: '#
|
|
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: '#
|
|
335
|
+
toolOutput: '#a4988b',
|
|
284
336
|
toolDiffAdded: '#b8bb26',
|
|
285
|
-
toolDiffRemoved: '#
|
|
286
|
-
toolDiffContext: '#
|
|
337
|
+
toolDiffRemoved: '#fc6c5c',
|
|
338
|
+
toolDiffContext: '#a4988b',
|
|
287
339
|
mdHeading: '#fabd2f',
|
|
288
340
|
mdLink: '#8ec07c',
|
|
289
|
-
mdLinkUrl: '#
|
|
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: '#
|
|
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: '#
|
|
309
|
-
dim: '#
|
|
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: '#
|
|
373
|
+
toolOutput: '#8c89a2',
|
|
317
374
|
toolDiffAdded: '#9ccfd8',
|
|
318
375
|
toolDiffRemoved: '#eb6f92',
|
|
319
|
-
toolDiffContext: '#
|
|
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: '#
|
|
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: '#
|
|
341
|
-
dim: '#
|
|
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: '#
|
|
410
|
+
toolTitle: '#e8e8e8',
|
|
411
|
+
toolOutput: '#939393',
|
|
350
412
|
toolDiffAdded: '#c0c0c0',
|
|
351
413
|
toolDiffRemoved: '#f0f0f0',
|
|
352
|
-
toolDiffContext: '#
|
|
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: '
|
|
463
|
+
userMessageText: '37',
|
|
394
464
|
userMessageBg: '30',
|
|
395
|
-
//
|
|
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: '
|
|
400
|
-
toolTitle: '
|
|
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
|
-
|
|
487
|
+
syntaxString: '31',
|
|
488
|
+
syntaxNumber: '30',
|
|
489
|
+
syntaxFunction: '30',
|
|
490
|
+
syntaxType: '34',
|
|
491
|
+
accent: '34',
|
|
419
492
|
border: '34',
|
|
420
|
-
borderAccent: '
|
|
493
|
+
borderAccent: '34',
|
|
421
494
|
borderMuted: '90',
|
|
422
|
-
success: '
|
|
495
|
+
success: '30',
|
|
423
496
|
error: '31',
|
|
424
|
-
warning: '
|
|
497
|
+
warning: '30',
|
|
425
498
|
muted: '30',
|
|
426
499
|
dim: '90',
|
|
427
500
|
text: '39',
|
|
428
|
-
userMessageText: '
|
|
501
|
+
userMessageText: '30',
|
|
429
502
|
userMessageBg: '37',
|
|
430
503
|
toolPendingBg: '37',
|
|
431
|
-
toolSuccessBg: '
|
|
432
|
-
toolErrorBg: '
|
|
433
|
-
toolTitle: '
|
|
504
|
+
toolSuccessBg: '37',
|
|
505
|
+
toolErrorBg: '37',
|
|
506
|
+
toolTitle: '30',
|
|
434
507
|
toolOutput: '30',
|
|
435
|
-
toolDiffAdded: '
|
|
508
|
+
toolDiffAdded: '30',
|
|
436
509
|
toolDiffRemoved: '31',
|
|
437
510
|
toolDiffContext: '90',
|
|
438
|
-
mdHeading: '
|
|
511
|
+
mdHeading: '30',
|
|
439
512
|
mdLink: '34',
|
|
440
513
|
mdLinkUrl: '90',
|
|
441
|
-
mdCode: '
|
|
442
|
-
mdCodeBlock: '
|
|
514
|
+
mdCode: '30',
|
|
515
|
+
mdCodeBlock: '34',
|
|
443
516
|
mdCodeBlockBorder: '90',
|
|
444
517
|
mdKeyword: '34',
|
|
445
518
|
mdQuote: '30',
|
|
446
|
-
mdListBullet: '
|
|
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],
|