feat: always-on context usage display with sub-1% precision - #13093
Open
thanhnnict wants to merge 1 commit into
Open
feat: always-on context usage display with sub-1% precision#13093thanhnnict wants to merge 1 commit into
thanhnnict wants to merge 1 commit into
Conversation
Show context usage percentage persistently in the UI so users can proactively monitor context consumption — inspired by Kiro IDE. Changes: - ContextStatus: always visible when history exists (removed 60% threshold) - ContextStatus: show '—' instead of misleading '0%' when no data yet - ContextStatus: show 1 decimal place for sub-1% usage (e.g. '0.3%') - ContextStatus: color-coded bar (muted < 60%, description >= 60%, warning >= 80%, error=pruned) - ContextStatus: show percentage number next to bar - ResponseActions: always show 'Compact' label on last message - ResponseActions: show percentage prefix (e.g. '0.3% · Compact') - ResponseActions: hide percentage prefix when no context data yet
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Currently, the context usage indicator in Continue is only shown when:
This means users have no visibility into context consumption during normal usage. They only discover context limits when it is too late — after pruning has already occurred and information has been lost.
Solution
Make the context usage indicator always visible when there is conversation history, with enhanced precision and visual feedback.
Changes
ContextStatus.tsx
history.length > 0(removed 60% threshold)0.3%instead of rounding to0%< 60%: muted (subtle, non-intrusive)>= 60%: description (noticeable)>= 80%: warning (attention needed)pruned: error (action required)—before first message (whencontextPercentageis undefined)ResponseActions.tsx
Compactlabel on the last message0.3% · CompactScreenshots
Context usage at 4% — always visible, subtle when low
Context usage at 80%+ — warning color, clearly visible
Inspiration
This UX pattern is inspired by Kiro IDE, which always shows context usage to help users proactively manage their context budget.
Backward Compatibility
history.length === 0