Custom theme support#226
Conversation
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe to merge; the custom theme feature is well-tested and the wiring through config resolution, bootstrap, and UI is consistent. Two edge cases in the changed paths are worth watching: the greedy regex in normalizeGitNoIndexPrefixes can misparse diff --git headers for filenames that contain src/core/loaders.ts (regex robustness for --no-index paths) and src/core/config.ts (missing validation when theme=custom has no accompanying custom_theme section). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[config.toml: theme = custom] --> B[resolveConfiguredCliInput]
B --> C[readCustomTheme global config]
B --> D[readCustomTheme repo config]
C --> E[mergeCustomTheme]
D --> E
E -->|CustomThemeConfig| F[loadAppBootstrap]
F -->|AppBootstrap.customTheme| G[App.tsx]
G --> H[resolveTheme themeId customTheme]
H -->|theme=custom + config present| I[buildCustomTheme]
I --> J[builtInThemeById base]
J --> K[Merge palette overrides]
K --> L[withLazySyntaxStyle merged syntax]
L --> M[activeTheme]
G --> N[availableThemes customTheme]
N -->|append custom entry| O[themeOptions for cycle and menus]
P[git diff --no-index patch] --> Q[normalizeGitNoIndexPrefixes]
Q -->|1/ to a/ 2/ to b/| R[normalizePatchChangeset]
R --> S[parsePatchFiles]
|
theme = "custom"support so Hunk can read theme colors from config.toml.git diff --no-indexpatch prefixes so colorized pager and patch input still parse correctly.