Skip to content

feat(native-chat): highlight code blocks and shell commands - #26343

Merged
brennanb2025 merged 6 commits into
stablyai:mainfrom
AmoabaKelvin:native-chat-syntax-highlighting
Oct 9, 2026
Merged

brennanb2025 merged 6 commits into
stablyai:mainfrom
AmoabaKelvin:native-chat-syntax-highlighting

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​240 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​239
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​591 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​582

Original work by @AmoabaKelvin. Updated by Brennan's team, with Kelvin's streaming design kept: the highlighting now goes through a small shared interface, and the review findings are fixed (details below).

ELI5

Code in the chat used to be one flat colour. Now it is coloured the way VS Code colours it, and it colours in place while the agent is still writing it. When you open a shortened shell command on a tool row, the full command is coloured in the language of the shell it actually ran in (PowerShell, cmd, bash), or left plain when Orca can't tell.

What Changed

Before: fenced code blocks in agent replies, and the full command you open on a "Ran …" tool row, were one plain colour.

After (what you see):

  • A fenced block with a known language is coloured with VS Code's Light+ or Dark+ palette, following the app's light/dark setting. Switching themes recolours instantly.
  • While a reply streams, its text stays visible the whole time and is coloured in place as lines arrive. The first block in a new language can show plain for a moment while its grammar loads; after that it paints coloured immediately.
  • Vue templates are coloured inside {{ }} and directive values (:title="…"), on one line or several.
  • Opening a shortened command on a tool row shows it coloured as PowerShell, cmd or bash, depending on the shell it ran in. Unknown shell: plain text.
  • Unchanged: blocks with no language or an unknown language, reasoning text and system rows stay plain. The command shown on the collapsed tool row and in the running tool-run header are not coloured (only the opened full command is). Text, selection, copy and line endings are exactly the source.

