Skip to content

Commit c4a4f54

Browse files
author
log0u7
committed
feat(tui): transparent theme, fix quota tui path
Custom theme transparent: builtin opencode base with opacity ladder - background none, panels/elements/diffs #RRGGBBAA 70/75/90%, text and borders opaque. VTE (Guake) ignores alpha so rungs render as builtin grays: readable, base transparent. tui.json: quota plugin path was dead since the forks move (/home/logout/opencode-quota -> ~/projets/github/logout/...); the quota sidebar renderer was silently not loading. quota-toast: opencode-go off (PR anomalyco#248 not merged upstream). CHANGELOG: quota back on fork dist, npm 4.9.0 shipped 3 days before its fix (PR anomalyco#245) merged.
1 parent 906d727 commit c4a4f54

4 files changed

Lines changed: 262 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- Added custom theme `transparent` (`~/.config/opencode/themes/transparent.json`, selected in `tui.json`): builtin `opencode` base (48 theme keys, no per-key merge with defaults in `resolveTheme`) with an opacity ladder - `background` `"none"` (true transparent), panels/elements/menu `#RRGGBBAA` at 70/75/90% alpha, diff backgrounds tinted semi-transparent, all text/border/syntax colors opaque. Terminal note: per-cell alpha blending only in kitty/ghostty/wezterm/foot; Guake (VTE) ignores alpha so ladder rungs render as their opaque RGB (same grays as builtin, readability preserved, base zone transparent via Guake window transparency)
13+
- `tui.json`: fixed dead quota TUI plugin path left over from the forks move (`/home/logout/opencode-quota/dist/tui.js` -> `~/projets/github/logout/opencode-quota/dist/tui.js`) - the quota sidebar renderer was silently not loading
14+
15+
- `opencode.json`: quota plugin switched back to the local fork dist (`~/projets/github/logout/opencode-quota/dist/index.js`, v4.8.2 + free-tier fix) - npm `@slkiser/opencode-quota` 4.9.0 (latest, published 2026-09-06) shipped 3 days BEFORE the merged fix (PR #245, 2026-09-09), so its `parseOpenRouterKeyV1` still rejects `limit_remaining: null` (key with no configured limit) -> provider "unavailable" -> empty sidebar panel. Verified live: 4.9.0 fetch returns "Invalid openrouter-key-v1 response", key resolution fine (auth.json), API 200 with `limit: null` / `limit_remaining: null`. Re-switch to npm once a release carries the fix; npm plugin cache (`~/.cache/opencode/packages/@slkiser/opencode-quota@latest/`, pinned 4.8.2) purged meanwhile; fork repo kept in `~/projets/github/logout/opencode-quota` for future fixes; `opencode-quota/quota-toast.jsonc` `enabledProviders` kept at `["openrouter"]` (the `opencode-go` live-test of the fork's 403 silent-skip patch is moot: PR #248 not merged, no subscription -> 403 toasts on every idle)
16+
- opencode-damage-control: local dist rebuilt from HEAD - the deployed `dist/` was built 2026-08-30 16:47 and missed the final fix commit 90cc305 (16:52, "match path protection against actual write/delete targets": `shellWriteTargets`/`shellDeleteTargets`/`tokenizeCommand`), so the running plugin lacked the fix; rebuilt with the AGENTS.md docker recipe (`npm ci && npm run build` as uid:gid, `node:22` image removed afterward). Upstream still stale (npm 1.5.0, 2026-03) so the local fork dist stays in `opencode.json`
17+
1218
- AGENTS.md compressed to caveman format (wording only, every section and rule kept): 1607 -> 1400 words, 11209 -> 10120 chars. All 33 MUST/MUST NOT, all headings, bullet count and the docker recipe byte-identical; validator from the `caveman-compress` skill passed. Original backed up to `~/.local/share/caveman-compress/backups/opencode/AGENTS.original.md`
1319

1420
- Fixed 2 dead local plugin paths in `opencode.json` (`opencode-quota`, `opencode-damage-control`): stale `/home/logout/` roots replaced by the canonical fork location `~/projets/github/logout/<repo>/dist/index.js`. Both plugins were silently not loading

‎opencode-quota/quota-toast.jsonc‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// Re-add "opencode-go" once subscribed. Context: draft-issue-opencode-go-403.md
1515
// in the opencode-quota fork.
1616
// anthropic/openai disabled as quota sources: providers disabled in opencode.json.
17-
// "opencode-go" re-enabled for live-testing the local fork patch
18-
// (test/opencode-go-403, silent-skip on 403 EntitlementError).
19-
"enabledProviders": ["openrouter", "opencode-go"]
17+
// "opencode-go" stays off: no subscription, and the 403 silent-skip patch
18+
// (PR #248) is NOT in the npm package (not merged upstream) - re-enable
19+
// once subscribed or once the PR lands in a release.
20+
"enabledProviders": ["openrouter"]
2021
}

