Repository navigation
feat(tools): map VS Code inline code and code block colors to Orca chat tokens - #78
Merged
Merged
Conversation
…at tokens Maps textPreformat.background/foreground and textCodeBlock.background to the chat theme tokens from stablyai/orca#39432, and finds Orca's schema loader and terminal theme module at their current paths.
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
stablyai/orca#39432 adds public chat theme tokens. This PR maps the three that have a matching VS Code workbench key:
--chat-inline-codetextPreformat.background--chat-inline-code-foregroundtextPreformat.foreground--chat-code-blocktextCodeBlock.background--chat-inline-codeand--chat-code-blockkeep their alpha, because Orca accepts them translucent and checks them as painted over the chat.--chat-bold-foreground,--chat-muted-foregroundand--chat-selection*have no VS Code key that fits chat, so Orca derives them.It also fixes the converter against current Orca.
orca-schema.mjslooked forconfig/scripts/plugin-schema-module-loader.mjsandsrc/shared/terminal-custom-themes.ts, which Orca has since moved into per-area folders. With current Orca asORCA_DIR, the real-gate test failed with "not an Orca checkout". Both new paths are tried first, falling back to the old ones.With an older
ORCA_DIRthe new rows are skipped, as for every token that Orca version doesn't know.Validation
ORCA_DIR=<orca at stablyai/orca#39432> node --test tools/import-vscode-theme/import-vscode-theme.test.mjs: 9 of 9 pass. The real-gate test now setstextPreformat.*andtextCodeBlock.backgroundon a Dark+-like palette and asserts that all three chat tokens survive Orca's own contrast check.ORCA_DIR: 8 pass, and the real-gate test is skipped.descriptionForegroundkeeps its code block. The final Orca gate never drops a code block because of a derived muted color.Not for merge until stablyai/orca#39432 lands.