Skip to content

feat(tools): map VS Code inline code and code block colors to Orca chat tokens - #78

Merged
nwparker merged 2 commits into
mainfrom
nwparker/chat-text-tokens
Nov 7, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/chat-text-tokens

Conversation

@nwparker

@nwparker nwparker commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

stablyai/orca#39432 adds public chat theme tokens. This PR maps the three that have a matching VS Code workbench key:

Orca token VS Code key
--chat-inline-code textPreformat.background
--chat-inline-code-foreground textPreformat.foreground
--chat-code-block textCodeBlock.background

--chat-inline-code and --chat-code-block keep their alpha, because Orca accepts them translucent and checks them as painted over the chat. --chat-bold-foreground, --chat-muted-foreground and --chat-selection* have no VS Code key that fits chat, so Orca derives them.

It also fixes the converter against current Orca. orca-schema.mjs looked for config/scripts/plugin-schema-module-loader.mjs and src/shared/terminal-custom-themes.ts, which Orca has since moved into per-area folders. With current Orca as ORCA_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_DIR the 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 sets textPreformat.* and textCodeBlock.background on a Dark+-like palette and asserts that all three chat tokens survive Orca's own contrast check.
  • Without ORCA_DIR: 8 pass, and the real-gate test is skipped.
  • A Dark+-like theme with a dim descriptionForeground keeps 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.

…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.
@nwparker
nwparker merged commit c2ff788 into main Nov 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant