feat(tui): show tokens per second in assistant message footer#14493
feat(tui): show tokens per second in assistant message footer#14493thdxr wants to merge 4 commits into
Conversation
…nses Previously, users only saw tok/s metrics after a message completed. Now the TUI displays live streaming speed that updates throughout the response, giving immediate feedback on model performance.
a72ec51 to
2d89c22
Compare
|
this will be great. why its not merged yet? |
|
Clean implementation. The backward loop from the current message index is efficient. One edge case I hit when building something similar: the first few tokens of a response produce unstable tok/s values (small elapsed time, large variance). A minimum output token threshold before displaying (e.g., skip if output < 10 tokens) avoids showing misleading rates like "2,000 tok/s" from a single token arriving quickly. Also, for cumulative session-level token visibility (total in/out across all turns), would that fit as a separate footer element or is per-message the intended scope? |
|
This would be great. are there any plans to merge these changes? |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
This PR adds tokens per second (tok/s) display to the TUI assistant message footer.
Changes
indexprop toAssistantMessagecomponent to enable efficient backwards iteration through message listdurationmemo tostatsmemo that returns both duration and total output tokens{duration} · {tps} tok/sImplementation