feat(cli): degrade status-line ctx segment to ?/window when usage is unavailable (#3371) - #3373
Open
me2seeks wants to merge 1 commit into
Open
feat(cli): degrade status-line ctx segment to ?/window when usage is unavailable (#3371)#3373me2seeks wants to merge 1 commit into
me2seeks wants to merge 1 commit into
Conversation
…unavailable (apache#3371) The ctx segment only rendered when both the model context window and a token_usage contextRemaining were present, leaving connections whose provider does not report per-step input tokens (e.g. opencode-go) with no context indicator at all — indistinguishable from 'not measured yet'. When the window is known but contextRemaining is not, render a dim 'ctx ?/<window>' fallback (pi-mono footer style). Unknown-window behavior is unchanged: no segment.
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 #3371
Problem
The TUI status-line ctx segment (#1067) only rendered when both the model context window and a
token_usagecontextRemainingwere present. On connections whose provider does not report per-step input tokens (e.g.opencode-go), the status line shows no context indicator at all — the user cannot distinguish "provider doesn't report usage" from "not measured yet" from "window unknown".Change
In
renderMakaPiStatusLine(packages/cli/src/pi-transcript.ts), the ctx segment is lifted out of theif (usage)block:contextRemainingavailable → unchanged:ctx 20k/500k 4%with the existing 80%/95% color thresholdsctx ?/500kfallback, following pi-mono's footer design (?/200kwhen context usage is unknown)Tests
ctx 20k/500k 4%integration assertion)The follow-up from the issue — verifying whether the opencode-go relay reports per-step input tokens — is not in scope here.