pi-tps-status
v1.0.0
Published
Pi extension: configurable tokens-per-second status widget with TTFT, token counts, and provider-usage reconciliation
Maintainers
Readme
pi-tps-status
A pi-coding-agent extension that shows a live tokens-per-second (TPS) widget in the pi status bar while the agent streams a response.
Features
- Live TPS meter with a sliding-window rate, color-coded by speed tiers (
⚡ TPS: 42.1 tok/s [provider]). - TTFT and stats modes. The status suffix can show time-to-first-token, total tokens / elapsed time, both, or neither.
- Three counting strategies.
estimate(chars/4),direct(per chunk), orprovider(exact usage reported by the provider, back-dated across the stream window). - Provider reconciliation. Final provider token counts are merged with fallback estimates; tool-execution time is paused out of the rate.
/tpscommand. Interactive settings list (display mode, counting strategy, end-of-stream behavior) persisted tosettings.jsonwith atomic writes and validation.
Installation
pi install npm:pi-tps-statusUsage
The widget appears automatically on session start. Run /tps to configure it.
Settings are stored under the tokenSpeed key in settings.json (display, tps thresholds and colors, sliding window, count strategy, end-of-stream behavior).
