Skip to content

[FEATURE]: Color context usage and cost by thresholds (sidebar and prompt footer) #53263

Open

Description

@Nowaker

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The session sidebar's Context block and the usage line in the prompt footer draw tokens, percent used and cost in the same muted color, whether the context is 5% or 95% full and whether the session has cost $0.10 or $100. A session about to hit its context limit, or one past the budget you had in mind, looks the same as a fresh one.

Proposal: a usage struct in tui.json, all keys optional.

  • usage.context_color: "plain" (default, today's rendering) or "colored". With "colored", the token count and percent used share one color, picked from the percent used.
  • usage.context_thresholds: percent-used thresholds, default [60, 70, 80, 90].
    • Up to 60% stays muted.
    • Above the first threshold it takes the theme's warning color.
    • Above the last threshold it takes the theme's error color.
    • The thresholds in between blend from warning to error.
  • usage.cost_thresholds: dollar thresholds for the session cost, using the same rule. Unset by default, so cost stays muted. [5] means "warn above $5", and [5, 20] means warning above $5 and error above $20.

Colors come only from the active theme, so every theme gets a matching ramp. The settings apply to:

Activity

  1. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. changed the title [-][FEATURE]: Color the sidebar Context usage and cost by thresholds[/-] [+][FEATURE]: Color context usage and cost by thresholds (sidebar and prompt footer)[/+] on Oct 5, 2026
  3. opencodejr commented on Oct 27, 2026

    @opencodejr

    Thanks for the detailed proposal! To restate it: you'd like an optional usage setting in tui.json that colours the context token count, percent used and session cost from muted through the theme's warning colour to its error colour as configurable thresholds are passed. It would apply in the sidebar Context block (including the compact variants from #53200) and in the prompt footer's usage line.

    Right now all of these values are drawn in the theme's muted text colour regardless of how full the context is or how much the session has cost, so this would be new behaviour. Maintainers will look at it.

    Related:

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions