Skip to content

feat: Add TPS and TTFT display to step finish view#116

Open
kkito wants to merge 10 commits into
lehhair:mainfrom
kkito:feat/tps-display
Open

feat: Add TPS and TTFT display to step finish view#116
kkito wants to merge 10 commits into
lehhair:mainfrom
kkito:feat/tps-display

Conversation

@kkito

@kkito kkito commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add TPS (throughput / tokens per second) and TTFT (time to first token) display to the step finish view, along with settings toggles to control their visibility.

Changes

New display metrics (StepFinishPartView.tsx)

  • Show TPS (tokens/sec) computed from API timestamps and generation tokens
  • Show TTFT (time to first token) when firstPartStart is available
  • Accept new props: firstPartStart, tps, ttft

Settings toggles (ChatSettings.tsx, themeStore.ts)

  • Added showTps toggle — enable/disable TPS display
  • Added showTtft toggle — enable/disable TTFT display

i18n (locales/en/settings.json, locales/zh-CN/settings.json)

  • Added tps / showTps entries
  • Added ttft / showTtft entries

Infrastructure

  • MessageRenderer.tsx: extract firstPartStart from conversation timestamps and pass it down
  • Display unit uses tps (lowercase) instead of T/s

Files changed

 .../plans/2026-06-08-tps-ttft-display.md           | 580 ++++++++
 .../specs/2026-06-08-tps-ttft-display-design.md    |  94 +++
 src/features/message/MessageRenderer.tsx           |  20 +
 .../message/parts/StepFinishPartView.test.tsx      | 136 +++++
 src/features/message/parts/StepFinishPartView.tsx  |  20 +
 src/features/settings/components/ChatSettings.tsx  |   2 +
 src/locales/en/settings.json                       |   4 +
 src/locales/zh-CN/settings.json                    |   4 +
 src/store/themeStore.ts                            |   4 +
 9 files changed, 864 insertions(+)

Notes

  • TPS is computed based on opencode API timestamps, includes LLM network overhead

@kkito kkito marked this pull request as draft June 8, 2026 01:37
@kkito kkito changed the title WIP: Add TPS and TTFT display to step finish view feat: Add TPS and TTFT display to step finish view Jun 8, 2026
@kkito kkito marked this pull request as ready for review June 8, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant