mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
fix(coding-agent): fall back to 256color in Terminal.app (#869)
This commit is contained in:
parent
693112e395
commit
236285b390
1 changed files with 5 additions and 1 deletions
|
|
@ -166,10 +166,14 @@ function detectColorMode(): ColorMode {
|
|||
return "truecolor";
|
||||
}
|
||||
const term = process.env.TERM || "";
|
||||
// Only fall back to 256color for truly limited terminals
|
||||
// Fall back to 256color for truly limited terminals
|
||||
if (term === "dumb" || term === "" || term === "linux") {
|
||||
return "256color";
|
||||
}
|
||||
// Terminal.app also doesn't support truecolor
|
||||
if (process.env.TERM_PROGRAM === "Apple_Terminal") {
|
||||
return "256color";
|
||||
}
|
||||
// Assume truecolor for everything else - virtually all modern terminals support it
|
||||
return "truecolor";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue