mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +00:00
Assume truecolor for most terminals (fixes SSH color detection)
Only fall back to 256color for truly limited terminals (dumb, empty, linux). Virtually all modern terminals support truecolor, no need to be conservative.
This commit is contained in:
parent
9c87eeb805
commit
b4fb6770e4
1 changed files with 4 additions and 2 deletions
|
|
@ -166,10 +166,12 @@ function detectColorMode(): ColorMode {
|
|||
return "truecolor";
|
||||
}
|
||||
const term = process.env.TERM || "";
|
||||
if (term.includes("256color")) {
|
||||
// Only fall back to 256color for truly limited terminals
|
||||
if (term === "dumb" || term === "" || term === "linux") {
|
||||
return "256color";
|
||||
}
|
||||
return "256color";
|
||||
// Assume truecolor for everything else - virtually all modern terminals support it
|
||||
return "truecolor";
|
||||
}
|
||||
|
||||
function hexToRgb(hex: string): { r: number; g: number; b: number } {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue