Skip to content

feat(session,tui,app): latency and tk/s on the panel - #147

Merged
filipeforattini merged 1 commit into
mainfrom
feat/panel-throughput
Sep 6, 2026
Merged

feat(session,tui,app): latency and tk/s on the panel#147
filipeforattini merged 1 commit into
mainfrom
feat/panel-throughput

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Sep 6, 2026

Copy link
Copy Markdown
  • Every assistant message records time.first, stamped by the processor at the first stream event with content (reasoning-start, text-start, tool-input-start, tool-call).
  • Latency = first − created. Output speed = (output + reasoning tokens) / (completed − first). Both read off the message; nothing measured on the client, older messages show nothing.
  • TUI footer: … · $0.12 · 1.2s · 84 tk/s.
  • App: two rows in the context tooltip, two stats in the context tab; keys in all 62 locales.
  • packages/sdk/openapi.json is regenerated for the first time in a while — the committed one was still titled "opencode" and lacked the goal routes — hence the size. types.gen.ts only gains first and the two fan-out config keys from feat(session): real fan-out — parallel subtasks, background subagents on by default, per-session cap #145.

Tests: TUI throughput (3), app metrics (21 incl. 3 new) and i18n parity, redcode processor/schema/prompt suites (107). Typecheck clean in schema, core, redcode, tui, app.

https://claude.ai/code/session_013JrKXL4pdgTu2EtCjgiYyq


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The processor stamps time.first on the assistant message at the first stream event that
carries content — reasoning-start, text-start, tool-input-start or tool-call. With created and
completed that is enough for two numbers a person watching a model actually wants: how long the
provider took to start answering, and how fast it wrote once it did (output plus reasoning
tokens over first→completed). Both are computed where they are shown, from the message's own
timestamps, so nothing is measured on the client and an older message simply shows nothing.

TUI: the footer's usage line gains `· 1.2s · 84 tk/s` after context and cost. App: two rows in
the context tooltip and two stats in the context tab, with keys in every locale.

The regenerated packages/sdk/openapi.json is large because the committed one was stale — still
titled "opencode" and missing the goal routes and the newer schemas; this is the first
regeneration since. types.gen.ts changes only by `first` and the two fan-out config keys.

Claude-Session: https://claude.ai/code/session_013JrKXL4pdgTu2EtCjgiYyq
@filipeforattini
filipeforattini merged commit d9dcc88 into main Sep 6, 2026
12 checks passed
@filipeforattini
filipeforattini deleted the feat/panel-throughput branch September 6, 2026 03:14
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