@devries-cameron20 / t3code Mirror · read-only / commits / 3017eca6c8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 01:45 UTC

fix(shared): terminal labels after non-BMP letters stay plain text (#19968)

Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

Karan Kumar committed Oct 19, 2026 at 11:20 UTC 3017eca6c8802aa8784bcd3b88a56ee559680877
1 file changed +4 -1
packages/shared/src/composerContextLegacy.ts
+4 -1
@@ -408,9 +408,12 @@ export function upgradeLegacyContextMessage(text: string): UpgradedLegacyContext
408 if (placedTerminals.has(record)) continue;
409 const label = inlineTerminalLabel(record);
410 let at = body.indexOf(label);
411 + // Alternation instead of a character class: on Electron 44's V8 (15.2) a class
412 + // directly before `$` with the `u` flag never matches a code point outside the
413 + // BMP, so `𐐀@build:7` would become a chip (#18272).
414 while (
415 at !== -1 &&
413 - (/[\p{L}\p{N}\p{M}_@.-]$/u.test(body.slice(0, at)) ||
416 + (/(?:\p{L}|\p{N}|\p{M}|[_@.-])$/u.test(body.slice(0, at)) ||
417 /^(?:[\p{L}\p{N}\p{M}_-]|[.@]+[\p{L}\p{N}\p{M}_-])/u.test(body.slice(at + label.length)))
418 ) {
419 at = body.indexOf(label, at + 1);