Skip to content

feat: always-on context usage display with sub-1% precision - #13093

Open
thanhnnict wants to merge 1 commit into
continuedev:mainfrom
thanhnnict:feat/always-on-context-usage
Open

feat: always-on context usage display with sub-1% precision#13093
thanhnnict wants to merge 1 commit into
continuedev:mainfrom
thanhnnict:feat/always-on-context-usage

Conversation

@thanhnnict

Copy link
Copy Markdown

Problem

Currently, the context usage indicator in Continue is only shown when:

  • The conversation is pruned (context exceeded)
  • OR context usage is >= 60%

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

  • Always visible when history.length > 0 (removed 60% threshold)
  • Sub-1% precision: shows 0.3% instead of rounding to 0%
  • Color-coded bar:
    • < 60%: muted (subtle, non-intrusive)
    • >= 60%: description (noticeable)
    • >= 80%: warning (attention needed)
    • pruned: error (action required)
  • Percentage number displayed next to the bar
  • Graceful handling: shows before first message (when contextPercentage is undefined)

ResponseActions.tsx

  • Always show Compact label on the last message
  • Percentage prefix: 0.3% · Compact
  • Hide prefix when no context data yet

Screenshots

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

  • No breaking changes
  • No new dependencies
  • Purely additive UI enhancement
  • Existing behavior preserved when history.length === 0

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
@thanhnnict
thanhnnict requested a review from a team as a code owner August 6, 2026 01:13
@thanhnnict
thanhnnict requested review from sestinj and removed request for a team August 6, 2026 01:13
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

@thanhnnict

Copy link
Copy Markdown
Author
Screenshot 2026-08-06 at 08 16 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant