mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 13:03:42 +00:00
WIP: Add theming system with /theme command
- Consolidated theme system into single src/theme/ directory - Created Theme class with fg(), bg(), bold(), italic(), underline() - Added dark and light built-in themes with 36 color tokens - Support for custom themes in ~/.pi/agent/themes/*.json - JSON schema for theme validation - Theme selector UI with /theme command - Save theme preference to settings - Uses chalk for text formatting to preserve colors TODO: - Replace hardcoded colors throughout TUI components - Apply markdown theming to Markdown components - Add theme support to all TUI elements
This commit is contained in:
parent
93a60b7969
commit
cc88095140
13 changed files with 937 additions and 11 deletions
|
|
@ -79,7 +79,7 @@ Themes are defined in JSON files with the following structure:
|
|||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://pi.mariozechner.at/theme-schema.json",
|
||||
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json",
|
||||
"name": "my-theme",
|
||||
"vars": {
|
||||
"blue": "#0066cc",
|
||||
|
|
@ -194,7 +194,7 @@ Custom themes are loaded from `~/.pi/agent/themes/*.json`.
|
|||
3. **Define all colors:**
|
||||
```json
|
||||
{
|
||||
"$schema": "https://pi.mariozechner.at/theme-schema.json",
|
||||
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json",
|
||||
"name": "my-theme",
|
||||
"vars": {
|
||||
"primary": "#00aaff",
|
||||
|
|
@ -370,13 +370,13 @@ Error loading theme 'my-theme':
|
|||
|
||||
For editor support, the JSON schema is available at:
|
||||
```
|
||||
https://pi.mariozechner.at/theme-schema.json
|
||||
https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json
|
||||
```
|
||||
|
||||
Add to your theme file for auto-completion and validation:
|
||||
```json
|
||||
{
|
||||
"$schema": "https://pi.mariozechner.at/theme-schema.json",
|
||||
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue