mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
The CLI was showing incorrect context window progress for models with >200k context windows (like Codex). Two issues: 1. Used cumulative token totals instead of last request tokens 2. Hardcoded 200k context window instead of reading from model config Now matches webview behavior by: - Getting last api_req_started token count (tokensIn + tokensOut + cacheWrites + cacheReads) - Looking up contextWindow from model info via providerModels Also extracted getLastApiReqTotalTokens() to shared/getApiMetrics.ts to avoid code duplication between CLI and webview.