Files
codewhale/crates/tui
laoye_tchs 7bf63ea654 Add Catppuccin/Tokyo Night/Dracula/Gruvbox themes + /theme picker
Wires the previously-dormant `theme` setting (#657 follow-up) into the
live Settings struct so the choice survives restart. `/theme` opens an
interactive picker with live preview; `/theme <name>` switches and
persists non-interactively.

Most render sites use bare `palette::TEXT_BODY` / `DEEPSEEK_INK` /
`BORDER_COLOR` constants rather than reading `app.ui_theme`, so simply
adding new UiTheme variants only repaints ~20% of surfaces. The fix is
a third stage in ColorCompatBackend (alongside the existing dark<->light
and truecolor<->256 stages) that rewrites every well-known dark-palette
constant to the corresponding UiTheme slot for the active preset. The
remap is a no-op for System / Whale / WhaleLight, so legacy dark/light
flows stay byte-identical.

Settings: theme = system | dark | light | catppuccin-mocha |
tokyo-night | dracula | gruvbox-dark. Unknown values normalise to
system. background_color still overlays on top.

Tests: new coverage in theme_picker and palette; pinned make_app() in
footer tests to ThemeId::System after App::new (matching the existing
default_model pin) since App::new now honors settings.theme.
2026-05-12 22:24:52 +08:00
..
2026-05-12 02:21:19 -05:00