feat(tui): show extended context mode indicator in status bar#1752
Merged
feat(tui): show extended context mode indicator in status bar#1752
Conversation
Add a visible [1M CTX] badge in the TUI header when enable_extended_context is active in the Claude config, and a Max context: 1M line in the Resources panel. Fixes cost-transparency gap per TUI Rules. - Add `extended_context: bool` to `MetricsSnapshot` and `MetricsState` - Read flag from `config.llm.cloud.enable_extended_context` in runner.rs (avoids false positives when Claude is wrapped by Router/Orchestrator) - Render [1M CTX] badge next to model name in TUI header - Render Max context: 1M in Resources panel when flag is set - Add snapshot test and two badge presence/absence tests
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.
Closes #1686.
Summary
[1M CTX]badge next to model name in the TUI header bar whenenable_extended_context = truein the Claude configMax context: 1Mline in the Resources panelconfig.llm.cloud.enable_extended_contextdirectly inrunner.rs, avoiding false positives when Claude is wrapped by Router or Orchestrator providersChanges
crates/zeph-core/src/metrics.rs— addextended_context: booltoMetricsSnapshotcrates/zeph-core/src/agent/mod.rs— addextended_context: booltoMetricsStatecrates/zeph-core/src/agent/builder.rs— addwith_extended_context(bool)builder methodsrc/runner.rs— read flag from config and pass viawith_extended_context()crates/zeph-tui/src/app.rs— render[1M CTX]badge in headercrates/zeph-tui/src/widgets/resources.rs— renderMax context: 1Min resources panelTest plan
extended_context = true[1M CTX]shown whenextended_context = true[1M CTX]not shown whenextended_context = falsecargo nextest run --workspace --features full --lib --bins— 5493 passedcargo clippy --workspace --features full -- -D warnings— 0 warningscargo +nightly fmt --check— clean