Skip to content

Commit 6c6d463

Browse files
committed
chore:format
1 parent bc2a252 commit 6c6d463

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/commands/statusline.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,13 @@ export const statuslineCommand = define({
177177
return undefined;
178178
}
179179
// Format context percentage with color coding using configurable thresholds
180-
const p = ctx.percentage;
181180
const thresholds = getContextUsageThresholds();
182-
const color = p < thresholds.LOW ? pc.green : p < thresholds.MEDIUM ? pc.yellow : pc.red;
183-
const coloredPercentage = color(`${p}%`);
181+
const color = ctx.percentage < thresholds.LOW
182+
? pc.green
183+
: ctx.percentage < thresholds.MEDIUM
184+
? pc.yellow
185+
: pc.red;
186+
const coloredPercentage = color(`${ctx.percentage}%`);
184187

185188
// Format token count with thousand separators
186189
const tokenDisplay = ctx.inputTokens.toLocaleString();

0 commit comments

Comments
 (0)