Repository navigation
v1.3.0 — accurate AVG, idle-stop, per-cell particle colors
Fixes
- AVG / live TPS no longer inflated by tool calls. Tool-call argument streaming now counts toward live TPS and the AVG generation window. Steps that made tool calls without streamed arguments (older opencode) are excluded from AVG/calibration instead of being counted as "N tokens in 1s".
- Non-streamed reasoning is not counted (models that report reasoning tokens without streaming them).
- Spinner no longer gets stuck after an interrupt or error (
session.idle/session.error, V2session.execution.*, plus a stale fallback). - A completion only clears the live state of the message that is actually streaming.
- Writing to a destroyed renderable can no longer throw; one failing view doesn't break the others.
- opencode 2.x: the meter follows session switches, and the slot is unregistered on dispose.
Performance
- No timers and no re-renders while idle. Updates are throttled (≤10 Hz, or the spinner interval while thinking) and only re-render when the text actually changes.
Display
- Single text node: the idle line is exactly
TPS -- | AVG -- | TTFT --with no trailing gap. Per-cell gradient in the thinking stream is back.
Options
spinner.intervalMsis clamped to 40–1000 andspinner.cellsto 2–16. Invalid hex colors and non-ascending tiers fall back to the defaults.
Engineering
- Pure measurement logic is shared between
measure.tsandtui.tsx, with a sync test enforcing it (67 tests). CI now runstsc. The manual Publish trigger was removed. Added a LICENSE file (MIT).
Updating
opencode 1.x: delete ~/.cache/opencode/packages/@jack-yang/opencode-tps-meter@latest, run opencode plugin @jack-yang/opencode-tps-meter -g -f, then restart opencode.