mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
c5b75674a3
- Fix context percentage: use FinalResponse.Usage (last API call) instead of TotalUsage (sum of all tool-calling steps) which overstated context fill level - Fix token count: display current context window tokens, not cumulative session total, so the number and percentage tell a consistent story - Fix script mode double-counting: app.updateUsage already updates the shared tracker before sending StepCompleteEvent, so remove redundant UpdateUsageFromResponse call - Add sticky usage display in TUI: render in View() layout between stream and separator instead of tea.Println so it updates in place - Add usage display for non-interactive --prompt mode (non-quiet) - Add SetContextTokens to UsageUpdater interface for separating billing tokens (TotalUsage) from context utilization (FinalResponse.Usage)