Repository navigation
[Feature] TUI: support custom themes (or per-color overrides); warn when a theme name is unknown #4054
jmac-cornelis
started this conversation in
Feature requests
Replies: 1 comment
|
Confirmed on main (ad16133). The TUI never reads a theme file:
TS v0.9.8 loaded custom themes in the TUI from A small fix would have the TUI resolve a non-built-in name against |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Version: 0.10.2 (also checked 0.10.3), linux-x64, Rust build
Terminal: Ghostty,
COLORTERM=truecolorWhat I'm trying to do
Change one color in the TUI, for example
syntaxKeywordin the built-inlighttheme. I want to keep everything else the same.What happens
The TUI can't load any theme except the three built-in ones. If
settings.jsonnames anything else, the TUI silently falls back toprime.The help text suggests custom themes should work:
--theme <path> Load a theme (repeatable)/--no-themes Disable theme discoverythemessetting key/reload: "Reload keybindings, skills, prompts, and themes"prime-agent package: "Packages can provide skills, prompts, and themes."Steps to reproduce
lighttheme JSON exactly, changing only"name"to"light2", and save it aslight2.json."theme": "light2"insettings.json.prime-agent --theme /path/light2.json"themes": ["/path/light2.json"]in settings"themes": ["/path/dir"]in settings<agent dir>/themes/light2.json~/.prime/agent/themes/light2.json<project>/.prime/themes/light2.jsonExpected: the TUI looks the same as with
light.Actual: it renders with the
primetheme."theme": "doesnotexist"gives the same result.I checked this by running the TUI in a pseudo-terminal and comparing the 24-bit colors it outputs.
light,darkandprimeeach produce their own distinct colors. Every custom-theme setup above produced exactly theprimecolors.Likely cause
Based on the symbol names in the shipped binary,
pa_tui::app::load_themeonly checks the name againstdark,lightandprime. Anything else becomesprime, and the JSON comes frompa_tui::theme::builtin_theme_json. It never reads a file. The only theme-file loader I found ispa_core::export_html::theme::load_theme_jsons, so--themeandthemesseem to apply only to HTML export.Request
--theme, thethemessetting, and the theme-discovery directories. This would make the TUI match the help text and HTML export.prime. Right now a typo or a custom theme looks like it "worked" but the whole color scheme changes.Thanks!
All reactions