v1.0.0 Token Usage Insights
Token Usage Insights
v1.0.0 turns the sidebar summary into a complete native Settings → Token Usage experience.
- Four overview cards: All time, Today, Yesterday, and Last 7 days.
- Today / Yesterday / 7D / All time detail ranges with Input, Output, Cache Read, Cache Write, Reasoning, and call counts.
- Provider and model aggregation, sorted by total usage, plus a zero-filled seven-local-day table.
- Aggregate-only local details API; individual ledger records never reach the browser.
Migration
The durable ledger is upgraded to schema v4. On first v1.0.0 launch it replays recoverable session events once to enrich existing calls with exact token buckets and provider/model metadata. Existing IDs are enriched or replaced by a higher-sequence final message, never added to lifetime totals again. Old values that cannot be recovered remain explicitly unclassified rather than being assigned a fabricated date or model.
Validation
- 28 automated accounting, migration, and range-aggregation tests pass.
- Production bundles are rebuilt;
client.jsandlib/client.jsare byte-identical. - Verified in DeepSeek Harness web profile at
127.0.0.1:3080: settings navigation, all cards, range switching, model table, daily table, and restart-safe totals.
Upgrade
dsh plugin --profile web update dsh-token-usage-sidebar
# Restart dsh web after updating.No npm publication is required. Existing local accounting is retained.