How it works:

  • One shared highlighting interface in src/renderer/src/lib/syntax-highlighting/: give it code, a language and the state it returned last time; it returns coloured lines (a light and a dark colour plus formatting per token), a state to continue from, and an outcome: ok, degraded, or failed. Loading a language reports ready, unsupported or failed.
  • It is built on Shiki's core, but runs on the Oniguruma regex engine (WASM) Orca already ships for the editor's Nim and Typst grammars. The loader for that WASM moved into the shared folder and is used by both, so there is one copy and one instance. Grammars come from Shiki's bundled catalogue (the same TextMate grammars VS Code uses) and load lazily per language.
  • Limits that show up as an outcome, not silent errors. A line over 1,000 characters, or one that hits TextMate's per-line time limit (50 ms, retried twice because the first lines through a grammar also compile its regexes), makes the block degraded: that line and everything after it in the block stay plain, instead of continuing from a state that might be wrong. Shiki's high-level API doesn't report a timed-out line, so the interface tokenizes line by line through the grammar's own tokenizeLine2, which does.
  • Load failures retry: a block that is still on screen asks again as its text changes, at most 3 attempts with a 2-second pause between them, then stays plain.
  • Chat keeps Kelvin's streaming design: finished lines are reused, a growing block resumes from the last finished line, lines render one by one, and work is time-sliced. All blocks now share one 6 ms slice per task instead of 6 ms each, taking turns so a long block can't starve the others.
  • Cache limits count bytes, including the source text in each key (previously only tokens were counted while each key held up to 50 KB of source). Unknown fence labels are kept in a capped table.
  • Shell grammar from the shell the command ran in: a tool named after its shell (Claude's Bash, PowerShell) wins; otherwise the shell program the agent wrapped the command in (zsh -lc, bash -lc, powershell.exe -Command, pwsh, cmd /c, wsl.exe). This uses data the row already has; nothing new crosses the wire. It is not based on the host's operating system.
  • Vue fix: Vue's template grammars inject into source.vue, but the Vue grammar's root scope is text.html.vue, so stock Shiki never applied them. They are now added to the Vue grammar's own injections, which also works when another grammar (Markdown) referenced Vue before Vue loaded.

Why

  • One engine, one grammar source, one palette with the editor. The editor already runs TextMate grammars on this Oniguruma WASM for Nim and Typst. Reusing it avoids shipping a second ~150 KB (gzipped) copy, and puts chat on the same grammar catalogue and palette the editor can move to later. The interface is small and takes plain inputs, so it can move into a worker later without changing callers.
  • Shiki core rather than raw vscode-textmate: Shiki brings the bundled grammar catalogue with lazy loaders, embedded-language handling and theme resolution. It is pinned to exactly 4.5.0 because the tokenizing route uses Shiki's setTheme, which Shiki marks internal.
  • Dark+/Light+ instead of One Dark Pro/One Light, so chat matches VS Code's defaults and the palette the editor would use.
  • Plain-then-colour on first load rather than hiding the block until coloured: text being written stays readable and selectable. A loaded language colours in the same render.
  • Not in this PR (follow-ups): moving the editor's Nim/Typst tokenizer onto this interface, more editor languages, the Markdown preview, and the rich Markdown editor.

Visual Proof

Hidden dev app on macOS, fresh isolated profile, a local stand-in agent (no real agent) that runs a PowerShell and a Bash command and then streams one reply with TypeScript, Python, Bash, Vue, PowerShell and an unknown-language (zzlang) block. Rendered checks were driven by a separate non-Claude QA agent over the DevTools protocol.

Before (main) After
Dark, finished reply before dark after dark
Light, finished reply before light after light
While streaming (Bash block half written) before streaming after streaming
Vue {{ }}, light before vue after vue
Opened PowerShell command row (output stays plain) before powershell after powershell

The unknown-language block stays plain in both (visible at the bottom of the window shots).

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Automated (new or updated):

  • Interface: each theme coloured separately and default text left to the surface; continuing from a returned state equals one pass over the whole document (Python multi-line f-string, with is a keyword again after it); per-theme formatting; Vue {{ }} and directive values on one line and several lines, with Markdown loaded first; a too-long line and a timed-out line degrade the rest of the document; a state taken before its grammar reloaded is not resumed; unknown language; aliases and letter case; retry after a pause; stop after 3 failed loads.
  • Kelvin's streaming tests, ported: streamed colours equal a single pass at every prefix, finished lines keep identity, replaced documents start over, time-limited runs finish over later calls, \r\n/\n/lone \r survive; plus "every line after a skipped one stays plain".
  • Shared scheduler: blocks share one slice and take turns; a cancelled block stops.
  • Components: a mounted, still-streaming block colours after a failed grammar load succeeds on retry; dimmed rows and unknown languages stay plain; finished blocks repaint at once on remount; PowerShell command row coloured, a command from an unknown shell plain.
  • Shell picker: tool names, zsh -lc, argv arrays, wsl.exe, quoted powershell.exe -Command, pwsh, cmd.exe /c, and unknown cases.

Ran locally: web typecheck, orca-ci-checks --no-typecheck (lint, code quality, localization), all native-chat tests (3,631), the syntax-highlighting tests and the editor's TextMate tests.

Platforms: macOS only (hidden dev app). Not exercised in a packaged build, on Windows or Linux, or over SSH. The change is renderer-only, so SSH/remote sessions render the same transcript the same way.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Performance. Nothing loads at startup; Shiki, the grammars and the shared WASM load on the first coloured block. Measured in Node on a busy machine: a warm line costs well under 2 ms; the first lines through a grammar pay a one-time compile (about 50–65 ms for TypeScript and Vue). A single regex scan can't be interrupted, so the time limit bounds a bad line rather than guaranteeing a frame; moving tokenizing into a worker behind the same interface is the fix if that shows up. Not measured in a packaged build.
  • Limits. Only the first 50,000 characters of a block are coloured; a line over 1,000 characters makes the rest of its block plain.
  • Bundle. One lazy chunk per grammar; no second WASM (Shiki's own engine and WASM are not imported).
  • Security. No network access; tokens render as React text, never HTML.
  • Wire compatibility / mobile. Nothing a client and host exchange changes. The mobile app is unaffected.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 46f8f0b3-13c4-4275-b105-9ed02f47df10

📥 Commits

Reviewing files that changed from the base of the PR and between c45bf7d and 9c779ff.


📒 Files selected for processing (3)
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.load-failure.test.tsx
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.



📝 Walkthrough

Walkthrough

The change adds Shiki-based syntax highlighting for eligible native chat code blocks and recognized shell commands. Highlighting loads grammars on demand and processes code incrementally in scheduled slices. The renderer preserves source text and line endings, and uses plain rendering when highlighting is disabled or unavailable. System messages and reasoning code blocks use plain rendering. The change also updates Monaco’s Oniguruma loader to use a shared helper.


Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 9c779

Collapsed commands intentionally remain plain text; the opened full command receives highlighting. No actionable merge-blocking issue remains after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 48.21% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 29 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary changes: syntax highlighting for native chat code blocks and shell commands.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, visual proof, testing, limitations, security, compatibility, and performance. The required linked issue is not provid…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Uses Shiki rather than the highlight.js already in the preview: it can
resume mid-block while a reply streams.
@AmoabaKelvin
AmoabaKelvin force-pushed the native-chat-syntax-highlighting branch from 9192e2a to 6f7d996 Compare October 8, 2026 11:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 48b05dfc-21c6-4d9f-9ef4-d89bfcbbfd3f
📥 Commits

Reviewing files that changed from the base of the PR and between 9192e2a7ea54a3db13b1d0698427152fa0fc71bb and 9bbdcf1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • src/renderer/src/components/native-chat/NativeChatMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/native-chat-tool-line-label.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment on lines +61 to +65
{commandLanguage ? (
<NativeChatHighlightedCode code={fullCommand} language={commandLanguage} />
) : (
fullCommand
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Highlight the command target in the collapsed row.

This change highlights fullCommand only in expanded details. The visible command target in the collapsed row still renders as plain text. Apply NativeChatHighlightedCode to the target when commandLanguage is present, and keep other targets plain. The PR objective includes highlighted command pills.

# Conflicts:
#	src/renderer/src/components/native-chat/NativeChatMessageRow.tsx
…face

Chat code now goes through one renderer highlighting interface built on Shiki
core and the Oniguruma WASM the editor already loads for Nim and Typst, with
VS Code Light+/Dark+. Lines that are too long or too slow leave the rest of
the block plain, failed grammar loads retry from a mounted block, every block
shares one time slice, finished-block caching counts retained text, each theme
keeps its own formatting, Vue template expressions are colored, and tool-row
commands take the grammar of the shell they ran in.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1fec3cbf-eecc-4b64-a07c-5888d2c532a5
📥 Commits

Reviewing files that changed from the base of the PR and between 9bbdcf1 and 4ce02f6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • package.json
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.load-failure.test.tsx
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.test.tsx
  • src/renderer/src/components/native-chat/NativeChatHighlightedCode.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatReasoningDisclosure.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/native-chat-command-language.test.ts
  • src/renderer/src/components/native-chat/native-chat-command-language.ts
  • src/renderer/src/components/native-chat/native-chat-tool-line-label.ts
  • src/renderer/src/hooks/use-highlighted-syntax.ts
  • src/renderer/src/lib/monaco-languages/textmate-token-provider.ts
  • src/renderer/src/lib/syntax-highlighting/incremental-syntax-tokenizer.test.ts
  • src/renderer/src/lib/syntax-highlighting/incremental-syntax-tokenizer.ts
  • src/renderer/src/lib/syntax-highlighting/oniguruma-test-harness.ts
  • src/renderer/src/lib/syntax-highlighting/oniguruma.ts
  • src/renderer/src/lib/syntax-highlighting/syntax-highlight-scheduler.test.ts
  • src/renderer/src/lib/syntax-highlighting/syntax-highlight-scheduler.ts
  • src/renderer/src/lib/syntax-highlighting/syntax-highlighter.test.ts
  • src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts
  • src/renderer/src/lib/syntax-highlighting/vue-template-injections.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Comment on lines +59 to +89
/**
* Tokens for as much of `code` as has been colored so far, or null while there
* is nothing to color it with. The rest, `code.slice(highlightedLength)`, is
* still plain and arrives over later renders.
*/
export function useHighlightedSyntax(code: string, language: string): SyntaxProgress | null {
const source =
code.length > MAX_HIGHLIGHTED_CODE_LENGTH ? code.slice(0, MAX_HIGHLIGHTED_CODE_LENGTH) : code
const highlighter = loadedSyntaxHighlighter(language)
const [, rerender] = useReducer((count: number) => count + 1, 0)

// Why: `source` is a dependency so a block still streaming asks again after a failed load.
useEffect(() => {
if (highlighter) {
return
}
let cancelled = false
void loadSyntaxLanguage(language).then((status) => {
if (!cancelled && status === 'ready') {
rerender()
}
})
return () => {
cancelled = true
}
}, [language, highlighter, source])

const tokenize = useMemo(
() => (highlighter ? createIncrementalSyntaxTokenizer(highlighter) : null),
[highlighter]
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,155p' src/renderer/src/hooks/use-highlighted-syntax.ts
sed -n '290,360p' src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts
sed -n '1,80p' src/renderer/src/components/native-chat/NativeChatCodeBlock.load-failure.test.tsx

Repository: stablyai/orca

Length of output: 9032


🏁 Script executed:

printf '%s\n' '--- diff ---'
git diff --unified=5 6ef42adfc0effb744d83f8240268079e8987af39 4ce02f6f4cfc9dbcc21fadc3facd9464f539e312 -- src/renderer/src/hooks/use-highlighted-syntax.ts src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts src/renderer/src/components/native-chat/NativeChatCodeBlock.load-failure.test.tsx
printf '%s\n' '--- loader declarations ---'
rg -n 'LOAD_RETRY_DELAY_MS|MAX_LOAD_ATTEMPTS|pendingLanguages|function loadLanguage|function loadSyntaxLanguage|loadedSyntaxHighlighter' src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts
sed -n '1,100p' src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts
sed -n '275,370p' src/renderer/src/lib/syntax-highlighting/syntax-highlighter.ts
printf '%s\n' '--- complete load-failure test ---'
cat src/renderer/src/components/native-chat/NativeChatCodeBlock.load-failure.test.tsx

Repository: stablyai/orca

Length of output: 30001


Retry failed grammar loads without requiring a code update.

When loadSyntaxLanguage returns failed, this effect neither rerenders nor schedules another call. If the code stays unchanged, the loader’s cooldown expiring does not rerun the effect, so the mounted block can stay plain until another render or remount. Schedule bounded retries using the loader’s cooldown and stop when its retry limit is reached.

Keeps the lockfile change to Shiki alone; the earlier commit picked up the
@pnpm/exe entries pnpm 12 writes when it runs in a fresh checkout.
The first colored block in a test file loads its grammar and the regex
engine, which took over a second on a busy CI runner.
@brennanb2025

brennanb2025 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Hey Kelvin, thanks for this one. We've taken #26343 the rest of the way and pushed the changes to your branch, so the credit stays with you.

Why: we want chat and the editor on one highlighting setup. Orca already ships the Oniguruma WASM for the editor (Nim and Typst), and Shiki core can run on it. So instead of a chat-only Shiki with its own WASM and colours, chat now goes through a small shared highlighting layer (src/renderer/src/lib/syntax-highlighting/) on Shiki core and our existing engine, with VS Code Dark+/Light+.

What changed:

  • Chat highlighting runs through that shared layer. Your streaming resume, per-line rendering and tests carry over.
  • Dark+/Light+ instead of One Dark/One Light, with each theme's font style kept separately.
  • A grammar that fails to load is retried by a block already on screen; cache limits count the stored text.
  • A line that gets skipped or times out leaves the rest of that block plain, instead of continuing from possibly wrong state.
  • One scheduling budget shared across all blocks.
  • Vue {{ }} interpolations are coloured (the injection grammar targets source.vue, but Vue's root scope is text.html.vue).
  • The command grammar comes from the shell the command ran in (Bash, PowerShell, cmd, WSL and so on); unknown shells stay plain.
  • Streaming text stays visible and gets coloured in place.
  • The PR description now matches what's coloured.

What we'll do after this lands:

  • Move the editor's Nim and Typst onto the same layer, so Orca has one TextMate engine, and add the same line limits there (today a minified one-line file in those languages can freeze the window).
  • Run a packaged-app performance pass on macOS, Windows and Linux.
  • Add missing editor languages in small batches from the same grammar catalogue.
  • Only after a packaged benchmark, and behind a flag: Python, Vue and TypeScript in the editor.
  • Possibly the Markdown preview later, so preview code matches chat.
image

@brennanb2025
brennanb2025 merged commit 2cb2bef into stablyai:main Oct 9, 2026
40 checks passed
Old-G added a commit to Old-G/orca-plus that referenced this pull request Oct 22, 2026
Upstream now highlights chat code (stablyai#26343) with VS Code's Light+ and Dark+
only, so an imported Custom appearance theme repainted Monaco but not code
in chat. While a theme is active it is registered with the chat highlighter
in its own mode's slot (a dark theme replaces Dark+, a light one Light+);
turning it off restores both. A theme change bumps a revision that colored
blocks subscribe to, and finished blocks are cached per revision, so code
already on screen repaints instead of keeping the old colors.

Custom-Feature: chat-code-theme
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Old-G added a commit to Old-G/orca-plus that referenced this pull request Oct 25, 2026
Upstream now highlights chat code (stablyai#26343) with VS Code's Light+ and Dark+
only, so an imported Custom appearance theme repainted Monaco but not code
in chat. While a theme is active it is registered with the chat highlighter
in its own mode's slot (a dark theme replaces Dark+, a light one Light+);
turning it off restores both. A theme change bumps a revision that colored
blocks subscribe to, and finished blocks are cached per revision, so code
already on screen repaints instead of keeping the old colors.

Custom-Feature: chat-code-theme
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Old-G added a commit to Old-G/orca-plus that referenced this pull request Nov 13, 2026
Upstream now highlights chat code (stablyai#26343) with VS Code's Light+ and Dark+
only, so an imported Custom appearance theme repainted Monaco but not code
in chat. While a theme is active it is registered with the chat highlighter
in its own mode's slot (a dark theme replaces Dark+, a light one Light+);
turning it off restores both. A theme change bumps a revision that colored
blocks subscribe to, and finished blocks are cached per revision, so code
already on screen repaints instead of keeping the old colors.

Custom-Feature: chat-code-theme
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Old-G added a commit to Old-G/orca-plus that referenced this pull request Nov 18, 2026
Upstream now highlights chat code (stablyai#26343) with VS Code's Light+ and Dark+
only, so an imported Custom appearance theme repainted Monaco but not code
in chat. While a theme is active it is registered with the chat highlighter
in its own mode's slot (a dark theme replaces Dark+, a light one Light+);
turning it off restores both. A theme change bumps a revision that colored
blocks subscribe to, and finished blocks are cached per revision, so code
already on screen repaints instead of keeping the old colors.

Custom-Feature: chat-code-theme
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Old-G added a commit to Old-G/orca-plus that referenced this pull request Nov 22, 2026
Upstream now highlights chat code (stablyai#26343) with VS Code's Light+ and Dark+
only, so an imported Custom appearance theme repainted Monaco but not code
in chat. While a theme is active it is registered with the chat highlighter
in its own mode's slot (a dark theme replaces Dark+, a light one Light+);
turning it off restores both. A theme change bumps a revision that colored
blocks subscribe to, and finished blocks are cached per revision, so code
already on screen repaints instead of keeping the old colors.

Custom-Feature: chat-code-theme
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants