@kolisachint/hoocode-agent 0.5.4 → 0.5.5
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/CHANGELOG.md +33 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +2 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/theme/colorsafe-dark.json +96 -0
- package/dist/modes/interactive/theme/colorsafe-light.json +96 -0
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/high-contrast-dark.json +100 -0
- package/dist/modes/interactive/theme/high-contrast-light.json +97 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +4 -0
- package/dist/modes/interactive/theme/theme.d.ts +6 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +70 -8
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/theme/warm-dark.json +98 -0
- package/dist/modes/interactive/theme/warm-light.json +96 -0
- package/docs/themes.md +57 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
package/docs/themes.md
CHANGED
|
@@ -7,6 +7,7 @@ Themes are JSON files that define colors for the TUI.
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
9
|
- [Locations](#locations)
|
|
10
|
+
- [Built-in Themes](#built-in-themes)
|
|
10
11
|
- [Selecting a Theme](#selecting-a-theme)
|
|
11
12
|
- [Creating a Custom Theme](#creating-a-custom-theme)
|
|
12
13
|
- [Theme Format](#theme-format)
|
|
@@ -18,7 +19,7 @@ Themes are JSON files that define colors for the TUI.
|
|
|
18
19
|
|
|
19
20
|
HooCode loads themes from:
|
|
20
21
|
|
|
21
|
-
- Built-in: `
|
|
22
|
+
- Built-in: every `*.json` in the shipped theme directory (see [Built-in Themes](#built-in-themes))
|
|
22
23
|
- Global: `~/.hoocode/agent/themes/*.json`
|
|
23
24
|
- Project: `.hoocode/themes/*.json`
|
|
24
25
|
- Packages: `themes/` directories or `pi.themes` entries in `package.json`
|
|
@@ -27,6 +28,39 @@ HooCode loads themes from:
|
|
|
27
28
|
|
|
28
29
|
Disable discovery with `--no-themes`.
|
|
29
30
|
|
|
31
|
+
## Built-in Themes
|
|
32
|
+
|
|
33
|
+
| Theme | Background | Notes |
|
|
34
|
+
|-------|------------|-------|
|
|
35
|
+
| `dark` | dark | Default dark theme |
|
|
36
|
+
| `light` | light | Default light theme |
|
|
37
|
+
| `high-contrast-dark` | black | Maximum contrast, bright saturated hues |
|
|
38
|
+
| `high-contrast-light` | white | Maximum contrast, deep saturated hues |
|
|
39
|
+
| `warm-dark` | warm near-black | Low-glare amber/sand palette, no harsh blues |
|
|
40
|
+
| `warm-light` | warm paper | Dark ink on cream, less glare than pure white |
|
|
41
|
+
| `colorsafe-dark` | dark | Okabe-Ito hues, no red/green pairs |
|
|
42
|
+
| `colorsafe-light` | white | Okabe-Ito hues, no red/green pairs |
|
|
43
|
+
|
|
44
|
+
The six themes after `dark`/`light` are built for low vision. Every color they
|
|
45
|
+
draw clears **WCAG AAA (7:1)** against every surface the TUI paints behind it —
|
|
46
|
+
the page, selected rows, user messages, and all three tool-box states — and none
|
|
47
|
+
of them defer to the terminal's default foreground, so contrast does not depend
|
|
48
|
+
on your terminal's own palette. `test/theme-contrast.test.ts` enforces this, so
|
|
49
|
+
a future edit cannot quietly wash one of them out.
|
|
50
|
+
|
|
51
|
+
Picking between them:
|
|
52
|
+
|
|
53
|
+
- **Contrast above all** → `high-contrast-dark` / `high-contrast-light`.
|
|
54
|
+
- **Bright screens hurt, or you read for long stretches** → `warm-dark` /
|
|
55
|
+
`warm-light`. Same 7:1 floor, warmer and less glaring.
|
|
56
|
+
- **Red/green are hard to tell apart** → `colorsafe-dark` / `colorsafe-light`.
|
|
57
|
+
Success and error are teal and orange, and no pair of tokens relies on a
|
|
58
|
+
red-versus-green distinction.
|
|
59
|
+
|
|
60
|
+
Set the matching terminal background for the theme you pick (black-ish for the
|
|
61
|
+
dark themes, white-ish for the light ones) — hoocode colors the text, but the
|
|
62
|
+
canvas behind it belongs to your terminal.
|
|
63
|
+
|
|
30
64
|
## Selecting a Theme
|
|
31
65
|
|
|
32
66
|
Select a theme via `/settings` or in `settings.json`:
|
|
@@ -124,6 +158,7 @@ vim ~/.hoocode/agent/themes/my-theme.json
|
|
|
124
158
|
{
|
|
125
159
|
"$schema": "https://raw.githubusercontent.com/kolisachint/hoocode/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
126
160
|
"name": "my-theme",
|
|
161
|
+
"description": "One line shown next to the name in the theme picker",
|
|
127
162
|
"vars": {
|
|
128
163
|
"blue": "#0066cc",
|
|
129
164
|
"gray": 242
|
|
@@ -138,6 +173,7 @@ vim ~/.hoocode/agent/themes/my-theme.json
|
|
|
138
173
|
```
|
|
139
174
|
|
|
140
175
|
- `name` is required and must be unique.
|
|
176
|
+
- `description` is optional. `/settings` shows it beside the theme name.
|
|
141
177
|
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
142
178
|
- `colors` must define all 51 required tokens.
|
|
143
179
|
|
|
@@ -280,7 +316,14 @@ echo $COLORTERM # Should output "truecolor" or "24bit"
|
|
|
280
316
|
|
|
281
317
|
**Dark terminals:** Use bright, saturated colors with higher contrast.
|
|
282
318
|
|
|
283
|
-
**Light terminals:** Use
|
|
319
|
+
**Light terminals:** Use dark, saturated colors. Muting them costs contrast; if
|
|
320
|
+
you want a softer look, warm the background rather than lightening the text.
|
|
321
|
+
|
|
322
|
+
**Contrast:** Aim for 4.5:1 against your terminal background, or 7:1 if the
|
|
323
|
+
theme has to stay readable for low vision. Check every token against the
|
|
324
|
+
selected-row and tool-box backgrounds too, not just the page — those are where
|
|
325
|
+
themes usually lose contrast. `test/theme-contrast.test.ts` shows how the
|
|
326
|
+
built-in accessible themes are verified.
|
|
284
327
|
|
|
285
328
|
**Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
|
|
286
329
|
|
|
@@ -293,3 +336,15 @@ echo $COLORTERM # Should output "truecolor" or "24bit"
|
|
|
293
336
|
See the built-in themes:
|
|
294
337
|
- [dark.json](../src/modes/interactive/theme/dark.json)
|
|
295
338
|
- [light.json](../src/modes/interactive/theme/light.json)
|
|
339
|
+
- [high-contrast-dark.json](../src/modes/interactive/theme/high-contrast-dark.json)
|
|
340
|
+
- [high-contrast-light.json](../src/modes/interactive/theme/high-contrast-light.json)
|
|
341
|
+
- [warm-dark.json](../src/modes/interactive/theme/warm-dark.json)
|
|
342
|
+
- [warm-light.json](../src/modes/interactive/theme/warm-light.json)
|
|
343
|
+
- [colorsafe-dark.json](../src/modes/interactive/theme/colorsafe-dark.json)
|
|
344
|
+
- [colorsafe-light.json](../src/modes/interactive/theme/colorsafe-light.json)
|
|
345
|
+
|
|
346
|
+
Preview any of them, with per-token contrast ratios:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
npx tsx test/test-theme-colors.ts theme warm-dark
|
|
350
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolisachint/hoocode-agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"hoocodeConfig": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"prepublishOnly": "npm run clean && npm run build"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kolisachint/hoocode-agent-core": "^0.5.
|
|
53
|
-
"@kolisachint/hoocode-ai": "^0.5.
|
|
54
|
-
"@kolisachint/hoocode-tui": "^0.5.
|
|
52
|
+
"@kolisachint/hoocode-agent-core": "^0.5.5",
|
|
53
|
+
"@kolisachint/hoocode-ai": "^0.5.5",
|
|
54
|
+
"@kolisachint/hoocode-tui": "^0.5.5",
|
|
55
55
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
56
56
|
"chalk": "^5.5.0",
|
|
57
57
|
"cli-highlight": "^2.1.11",
|