MCPcopy Create free account
hub / github.com/codeaashu/claude-code / boostChalkLevelForXtermJs

Function boostChalkLevelForXtermJs

src/ink/colorize.ts:20–26  ·  view source on GitHub ↗

* xterm.js (VS Code, Cursor, code-server, Coder) has supported truecolor * since 2017, but code-server/Coder containers often don't set * COLORTERM=truecolor. chalk's supports-color doesn't recognize * TERM_PROGRAM=vscode (it only knows iTerm.app/Apple_Terminal), so it falls * through to the -25

()

Source from the content-addressed store, hash-verified

18 * terminal, tmux's passthrough limitation wins and we want level 2.
19 */
20function boostChalkLevelForXtermJs(): boolean {
21 if (process.env.TERM_PROGRAM === 'vscode' && chalk.level === 2) {
22 chalk.level = 3
23 return true
24 }
25 return false
26}
27
28/**
29 * tmux parses truecolor SGR (\e[48;2;r;g;bm) into its cell buffer correctly,

Callers 1

colorize.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected