From efb8f159ad9bc8c024c95fd863b2a8e76797103f Mon Sep 17 00:00:00 2001 From: qer Date: Sun, 21 Jun 2026 18:07:59 +0800 Subject: [PATCH] fix(tui): hide context usage when it is 0 When a session starts, context usage is 0. Displaying 'context: 0.0%' in the footer is misleading because it implies the context window is empty. Instead, hide the context status line until there is actual usage to report. Fixes: initial Context usage should not show 0 or should be hidden. --- apps/kimi-code/src/tui/components/chrome/footer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/kimi-code/src/tui/components/chrome/footer.ts b/apps/kimi-code/src/tui/components/chrome/footer.ts index 127009506..e36c278b1 100644 --- a/apps/kimi-code/src/tui/components/chrome/footer.ts +++ b/apps/kimi-code/src/tui/components/chrome/footer.ts @@ -199,6 +199,7 @@ function safeUsage(usage: number): number { } function formatContextStatus(usage: number, tokens?: number, maxTokens?: number): string { + if (usage <= 0) return ''; const pct = `${(safeUsage(usage) * 100).toFixed(1)}%`; if (maxTokens && maxTokens > 0 && tokens !== undefined) { return `context: ${pct} (${formatTokenCount(tokens)}/${formatTokenCount(maxTokens)})`;