fix(coding-agent): fall back to 256color in Terminal.app (#869)
This commit is contained in:
committed by
GitHub
parent
693112e395
commit
236285b390
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user