You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds average output tokens-per-second (TPS) to the TUI status bar, displayed before context size after a response completes. The metric is computed from data already on AssistantMessage: tokens.output / ((time.completed - time.created) / 1000).
Shows up as "42 t/s · 1.2K (12%) · $0.05" in:
Prompt footer
Subagent footer
Sidebar context plugin
TPS only appears on completed messages (requires time.completed), so it won't show mid-stream or for incomplete responses.
How did you verify your code works?
bun typecheck passes across all packages
Manually tested in TUI: TPS appears alongside context/cost after a response completes
May be related as it deals with status bar/line customization
These PRs should be reviewed to determine if they're addressing the same feature or if there's overlap in implementation. PR #21133 seems particularly relevant given the matching scope (footer, sidebar, TPS display).
Closing in favor of #21133 which already implements TPS display with live streaming support via message.part.delta events, a proper tps.ts utility, and Locale.tokensPerSec. This PR only added post-completion average TPS which is a subset of what #21133 provides.
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
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.
Issue for this PR
Closes #22344
Type of change
What does this PR do?
Adds average output tokens-per-second (TPS) to the TUI status bar, displayed before context size after a response completes. The metric is computed from data already on
AssistantMessage:tokens.output / ((time.completed - time.created) / 1000).Shows up as "42 t/s · 1.2K (12%) · $0.05" in:
TPS only appears on completed messages (requires
time.completed), so it won't show mid-stream or for incomplete responses.How did you verify your code works?
bun typecheckpasses across all packagesScreenshots / recordings
N/A — TUI text change
Checklist