gsd-pi 2.34.0-dev.0150ae9 → 2.34.0-dev.ed0bfbf
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/package.json +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/dark.json +85 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/light.json +84 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +0 -65
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +16 -6
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/theme/dark.json +85 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/light.json +84 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.json +335 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +18 -7
- package/pkg/dist/modes/interactive/theme/dark.json +85 -0
- package/pkg/dist/modes/interactive/theme/light.json +84 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts +0 -65
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +16 -6
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +0 -12
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +0 -175
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +0 -1
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +0 -196
- package/pkg/dist/modes/interactive/theme/themes.d.ts +0 -12
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +0 -1
- package/pkg/dist/modes/interactive/theme/themes.js +0 -175
- package/pkg/dist/modes/interactive/theme/themes.js.map +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "dark",
|
|
4
|
+
"vars": {
|
|
5
|
+
"cyan": "#00d7ff",
|
|
6
|
+
"blue": "#5f87ff",
|
|
7
|
+
"green": "#b5bd68",
|
|
8
|
+
"red": "#cc6666",
|
|
9
|
+
"yellow": "#ffff00",
|
|
10
|
+
"gray": "#808080",
|
|
11
|
+
"dimGray": "#666666",
|
|
12
|
+
"darkGray": "#505050",
|
|
13
|
+
"accent": "#8abeb7",
|
|
14
|
+
"selectedBg": "#3a3a4a",
|
|
15
|
+
"userMsgBg": "#343541",
|
|
16
|
+
"toolPendingBg": "#282832",
|
|
17
|
+
"toolSuccessBg": "#283228",
|
|
18
|
+
"toolErrorBg": "#3c2828",
|
|
19
|
+
"customMsgBg": "#2d2838"
|
|
20
|
+
},
|
|
21
|
+
"colors": {
|
|
22
|
+
"accent": "accent",
|
|
23
|
+
"border": "blue",
|
|
24
|
+
"borderAccent": "cyan",
|
|
25
|
+
"borderMuted": "darkGray",
|
|
26
|
+
"success": "green",
|
|
27
|
+
"error": "red",
|
|
28
|
+
"warning": "yellow",
|
|
29
|
+
"muted": "gray",
|
|
30
|
+
"dim": "dimGray",
|
|
31
|
+
"text": "",
|
|
32
|
+
"thinkingText": "gray",
|
|
33
|
+
|
|
34
|
+
"selectedBg": "selectedBg",
|
|
35
|
+
"userMessageBg": "userMsgBg",
|
|
36
|
+
"userMessageText": "",
|
|
37
|
+
"customMessageBg": "customMsgBg",
|
|
38
|
+
"customMessageText": "",
|
|
39
|
+
"customMessageLabel": "#9575cd",
|
|
40
|
+
"toolPendingBg": "toolPendingBg",
|
|
41
|
+
"toolSuccessBg": "toolSuccessBg",
|
|
42
|
+
"toolErrorBg": "toolErrorBg",
|
|
43
|
+
"toolTitle": "",
|
|
44
|
+
"toolOutput": "gray",
|
|
45
|
+
|
|
46
|
+
"mdHeading": "#f0c674",
|
|
47
|
+
"mdLink": "#81a2be",
|
|
48
|
+
"mdLinkUrl": "dimGray",
|
|
49
|
+
"mdCode": "accent",
|
|
50
|
+
"mdCodeBlock": "green",
|
|
51
|
+
"mdCodeBlockBorder": "gray",
|
|
52
|
+
"mdQuote": "gray",
|
|
53
|
+
"mdQuoteBorder": "gray",
|
|
54
|
+
"mdHr": "gray",
|
|
55
|
+
"mdListBullet": "accent",
|
|
56
|
+
|
|
57
|
+
"toolDiffAdded": "green",
|
|
58
|
+
"toolDiffRemoved": "red",
|
|
59
|
+
"toolDiffContext": "gray",
|
|
60
|
+
|
|
61
|
+
"syntaxComment": "#6A9955",
|
|
62
|
+
"syntaxKeyword": "#569CD6",
|
|
63
|
+
"syntaxFunction": "#DCDCAA",
|
|
64
|
+
"syntaxVariable": "#9CDCFE",
|
|
65
|
+
"syntaxString": "#CE9178",
|
|
66
|
+
"syntaxNumber": "#B5CEA8",
|
|
67
|
+
"syntaxType": "#4EC9B0",
|
|
68
|
+
"syntaxOperator": "#D4D4D4",
|
|
69
|
+
"syntaxPunctuation": "#D4D4D4",
|
|
70
|
+
|
|
71
|
+
"thinkingOff": "darkGray",
|
|
72
|
+
"thinkingMinimal": "#6e6e6e",
|
|
73
|
+
"thinkingLow": "#5f87af",
|
|
74
|
+
"thinkingMedium": "#81a2be",
|
|
75
|
+
"thinkingHigh": "#b294bb",
|
|
76
|
+
"thinkingXhigh": "#d183e8",
|
|
77
|
+
|
|
78
|
+
"bashMode": "green"
|
|
79
|
+
},
|
|
80
|
+
"export": {
|
|
81
|
+
"pageBg": "#18181e",
|
|
82
|
+
"cardBg": "#1e1e24",
|
|
83
|
+
"infoBg": "#3c3728"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "light",
|
|
4
|
+
"vars": {
|
|
5
|
+
"teal": "#5a8080",
|
|
6
|
+
"blue": "#547da7",
|
|
7
|
+
"green": "#588458",
|
|
8
|
+
"red": "#aa5555",
|
|
9
|
+
"yellow": "#9a7326",
|
|
10
|
+
"mediumGray": "#6c6c6c",
|
|
11
|
+
"dimGray": "#767676",
|
|
12
|
+
"lightGray": "#b0b0b0",
|
|
13
|
+
"selectedBg": "#d0d0e0",
|
|
14
|
+
"userMsgBg": "#e8e8e8",
|
|
15
|
+
"toolPendingBg": "#e8e8f0",
|
|
16
|
+
"toolSuccessBg": "#e8f0e8",
|
|
17
|
+
"toolErrorBg": "#f0e8e8",
|
|
18
|
+
"customMsgBg": "#ede7f6"
|
|
19
|
+
},
|
|
20
|
+
"colors": {
|
|
21
|
+
"accent": "teal",
|
|
22
|
+
"border": "blue",
|
|
23
|
+
"borderAccent": "teal",
|
|
24
|
+
"borderMuted": "lightGray",
|
|
25
|
+
"success": "green",
|
|
26
|
+
"error": "red",
|
|
27
|
+
"warning": "yellow",
|
|
28
|
+
"muted": "mediumGray",
|
|
29
|
+
"dim": "dimGray",
|
|
30
|
+
"text": "",
|
|
31
|
+
"thinkingText": "mediumGray",
|
|
32
|
+
|
|
33
|
+
"selectedBg": "selectedBg",
|
|
34
|
+
"userMessageBg": "userMsgBg",
|
|
35
|
+
"userMessageText": "",
|
|
36
|
+
"customMessageBg": "customMsgBg",
|
|
37
|
+
"customMessageText": "",
|
|
38
|
+
"customMessageLabel": "#7e57c2",
|
|
39
|
+
"toolPendingBg": "toolPendingBg",
|
|
40
|
+
"toolSuccessBg": "toolSuccessBg",
|
|
41
|
+
"toolErrorBg": "toolErrorBg",
|
|
42
|
+
"toolTitle": "",
|
|
43
|
+
"toolOutput": "mediumGray",
|
|
44
|
+
|
|
45
|
+
"mdHeading": "yellow",
|
|
46
|
+
"mdLink": "blue",
|
|
47
|
+
"mdLinkUrl": "dimGray",
|
|
48
|
+
"mdCode": "teal",
|
|
49
|
+
"mdCodeBlock": "green",
|
|
50
|
+
"mdCodeBlockBorder": "mediumGray",
|
|
51
|
+
"mdQuote": "mediumGray",
|
|
52
|
+
"mdQuoteBorder": "mediumGray",
|
|
53
|
+
"mdHr": "mediumGray",
|
|
54
|
+
"mdListBullet": "green",
|
|
55
|
+
|
|
56
|
+
"toolDiffAdded": "green",
|
|
57
|
+
"toolDiffRemoved": "red",
|
|
58
|
+
"toolDiffContext": "mediumGray",
|
|
59
|
+
|
|
60
|
+
"syntaxComment": "#008000",
|
|
61
|
+
"syntaxKeyword": "#0000FF",
|
|
62
|
+
"syntaxFunction": "#795E26",
|
|
63
|
+
"syntaxVariable": "#001080",
|
|
64
|
+
"syntaxString": "#A31515",
|
|
65
|
+
"syntaxNumber": "#098658",
|
|
66
|
+
"syntaxType": "#267F99",
|
|
67
|
+
"syntaxOperator": "#000000",
|
|
68
|
+
"syntaxPunctuation": "#000000",
|
|
69
|
+
|
|
70
|
+
"thinkingOff": "lightGray",
|
|
71
|
+
"thinkingMinimal": "#767676",
|
|
72
|
+
"thinkingLow": "blue",
|
|
73
|
+
"thinkingMedium": "teal",
|
|
74
|
+
"thinkingHigh": "#875f87",
|
|
75
|
+
"thinkingXhigh": "#8b008b",
|
|
76
|
+
|
|
77
|
+
"bashMode": "green"
|
|
78
|
+
},
|
|
79
|
+
"export": {
|
|
80
|
+
"pageBg": "#f8f8f8",
|
|
81
|
+
"cardBg": "#ffffff",
|
|
82
|
+
"infoBg": "#fffae6"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Pi Coding Agent Theme",
|
|
4
|
+
"description": "Theme schema for Pi coding agent",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["name", "colors"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "JSON schema reference"
|
|
11
|
+
},
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Theme name"
|
|
15
|
+
},
|
|
16
|
+
"vars": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Reusable color variables",
|
|
19
|
+
"additionalProperties": {
|
|
20
|
+
"oneOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 255,
|
|
29
|
+
"description": "256-color palette index (0-255)"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"colors": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"description": "Theme color definitions (all required)",
|
|
37
|
+
"required": [
|
|
38
|
+
"accent",
|
|
39
|
+
"border",
|
|
40
|
+
"borderAccent",
|
|
41
|
+
"borderMuted",
|
|
42
|
+
"success",
|
|
43
|
+
"error",
|
|
44
|
+
"warning",
|
|
45
|
+
"muted",
|
|
46
|
+
"dim",
|
|
47
|
+
"text",
|
|
48
|
+
"thinkingText",
|
|
49
|
+
"selectedBg",
|
|
50
|
+
"userMessageBg",
|
|
51
|
+
"userMessageText",
|
|
52
|
+
"customMessageBg",
|
|
53
|
+
"customMessageText",
|
|
54
|
+
"customMessageLabel",
|
|
55
|
+
"toolPendingBg",
|
|
56
|
+
"toolSuccessBg",
|
|
57
|
+
"toolErrorBg",
|
|
58
|
+
"toolTitle",
|
|
59
|
+
"toolOutput",
|
|
60
|
+
"mdHeading",
|
|
61
|
+
"mdLink",
|
|
62
|
+
"mdLinkUrl",
|
|
63
|
+
"mdCode",
|
|
64
|
+
"mdCodeBlock",
|
|
65
|
+
"mdCodeBlockBorder",
|
|
66
|
+
"mdQuote",
|
|
67
|
+
"mdQuoteBorder",
|
|
68
|
+
"mdHr",
|
|
69
|
+
"mdListBullet",
|
|
70
|
+
"toolDiffAdded",
|
|
71
|
+
"toolDiffRemoved",
|
|
72
|
+
"toolDiffContext",
|
|
73
|
+
"syntaxComment",
|
|
74
|
+
"syntaxKeyword",
|
|
75
|
+
"syntaxFunction",
|
|
76
|
+
"syntaxVariable",
|
|
77
|
+
"syntaxString",
|
|
78
|
+
"syntaxNumber",
|
|
79
|
+
"syntaxType",
|
|
80
|
+
"syntaxOperator",
|
|
81
|
+
"syntaxPunctuation",
|
|
82
|
+
"thinkingOff",
|
|
83
|
+
"thinkingMinimal",
|
|
84
|
+
"thinkingLow",
|
|
85
|
+
"thinkingMedium",
|
|
86
|
+
"thinkingHigh",
|
|
87
|
+
"thinkingXhigh",
|
|
88
|
+
"bashMode"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"accent": {
|
|
92
|
+
"$ref": "#/$defs/colorValue",
|
|
93
|
+
"description": "Primary accent color (logo, selected items, cursor)"
|
|
94
|
+
},
|
|
95
|
+
"border": {
|
|
96
|
+
"$ref": "#/$defs/colorValue",
|
|
97
|
+
"description": "Normal borders"
|
|
98
|
+
},
|
|
99
|
+
"borderAccent": {
|
|
100
|
+
"$ref": "#/$defs/colorValue",
|
|
101
|
+
"description": "Highlighted borders"
|
|
102
|
+
},
|
|
103
|
+
"borderMuted": {
|
|
104
|
+
"$ref": "#/$defs/colorValue",
|
|
105
|
+
"description": "Subtle borders"
|
|
106
|
+
},
|
|
107
|
+
"success": {
|
|
108
|
+
"$ref": "#/$defs/colorValue",
|
|
109
|
+
"description": "Success states"
|
|
110
|
+
},
|
|
111
|
+
"error": {
|
|
112
|
+
"$ref": "#/$defs/colorValue",
|
|
113
|
+
"description": "Error states"
|
|
114
|
+
},
|
|
115
|
+
"warning": {
|
|
116
|
+
"$ref": "#/$defs/colorValue",
|
|
117
|
+
"description": "Warning states"
|
|
118
|
+
},
|
|
119
|
+
"muted": {
|
|
120
|
+
"$ref": "#/$defs/colorValue",
|
|
121
|
+
"description": "Secondary/dimmed text"
|
|
122
|
+
},
|
|
123
|
+
"dim": {
|
|
124
|
+
"$ref": "#/$defs/colorValue",
|
|
125
|
+
"description": "Very dimmed text (more subtle than muted)"
|
|
126
|
+
},
|
|
127
|
+
"text": {
|
|
128
|
+
"$ref": "#/$defs/colorValue",
|
|
129
|
+
"description": "Default text color (usually empty string)"
|
|
130
|
+
},
|
|
131
|
+
"thinkingText": {
|
|
132
|
+
"$ref": "#/$defs/colorValue",
|
|
133
|
+
"description": "Thinking block text color"
|
|
134
|
+
},
|
|
135
|
+
"selectedBg": {
|
|
136
|
+
"$ref": "#/$defs/colorValue",
|
|
137
|
+
"description": "Selected item background"
|
|
138
|
+
},
|
|
139
|
+
"userMessageBg": {
|
|
140
|
+
"$ref": "#/$defs/colorValue",
|
|
141
|
+
"description": "User message background"
|
|
142
|
+
},
|
|
143
|
+
"userMessageText": {
|
|
144
|
+
"$ref": "#/$defs/colorValue",
|
|
145
|
+
"description": "User message text color"
|
|
146
|
+
},
|
|
147
|
+
"customMessageBg": {
|
|
148
|
+
"$ref": "#/$defs/colorValue",
|
|
149
|
+
"description": "Custom message background (hook-injected messages)"
|
|
150
|
+
},
|
|
151
|
+
"customMessageText": {
|
|
152
|
+
"$ref": "#/$defs/colorValue",
|
|
153
|
+
"description": "Custom message text color"
|
|
154
|
+
},
|
|
155
|
+
"customMessageLabel": {
|
|
156
|
+
"$ref": "#/$defs/colorValue",
|
|
157
|
+
"description": "Custom message type label color"
|
|
158
|
+
},
|
|
159
|
+
"toolPendingBg": {
|
|
160
|
+
"$ref": "#/$defs/colorValue",
|
|
161
|
+
"description": "Tool execution box (pending state)"
|
|
162
|
+
},
|
|
163
|
+
"toolSuccessBg": {
|
|
164
|
+
"$ref": "#/$defs/colorValue",
|
|
165
|
+
"description": "Tool execution box (success state)"
|
|
166
|
+
},
|
|
167
|
+
"toolErrorBg": {
|
|
168
|
+
"$ref": "#/$defs/colorValue",
|
|
169
|
+
"description": "Tool execution box (error state)"
|
|
170
|
+
},
|
|
171
|
+
"toolTitle": {
|
|
172
|
+
"$ref": "#/$defs/colorValue",
|
|
173
|
+
"description": "Tool execution box title color"
|
|
174
|
+
},
|
|
175
|
+
"toolOutput": {
|
|
176
|
+
"$ref": "#/$defs/colorValue",
|
|
177
|
+
"description": "Tool execution box output text color"
|
|
178
|
+
},
|
|
179
|
+
"mdHeading": {
|
|
180
|
+
"$ref": "#/$defs/colorValue",
|
|
181
|
+
"description": "Markdown heading text"
|
|
182
|
+
},
|
|
183
|
+
"mdLink": {
|
|
184
|
+
"$ref": "#/$defs/colorValue",
|
|
185
|
+
"description": "Markdown link text"
|
|
186
|
+
},
|
|
187
|
+
"mdLinkUrl": {
|
|
188
|
+
"$ref": "#/$defs/colorValue",
|
|
189
|
+
"description": "Markdown link URL"
|
|
190
|
+
},
|
|
191
|
+
"mdCode": {
|
|
192
|
+
"$ref": "#/$defs/colorValue",
|
|
193
|
+
"description": "Markdown inline code"
|
|
194
|
+
},
|
|
195
|
+
"mdCodeBlock": {
|
|
196
|
+
"$ref": "#/$defs/colorValue",
|
|
197
|
+
"description": "Markdown code block content"
|
|
198
|
+
},
|
|
199
|
+
"mdCodeBlockBorder": {
|
|
200
|
+
"$ref": "#/$defs/colorValue",
|
|
201
|
+
"description": "Markdown code block fences"
|
|
202
|
+
},
|
|
203
|
+
"mdQuote": {
|
|
204
|
+
"$ref": "#/$defs/colorValue",
|
|
205
|
+
"description": "Markdown blockquote text"
|
|
206
|
+
},
|
|
207
|
+
"mdQuoteBorder": {
|
|
208
|
+
"$ref": "#/$defs/colorValue",
|
|
209
|
+
"description": "Markdown blockquote border"
|
|
210
|
+
},
|
|
211
|
+
"mdHr": {
|
|
212
|
+
"$ref": "#/$defs/colorValue",
|
|
213
|
+
"description": "Markdown horizontal rule"
|
|
214
|
+
},
|
|
215
|
+
"mdListBullet": {
|
|
216
|
+
"$ref": "#/$defs/colorValue",
|
|
217
|
+
"description": "Markdown list bullets/numbers"
|
|
218
|
+
},
|
|
219
|
+
"toolDiffAdded": {
|
|
220
|
+
"$ref": "#/$defs/colorValue",
|
|
221
|
+
"description": "Added lines in tool diffs"
|
|
222
|
+
},
|
|
223
|
+
"toolDiffRemoved": {
|
|
224
|
+
"$ref": "#/$defs/colorValue",
|
|
225
|
+
"description": "Removed lines in tool diffs"
|
|
226
|
+
},
|
|
227
|
+
"toolDiffContext": {
|
|
228
|
+
"$ref": "#/$defs/colorValue",
|
|
229
|
+
"description": "Context lines in tool diffs"
|
|
230
|
+
},
|
|
231
|
+
"syntaxComment": {
|
|
232
|
+
"$ref": "#/$defs/colorValue",
|
|
233
|
+
"description": "Syntax highlighting: comments"
|
|
234
|
+
},
|
|
235
|
+
"syntaxKeyword": {
|
|
236
|
+
"$ref": "#/$defs/colorValue",
|
|
237
|
+
"description": "Syntax highlighting: keywords"
|
|
238
|
+
},
|
|
239
|
+
"syntaxFunction": {
|
|
240
|
+
"$ref": "#/$defs/colorValue",
|
|
241
|
+
"description": "Syntax highlighting: function names"
|
|
242
|
+
},
|
|
243
|
+
"syntaxVariable": {
|
|
244
|
+
"$ref": "#/$defs/colorValue",
|
|
245
|
+
"description": "Syntax highlighting: variable names"
|
|
246
|
+
},
|
|
247
|
+
"syntaxString": {
|
|
248
|
+
"$ref": "#/$defs/colorValue",
|
|
249
|
+
"description": "Syntax highlighting: string literals"
|
|
250
|
+
},
|
|
251
|
+
"syntaxNumber": {
|
|
252
|
+
"$ref": "#/$defs/colorValue",
|
|
253
|
+
"description": "Syntax highlighting: number literals"
|
|
254
|
+
},
|
|
255
|
+
"syntaxType": {
|
|
256
|
+
"$ref": "#/$defs/colorValue",
|
|
257
|
+
"description": "Syntax highlighting: type names"
|
|
258
|
+
},
|
|
259
|
+
"syntaxOperator": {
|
|
260
|
+
"$ref": "#/$defs/colorValue",
|
|
261
|
+
"description": "Syntax highlighting: operators"
|
|
262
|
+
},
|
|
263
|
+
"syntaxPunctuation": {
|
|
264
|
+
"$ref": "#/$defs/colorValue",
|
|
265
|
+
"description": "Syntax highlighting: punctuation"
|
|
266
|
+
},
|
|
267
|
+
"thinkingOff": {
|
|
268
|
+
"$ref": "#/$defs/colorValue",
|
|
269
|
+
"description": "Thinking level border: off"
|
|
270
|
+
},
|
|
271
|
+
"thinkingMinimal": {
|
|
272
|
+
"$ref": "#/$defs/colorValue",
|
|
273
|
+
"description": "Thinking level border: minimal"
|
|
274
|
+
},
|
|
275
|
+
"thinkingLow": {
|
|
276
|
+
"$ref": "#/$defs/colorValue",
|
|
277
|
+
"description": "Thinking level border: low"
|
|
278
|
+
},
|
|
279
|
+
"thinkingMedium": {
|
|
280
|
+
"$ref": "#/$defs/colorValue",
|
|
281
|
+
"description": "Thinking level border: medium"
|
|
282
|
+
},
|
|
283
|
+
"thinkingHigh": {
|
|
284
|
+
"$ref": "#/$defs/colorValue",
|
|
285
|
+
"description": "Thinking level border: high"
|
|
286
|
+
},
|
|
287
|
+
"thinkingXhigh": {
|
|
288
|
+
"$ref": "#/$defs/colorValue",
|
|
289
|
+
"description": "Thinking level border: xhigh (OpenAI codex-max only)"
|
|
290
|
+
},
|
|
291
|
+
"bashMode": {
|
|
292
|
+
"$ref": "#/$defs/colorValue",
|
|
293
|
+
"description": "Editor border color in bash mode"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
},
|
|
298
|
+
"export": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"description": "Optional colors for HTML export (defaults derived from userMessageBg if not specified)",
|
|
301
|
+
"properties": {
|
|
302
|
+
"pageBg": {
|
|
303
|
+
"$ref": "#/$defs/colorValue",
|
|
304
|
+
"description": "Page background color"
|
|
305
|
+
},
|
|
306
|
+
"cardBg": {
|
|
307
|
+
"$ref": "#/$defs/colorValue",
|
|
308
|
+
"description": "Card/container background color"
|
|
309
|
+
},
|
|
310
|
+
"infoBg": {
|
|
311
|
+
"$ref": "#/$defs/colorValue",
|
|
312
|
+
"description": "Info sections background (system prompt, notices)"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"additionalProperties": false
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"additionalProperties": false,
|
|
319
|
+
"$defs": {
|
|
320
|
+
"colorValue": {
|
|
321
|
+
"oneOf": [
|
|
322
|
+
{
|
|
323
|
+
"type": "string",
|
|
324
|
+
"description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"type": "integer",
|
|
328
|
+
"minimum": 0,
|
|
329
|
+
"maximum": 255,
|
|
330
|
+
"description": "256-color palette index (0-255)"
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
@@ -1,69 +1,4 @@
|
|
|
1
1
|
import type { EditorTheme, MarkdownTheme, SelectListTheme } from "@gsd/pi-tui";
|
|
2
|
-
import { type Static } from "@sinclair/typebox";
|
|
3
|
-
declare const ThemeJsonSchema: import("@sinclair/typebox").TObject<{
|
|
4
|
-
$schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
|
-
name: import("@sinclair/typebox").TString;
|
|
6
|
-
vars: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>>>;
|
|
7
|
-
colors: import("@sinclair/typebox").TObject<{
|
|
8
|
-
accent: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
9
|
-
border: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
10
|
-
borderAccent: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
11
|
-
borderMuted: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
12
|
-
success: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
13
|
-
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
14
|
-
warning: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
15
|
-
muted: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
16
|
-
dim: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
17
|
-
text: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
18
|
-
thinkingText: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
19
|
-
selectedBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
20
|
-
userMessageBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
21
|
-
userMessageText: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
22
|
-
customMessageBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
23
|
-
customMessageText: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
24
|
-
customMessageLabel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
25
|
-
toolPendingBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
26
|
-
toolSuccessBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
27
|
-
toolErrorBg: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
28
|
-
toolTitle: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
29
|
-
toolOutput: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
30
|
-
mdHeading: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
31
|
-
mdLink: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
32
|
-
mdLinkUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
33
|
-
mdCode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
34
|
-
mdCodeBlock: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
35
|
-
mdCodeBlockBorder: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
36
|
-
mdQuote: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
37
|
-
mdQuoteBorder: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
38
|
-
mdHr: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
39
|
-
mdListBullet: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
40
|
-
toolDiffAdded: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
41
|
-
toolDiffRemoved: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
42
|
-
toolDiffContext: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
43
|
-
syntaxComment: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
44
|
-
syntaxKeyword: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
45
|
-
syntaxFunction: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
46
|
-
syntaxVariable: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
47
|
-
syntaxString: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
48
|
-
syntaxNumber: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
49
|
-
syntaxType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
50
|
-
syntaxOperator: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
51
|
-
syntaxPunctuation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
52
|
-
thinkingOff: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
53
|
-
thinkingMinimal: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
54
|
-
thinkingLow: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
55
|
-
thinkingMedium: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
56
|
-
thinkingHigh: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
57
|
-
thinkingXhigh: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
58
|
-
bashMode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>;
|
|
59
|
-
}>;
|
|
60
|
-
export: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
61
|
-
pageBg: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>>;
|
|
62
|
-
cardBg: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>>;
|
|
63
|
-
infoBg: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TInteger]>>;
|
|
64
|
-
}>>;
|
|
65
|
-
}>;
|
|
66
|
-
export type ThemeJson = Static<typeof ThemeJsonSchema>;
|
|
67
2
|
export type ThemeColor = "accent" | "border" | "borderAccent" | "borderMuted" | "success" | "error" | "warning" | "muted" | "dim" | "text" | "thinkingText" | "userMessageText" | "customMessageText" | "customMessageLabel" | "toolTitle" | "toolOutput" | "mdHeading" | "mdLink" | "mdLinkUrl" | "mdCode" | "mdCodeBlock" | "mdCodeBlockBorder" | "mdQuote" | "mdQuoteBorder" | "mdHr" | "mdListBullet" | "toolDiffAdded" | "toolDiffRemoved" | "toolDiffContext" | "syntaxComment" | "syntaxKeyword" | "syntaxFunction" | "syntaxVariable" | "syntaxString" | "syntaxNumber" | "syntaxType" | "syntaxOperator" | "syntaxPunctuation" | "thinkingOff" | "thinkingMinimal" | "thinkingLow" | "thinkingMedium" | "thinkingHigh" | "thinkingXhigh" | "bashMode";
|
|
68
3
|
export type ThemeBg = "selectedBg" | "userMessageBg" | "customMessageBg" | "toolPendingBg" | "toolSuccessBg" | "toolErrorBg";
|
|
69
4
|
type ColorMode = "truecolor" | "256color";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/theme/theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/theme/theme.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,8 +4,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
4
4
|
import { TypeCompiler } from "@sinclair/typebox/compiler";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { highlightCode as nativeHighlightCode, supportsLanguage, } from "@gsd/native";
|
|
7
|
-
import { getCustomThemesDir } from "../../../config.js";
|
|
8
|
-
import { builtinThemes } from "./themes.js";
|
|
7
|
+
import { getCustomThemesDir, getThemesDir } from "../../../config.js";
|
|
9
8
|
// Issue #453: native preview highlighting can wedge the entire interactive
|
|
10
9
|
// session after a successful file tool. Keep the safer plain-text path as the
|
|
11
10
|
// default and allow native highlighting only as an explicit opt-in.
|
|
@@ -336,8 +335,18 @@ export class Theme {
|
|
|
336
335
|
// ============================================================================
|
|
337
336
|
// Theme Loading
|
|
338
337
|
// ============================================================================
|
|
338
|
+
let BUILTIN_THEMES;
|
|
339
339
|
function getBuiltinThemes() {
|
|
340
|
-
|
|
340
|
+
if (!BUILTIN_THEMES) {
|
|
341
|
+
const themesDir = getThemesDir();
|
|
342
|
+
const darkPath = path.join(themesDir, "dark.json");
|
|
343
|
+
const lightPath = path.join(themesDir, "light.json");
|
|
344
|
+
BUILTIN_THEMES = {
|
|
345
|
+
dark: JSON.parse(fs.readFileSync(darkPath, "utf-8")),
|
|
346
|
+
light: JSON.parse(fs.readFileSync(lightPath, "utf-8")),
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
return BUILTIN_THEMES;
|
|
341
350
|
}
|
|
342
351
|
export function getAvailableThemes() {
|
|
343
352
|
const themes = new Set(Object.keys(getBuiltinThemes()));
|
|
@@ -356,11 +365,12 @@ export function getAvailableThemes() {
|
|
|
356
365
|
return Array.from(themes).sort();
|
|
357
366
|
}
|
|
358
367
|
export function getAvailableThemesWithPaths() {
|
|
368
|
+
const themesDir = getThemesDir();
|
|
359
369
|
const customThemesDir = getCustomThemesDir();
|
|
360
370
|
const result = [];
|
|
361
|
-
// Built-in themes
|
|
371
|
+
// Built-in themes
|
|
362
372
|
for (const name of Object.keys(getBuiltinThemes())) {
|
|
363
|
-
result.push({ name, path:
|
|
373
|
+
result.push({ name, path: path.join(themesDir, `${name}.json`) });
|
|
364
374
|
}
|
|
365
375
|
// Custom themes
|
|
366
376
|
if (fs.existsSync(customThemesDir)) {
|
|
@@ -400,7 +410,7 @@ function parseThemeJson(label, json) {
|
|
|
400
410
|
errorMessage += "\nMissing required color tokens:\n";
|
|
401
411
|
errorMessage += missingColors.map((c) => ` - ${c}`).join("\n");
|
|
402
412
|
errorMessage += '\n\nPlease add these colors to your theme\'s "colors" object.';
|
|
403
|
-
errorMessage += "\nSee the built-in dark
|
|
413
|
+
errorMessage += "\nSee the built-in themes (dark.json, light.json) for reference values.";
|
|
404
414
|
}
|
|
405
415
|
if (otherErrors.length > 0) {
|
|
406
416
|
errorMessage += `\n\nOther errors:\n${otherErrors.join("\n")}`;
|