kimi-code/apps
Kimi Agent 41a75adfc7
fix(tui): recompute stale context usage ratio from status update token counts (#3164)
v2 engine status events carry contextTokens/maxContextTokens but never
contextUsage, so appState.contextUsage was only refreshed by getStatus
pulls and then went stale while the token counts kept updating live.
The /usage panel and footer render the ratio as a bar but recompute the
percentage text from the counts, so a stale ratio showed as a bar that
disagreed with the percentage (e.g. bar ~74% next to "18% (180k / 1M)"
after compaction or a model switch).

Recompute the ratio from the post-patch token counts whenever a status
update touches contextTokens or maxContextTokens without carrying an
explicit contextUsage. v1 events carry the ratio and are unaffected.

Co-authored-by: kimi-agent-bot <kimi-agent-bot@users.noreply.github.com>
2026-08-26 13:59:24 +08:00
..
kimi-code fix(tui): recompute stale context usage ratio from status update token counts (#3164) 2026-08-26 13:59:24 +08:00
kimi-inspect refactor(agent-core-v2): drop in-place system prompt refresh (#3211) 2026-08-24 21:55:23 +08:00
vis feat(agent-core): add tower command to orchestrate multi-agents (#2633) 2026-08-16 15:13:42 +08:00
vscode fix(kimi-code): persist picked thinking effort up to the model's default effort (#3205) 2026-08-25 12:18:26 +08:00