y2zyyr/dsh-token-usage-sidebar

Keeps provider-reported token usage locally with both a persistent sidebar summary (Today / Yesterday / lifetime Total) and a native Settings → Token Usage page in DSH Web and Desktop. The lifetime ledger is a plugin-owned SQLite database with a legacy-JSON auto-migration, replay-safe accounting, and honest partial-history/coverage states instead of silently zeroing known totals.

dsh-token-usage-sidebar keeps provider-reported token usage locally and presents it two ways: a persistent sidebar summary (Today, Yesterday and a lifetime Total) placed in the DSH web sidebar, and a native Settings → Token Usage page positioned after Agent Presets and before Plugin Market. The settings page carries compact per-range metric cards for Total, Input, Output, Cache, Reasoning and Calls, a detail range selector (Today / Yesterday / 7D / All time) with the filters on one row, per-range totals for Input, Output, Cache Read, Cache Write, Reasoning and call count, dynamic provider/model filters built from the exact names present in the selected range (no hard-coded provider directory), a compact provider/model table with expandable bucket details, and a seven-local-day table that retains zero-value days. The lifetime accounting store is a plugin-owned SQLite database (Node's built-in node:sqlite, WAL journal) rather than a monolithic JSON root, so write latency stays flat as history accumulates; legacy JSON records are imported transactionally with a backup and a rollback on failure. Accounting is replay-safe (each provider attempt counted once, explicit retries contribute their own usage, forks exclude inherited events), historical recovery reports honest scan/coverage figures, and failures never silently replace known totals with zero — visible recovery, partial-history and stale-data states are shown instead.

Usage & Billing ★ 3
View on GitHub ↗

Install

dsh plugin --profile web add @y2zyyr/dsh-token-usage-sidebar

Copied verbatim from the README's Installation → Recommended (DeepSeek Harness) block; the same section documents the Desktop profile form dsh plugin --profile desktop add @y2zyyr/dsh-token-usage-sidebar. The README notes dsh plugin accepts the scoped package name directly and that the loader entry keeps the stable id token-usage-sidebar.

Compatibility

A community plugin for the DSH Web and Desktop profiles — not an official DeepSeek plugin. Restart dsh web (or the Desktop app) after installation; the Desktop-provided CLI manages its reserved desktop profile.

Details

Alternatives

940842546/dsh-usage-billing · dingyi222666/dsh-wakatime · FengHuoLinShan/dsh-plugin-llm-balance

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins