davsclaus opened a new pull request, #26547: URL: https://github.com/apache/camel/pull/26547
## Turbo Pascal theme Adds a `turbo-pascal` theme to the Camel TUI that recreates Borland's IDE: yellow text on the blue editor field, cyan window frames, grey menu bar and a yellow selection bar. The palette is adapted from the [Omarchy Turbo Pascal theme](https://github.com/AlexZeitler/omarchy-turbo-pascal-theme) by Alexander Zeitler (MIT), credited in the stylesheet header. Two of its design choices are kept: every frame is drawn in the one frame colour (cyan when focused, grey when not), the way Turbo Vision did, and the status colours are the softened pastel set rather than strict CGA so they stay readable on a modern terminal. ``` camel tui --theme=turbo-pascal ``` ## Optional syntax tokens Until now the Source tab and the fenced code blocks in AI answers used a fixed Monokai palette on every dark theme and a GitHub-inspired palette on every light theme. That would have put Monokai pink keywords on Borland blue. Themes can now define optional `syntax-comment`, `syntax-string`, `syntax-keyword`, `syntax-function`, `syntax-type`, `syntax-constant` and `syntax-text` tokens. `Theme` exposes them as `syntaxComment()` etc., and both `SyntaxHighlighter` and the markdown `SyntaxTheme` read them, so the two stay in agreement. Themes that omit the tokens keep exactly the palette they had before. Turbo Pascal uses them for the editor's three-colour look: reserved words white, code yellow, comments grey, strings cyan. Resolved colours are now cached per token, the same way styles already were, because the highlighter asks for them per token per line. The cache is cleared on every theme switch and preview, like the style cache. Giving the other built-in themes their own code palette is tracked separately in [CAMEL-24793](https://issues.apache.org/jira/browse/CAMEL-24793), theme by theme and only where code stays readable. ## Docs - The user manual said the TUI ships 15 themes while 20 did. It now lists all 21 including the light variants, and explains which themes trade the brand accent for their own identity. - `theme.md` documents the optional syntax tokens, adds a design note on when to use them, and adds the five themes that were missing from its built-in table. ## Testing - `ThemeTest`: fallback to Monokai/light when a theme has no syntax tokens, Turbo Pascal overrides, colours following preview/revert, and the Turbo Pascal palette tokens. - `ThemeModeTest` and `ThemeModeCompletionCandidatesTest` updated for the new id and cycle order. - Verified live in a running TUI over MCP: Overview renders in the palette, and a YAML route in the Source tab shows white keys, cyan values, yellow separators, cyan focused frame and grey unfocused frames. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
