From 3266cac0f1b185ced2beb713da82032a6cd1b68c Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sat, 20 Dec 2025 10:43:16 +0100 Subject: [PATCH] Fix coloring in footer when context usage is colored --- .../src/modes/interactive/components/footer.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/src/modes/interactive/components/footer.ts b/packages/coding-agent/src/modes/interactive/components/footer.ts index 5eb3727a..6d31fd1b 100644 --- a/packages/coding-agent/src/modes/interactive/components/footer.ts +++ b/packages/coding-agent/src/modes/interactive/components/footer.ts @@ -276,7 +276,13 @@ export class FooterComponent implements Component { } } - // Return two lines: pwd and stats - return [theme.fg("dim", pwd), theme.fg("dim", statsLine)]; + // Apply dim to each part separately. statsLeft may contain color codes (for context %) + // 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]; } }