Conversation
Add in context limit view UI based on last.totalTokens. * Displays ring showing amount of context being used * On click displays actual numbers * Collapses into the ... UI when window is shrunk
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can enable review details to help with troubleshooting, context usage and more.Enable the |
What Changed
Adds in a compact context limit view in the composer based on Codex last_token_usage.total_tokens.
Why
Fixes #974: Displays context in a minimal way within the existing layout. It gives users a quick read on thread context usage where they are already working, and lets them click for the exact numbers.
UI Changes
Checklist
Note
Add context limit viewer to the chat composer
ComposerContextUsageIndicatorcomponent to the chat composer that displays a circular progress ring showing context window usage, severity (neutral/warning/danger), and an optional compaction dot with a details popup.deriveThreadContextUsageSnapshotin session-logic.ts to compute normalized usage (usedTokens,maxTokens,percentUsed) and compaction recency from thread activity streams, invalidating stale usage when compaction is newer.CodexAdapterto emitthread.token-usage.updatedruntime events fromcodex/event/token_countpayloads, replacing the previousthread/tokenUsage/updatedhandling.ProviderRuntimeIngestionto mapthread.token-usage.updatedintothread.context.usage.updatedactivities andthread.state.changed(compacted) intothread.context.compactedactivities.CodexAdapterno longer emits events forthread/tokenUsage/updated; onlycodex/event/token_countproduces token usage events.Macroscope summarized 479d66b.