fix(cli): always show context usage bar in status panel#242
Conversation
… is known The condition `ctxWindow > 0 && latestInputTokens > 0` hid the context usage bar before the first turn and whenever tokens were 0. Show it whenever the context window size is known so the user always sees remaining capacity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe condition for rendering token usage information in the status string is modified to display whenever the context window is non-zero, rather than requiring both context window and latest input tokens to be positive. The percentage calculation is explicitly guarded against division by zero. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
14/200K (0%)) disappeared from status panel because the condition requiredlatestInputTokens > 0latestInputTokens > 0guard so the bar always shows when context window size is knownOne-line fix:
ctxWindow > 0 && latestInputTokens > 0→ctxWindow > 0Test plan
0/200K (0%)shows immediately🤖 Generated with Claude Code
Summary by CodeRabbit