‎themes/transparent.json‎

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
{
2+
"$schema": "https://opencode.ai/theme.json",
3+
"defs": {
4+
"darkStep1": "#0a0a0a",
5+
"darkStep2": "#141414",
6+
"darkStep3": "#1e1e1e",
7+
"darkStep4": "#282828",
8+
"darkStep5": "#323232",
9+
"darkStep6": "#3c3c3c",
10+
"darkStep7": "#484848",
11+
"darkStep8": "#606060",
12+
"darkStep9": "#fab283",
13+
"darkStep10": "#ffc09f",
14+
"darkStep11": "#808080",
15+
"darkStep12": "#eeeeee",
16+
"darkSecondary": "#5c9cf5",
17+
"darkAccent": "#9d7cd8",
18+
"darkRed": "#e06c75",
19+
"darkOrange": "#f5a742",
20+
"darkGreen": "#7fd88f",
21+
"darkCyan": "#56b6c2",
22+
"darkYellow": "#e5c07b",
23+
"lightStep1": "#ffffff",
24+
"lightStep2": "#fafafa",
25+
"lightStep3": "#f5f5f5",
26+
"lightStep4": "#ebebeb",
27+
"lightStep5": "#e1e1e1",
28+
"lightStep6": "#d4d4d4",
29+
"lightStep7": "#b8b8b8",
30+
"lightStep8": "#a0a0a0",
31+
"lightStep9": "#3b7dd8",
32+
"lightStep10": "#2968c3",
33+
"lightStep11": "#8a8a8a",
34+
"lightStep12": "#1a1a1a",
35+
"lightSecondary": "#7b5bb6",
36+
"lightAccent": "#d68c27",
37+
"lightRed": "#d1383d",
38+
"lightOrange": "#d68c27",
39+
"lightGreen": "#3d9a57",
40+
"lightCyan": "#318795",
41+
"lightYellow": "#b0851f"
42+
},
43+
"theme": {
44+
"primary": {
45+
"dark": "darkStep9",
46+
"light": "lightStep9"
47+
},
48+
"secondary": {
49+
"dark": "darkSecondary",
50+
"light": "lightSecondary"
51+
},
52+
"accent": {
53+
"dark": "darkAccent",
54+
"light": "lightAccent"
55+
},
56+
"error": {
57+
"dark": "darkRed",
58+
"light": "lightRed"
59+
},
60+
"warning": {
61+
"dark": "darkOrange",
62+
"light": "lightOrange"
63+
},
64+
"success": {
65+
"dark": "darkGreen",
66+
"light": "lightGreen"
67+
},
68+
"info": {
69+
"dark": "darkCyan",
70+
"light": "lightCyan"
71+
},
72+
"text": {
73+
"dark": "darkStep12",
74+
"light": "lightStep12"
75+
},
76+
"textMuted": {
77+
"dark": "darkStep11",
78+
"light": "lightStep11"
79+
},
80+
"background": "none",
81+
"backgroundPanel": {
82+
"dark": "#141414B3",
83+
"light": "#ffffffB3"
84+
},
85+
"backgroundElement": {
86+
"dark": "#1e1e1EC0",
87+
"light": "#fafafaC0"
88+
},
89+
"border": {
90+
"dark": "darkStep7",
91+
"light": "lightStep7"
92+
},
93+
"borderActive": {
94+
"dark": "darkStep8",
95+
"light": "lightStep8"
96+
},
97+
"borderSubtle": {
98+
"dark": "darkStep6",
99+
"light": "lightStep6"
100+
},
101+
"diffAdded": {
102+
"dark": "#4fd6be",
103+
"light": "#1e725c"
104+
},
105+
"diffRemoved": {
106+
"dark": "#c53b53",
107+
"light": "#c53b53"
108+
},
109+
"diffContext": {
110+
"dark": "#828bb8",
111+
"light": "#7086b5"
112+
},
113+
"diffHunkHeader": {
114+
"dark": "#828bb8",
115+
"light": "#7086b5"
116+
},
117+
"diffHighlightAdded": {
118+
"dark": "#b8db87",
119+
"light": "#4db380"
120+
},
121+
"diffHighlightRemoved": {
122+
"dark": "#e26a75",
123+
"light": "#f52a65"
124+
},
125+
"diffAddedBg": {
126+
"dark": "#20303bB3",
127+
"light": "#d5e5d5CC"
128+
},
129+
"diffRemovedBg": {
130+
"dark": "#37222cB3",
131+
"light": "#f7d8dbCC"
132+
},
133+
"diffContextBg": {
134+
"dark": "#141414A6",
135+
"light": "#fafafaA6"
136+
},
137+
"diffLineNumber": {
138+
"dark": "#8f8f8f",
139+
"light": "#595959"
140+
},
141+
"diffAddedLineNumberBg": {
142+
"dark": "#1b2b34B3",
143+
"light": "#c5d5c5CC"
144+
},
145+
"diffRemovedLineNumberBg": {
146+
"dark": "#2d1f26B3",
147+
"light": "#e7c8cbCC"
148+
},
149+
"markdownText": {
150+
"dark": "darkStep12",
151+
"light": "lightStep12"
152+
},
153+
"markdownHeading": {
154+
"dark": "darkAccent",
155+
"light": "lightAccent"
156+
},
157+
"markdownLink": {
158+
"dark": "darkStep9",
159+
"light": "lightStep9"
160+
},
161+
"markdownLinkText": {
162+
"dark": "darkCyan",
163+
"light": "lightCyan"
164+
},
165+
"markdownCode": {
166+
"dark": "darkGreen",
167+
"light": "lightGreen"
168+
},
169+
"markdownBlockQuote": {
170+
"dark": "darkYellow",
171+
"light": "lightYellow"
172+
},
173+
"markdownEmph": {
174+
"dark": "darkYellow",
175+
"light": "lightYellow"
176+
},
177+
"markdownStrong": {
178+
"dark": "darkOrange",
179+
"light": "lightOrange"
180+
},
181+
"markdownHorizontalRule": {
182+
"dark": "darkStep11",
183+
"light": "lightStep11"
184+
},
185+
"markdownListItem": {
186+
"dark": "darkStep9",
187+
"light": "lightStep9"
188+
},
189+
"markdownListEnumeration": {
190+
"dark": "darkCyan",
191+
"light": "lightCyan"
192+
},
193+
"markdownImage": {
194+
"dark": "darkStep9",
195+
"light": "lightStep9"
196+
},
197+
"markdownImageText": {
198+
"dark": "darkCyan",
199+
"light": "lightCyan"
200+
},
201+
"markdownCodeBlock": {
202+
"dark": "darkStep12",
203+
"light": "lightStep12"
204+
},
205+
"syntaxComment": {
206+
"dark": "darkStep11",
207+
"light": "lightStep11"
208+
},
209+
"syntaxKeyword": {
210+
"dark": "darkAccent",
211+
"light": "lightAccent"
212+
},
213+
"syntaxFunction": {
214+
"dark": "darkStep9",
215+
"light": "lightStep9"
216+
},
217+
"syntaxVariable": {
218+
"dark": "darkRed",
219+
"light": "lightRed"
220+
},
221+
"syntaxString": {
222+
"dark": "darkGreen",
223+
"light": "lightGreen"
224+
},
225+
"syntaxNumber": {
226+
"dark": "darkOrange",
227+
"light": "lightOrange"
228+
},
229+
"syntaxType": {
230+
"dark": "darkYellow",
231+
"light": "lightYellow"
232+
},
233+
"syntaxOperator": {
234+
"dark": "darkCyan",
235+
"light": "lightCyan"
236+
},
237+
"syntaxPunctuation": {
238+
"dark": "darkStep12",
239+
"light": "lightStep12"
240+
},
241+
"backgroundMenu": {
242+
"dark": "#141414E6",
243+
"light": "#ffffffE6"
244+
},
245+
"selectedListItemText": {
246+
"dark": "darkStep12",
247+
"light": "lightStep12"
248+
}
249+
}
250+
}

‎tui.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"$schema": "https://opencode.ai/tui.json",
3-
"plugin": ["/home/logout/opencode-quota/dist/tui.js"]
3+
"theme": "transparent",
4+
"plugin": ["~/projets/github/logout/opencode-quota/dist/tui.js"]
45
}

0 commit comments

Comments
 (0)