feat: add configurable context usage display#359
Open
kidush wants to merge 2 commits into
Open
Conversation
kidush
force-pushed
the
context-usage-display-config
branch
from
July 20, 2026 22:06
9f84327 to
5018515
Compare
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.
Summary
Adds a configurable context usage display for Tau's TUI.
Users can now choose how the compact context meter below the prompt is shown via
~/.tau/tui.json:{ "context_usage_display": "both" }Supported values:
tokens— current/default behavior, e.g.12k/200kpercent— percentage of the active model context window, e.g.6%both— tokens and percentage, e.g.12k/200k · 6%off— hide the compact context meter entirelyRendered output follows the footer convention from #407: the meter sits on its own line below
provider:model, with nocontextlabel. Inoffmode that line is omitted rather than left blank.Changes
context_usage_percent(...)intau_coding.context_window.CodingSession.context_usage_percent.TuiSettings.context_usage_display, defaulting totokens; missing or invalid values in an existingtui.jsonfall back totokens/ raiseTuiConfigError./sessionto report context usage as tokens and percentage. This output is deliberately not controlled bycontext_usage_display, which only governs TUI chrome.Checks
All passing — 1062 tests.
Rebased onto
main@ 102482b.