feat(theme): add customizable theme system with live switching#548
Merged
feat(theme): add customizable theme system with live switching#548
Conversation
Add comprehensive theme support for the TUI with real-time theme switching: Core: - Add ThemeConfig struct with serde support for persistence - Define 4 built-in themes: dark, light, ocean_dark, monokai - Add ThemeColors with from_name() lookup and available_themes() list - Add MarkdownTheme variants for each theme with full color customization TUI: - Add ThemeSelectorModal for interactive theme selection - Add 'Change Theme' command to command palette (Settings category) - Extend AdaptiveColors with theme support methods - Add theme state to AppState with set_theme() method Integration: - Update rendering pipeline to use theme from state - Add themed markdown rendering for conversation display - Persist last selected theme to config file - Load saved theme preference on app startup
d14ffb6 to
d60bd2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive theme support for the TUI with real-time theme switching capability.
Changes
Core Theme System
ThemeConfigstruct with serde support for persistenceThemeColorswithfrom_name()lookup andavailable_themes()listMarkdownThemevariants for each theme with full color customizationTUI Integration
ThemeSelectorModalfor interactive theme selectionAdaptiveColorswith theme support methodsAppStatewithset_theme()methodUser Experience
Files Changed
src/cortex-core/src/markdown/theme.rs- MarkdownTheme variantssrc/cortex-core/src/style.rs- ThemeColors definitionssrc/cortex-tui/src/modal/theme.rs- ThemeSelectorModalsrc/cortex-tui/src/ui/colors.rs- AdaptiveColors theme supportTesting
cargo check