mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 07:03:25 +00:00
Fix coloring in footer when context usage is colored
This commit is contained in:
parent
14945df738
commit
3266cac0f1
1 changed files with 8 additions and 2 deletions
|
|
@ -276,7 +276,13 @@ export class FooterComponent implements Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return two lines: pwd and stats
|
// Apply dim to each part separately. statsLeft may contain color codes (for context %)
|
||||||
return [theme.fg("dim", pwd), theme.fg("dim", statsLine)];
|
// that end with a reset, which would clear an outer dim wrapper. So we dim the parts
|
||||||
|
// before and after the colored section independently.
|
||||||
|
const dimStatsLeft = theme.fg("dim", statsLeft);
|
||||||
|
const remainder = statsLine.slice(statsLeft.length); // padding + rightSide
|
||||||
|
const dimRemainder = theme.fg("dim", remainder);
|
||||||
|
|
||||||
|
return [theme.fg("dim", pwd), dimStatsLeft + dimRemainder];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue