Introduction¶
When writing agents or running long sessions in DeepSeek Harness (DSH), the official usage capsule typically only reflects the tokens and costs of the current session. Answering questions like “How much did I burn this week?”, “Exactly how much money did the cache save?”, or “Which tool is the cost mainly going to?” often requires digging through logs or writing custom scripts to aggregate data.
The community plugin dsh-usage-orb (maintainer: zhifeiNi, MIT license) solves this. It provides a persistent ring in the bottom right corner of the interface, accompanied by a draggable cross-session usage panel. Data is read solely from local session logs—no network requests or telemetry are involved. It is categorized as a client-side plugin and currently has 1 star on GitHub.
What is this?¶
DSH Usage Orb: A circular progress ring in the bottom right corner + a draggable usage panel. The host side scans *.jsonl files under ~/.dsh/storages/ and performs cross-session aggregation based on DSH’s four token categories. The client side mounts a button and a self-contained panel in the Web interface (zero dependencies, zero build steps; uses only Node built-in modules and react provided by the host).
The differences from the native capsule can be summarized as follows: the native one focuses on the current session; this plugin adds cross-session views, cache economics, attribution by model/tool, and local capabilities like balance tracking and layout preferences (balance depends on DSH account services and degrades to usage-only if unavailable).
Core Features¶
The following capabilities are derived from the repository’s README and package.json, organized by usage path.
Interface and Interaction¶
- Persistent Ring: A ring indicator in the bottom right corner; hover to view balance percentage; status indicators include breathing/sweep animations.
- Usage Button & Panel: A “Usage” button appears on the right side of the toolbar at the top of the conversation area (see the “Expected Phenomena” section in the README); clicking it opens a fixed-position panel (without occupying the official dock columns).
- Draggable Button: Position is remembered proportionally; double-click to reset.
- Tile DIY: Similar to the iOS Control Center—drag cards to reorder, drag the bottom-right handle to resize, ⊙ to hide; supports two text density levels (Simple/Detailed) and 15 feature toggles.
- Button Faces: Default is the project icon; optional bloub robot (eyes follow cursor, etc.; disabled by default; see the repository’s
THIRD-PARTY-NOTICES.mdfor license).
Statistics and Cost¶
- Cross-session Usage: Four token classifications (Uncached Input, Cache Read, Cache Write, Output), sessions/requests/turns, breakdown by model, and cache hit rate.
- Cost & Savings: Estimated CNY cost by model, amount saved by cache, peak/off-peak ratio, and “shift peak to off-peak” simulation.
- Tool Burning List: Cost attribution to specific tools/commands, including failure rates.
- Level Bar: Cumulative tokens divided into Lv.1–6, accompanied by consecutive usage days and today’s intensity.
- Click Heatmap: Details for the current day (tokens / cost / requests / model ratio).
- Share Card: Export a PNG containing only aggregate numbers.
Balance and Data Metrics¶
- Balance Tracking: Water level curve, consumption alerts, and recharge prompts; the balance health bar is full at the historical high-water mark and breathes an alarm when critically low (requires DSH account service).
- Cache Hit Rate (consistent with official):
Cache Hit Rate = Cache Read / (Uncached Input + Cache Read)
The four field names are: uncachedInputTokens, cacheReadTokens, cacheWriteTokens, outputTokens. The plugin declares that it does not mix metrics from different sources.
Privacy and Local Files¶
- Read-only access to local session logs and cache under
~/.dsh/usage-panel/(layout, balance watermarks, errors, etc.). - Does not store account credentials; balance is read via DSH’s
deepseekAccountservice. To reset, delete~/.dsh/usage-panel/.
Installation and Activation¶
The installation method depends on who manages the profile. The Desktop profile is exclusively managed by the Electron application and cannot be modified via CLI (it will report profile "desktop" is managed exclusively by the Electron application).
Desktop (DeepSeek Harness Application)¶
- Open the Plugins page in the left sidebar.
- In “Install from GitHub / Local Path”, enter:
https://github.com/zhifeiNi/dsh-usage-orb
- Restart the application after installation; the appearance of the circular progress ring in the bottom right corner indicates successful loading. You can toggle or uninstall it on the same page.
CLI or Web Terminal (profile managed by CLI)¶
Replace --profile with the actual profile name you use and that is managed by the CLI:
dsh plugin --profile web add github:zhifeiNi/dsh-usage-orb
dsh plugin --profile web remove dsh-usage-orb
Uninstallation example:
dsh plugin --profile web remove dsh-usage-orb
Environment and Compatibility¶
package.jsonrequires Node>=22.19.peerDependenciesinclude@deepseek-ai/cordis,@deepseek-ai/dsh-client-runtime,@deepseek-ai/dsh-client-ui-slots, andreact/react-dom; refer to thepackage.jsonin the repository for specific version ranges.- Current plugin version: 0.2.2.
Typical Usage and Expected Phenomena¶
After starting DSH and enabling the plugin, you can self-check according to the README:
- Host Logs should display two lines similar to these (numbers vary by machine):
[dsh-usage-orb] Host-side loaded
[dsh-usage-orb] Self-check: Scanned 12 session files, adopted 9, skipped 3; Total 857218617 tokens, cache hit rate 99.63%, 1 model, 2 days with dates
The presence of host logs indicates that session file scanning and aggregation are working normally.
-
A “Usage” button appears on the right side of the toolbar; clicking it should display a panel showing that the link is established, along with plugin ID, React version, load time, and other information.
-
Daily Use: Hover over the bottom-right ring to see the balance ratio; open the panel to view cross-session tokens, cache hit rates, costs, and tool rankings; drag the popup or adjust tile layouts as needed; use the share card to export a PNG when external display is required.
The README notes: LLM calls triggered by web search are not included in the statistics, and the panel will prompt “Not Included”.
Use Cases and Notes¶
Who it’s for: Developers who run multiple sessions long-term on the DSH Desktop or Web/CLI profiles, care about token structure (especially the impact of cache hit rates on costs), and need tool-level cost attribution or local balance curves.
Please be aware before installing:
- This plugin runs with the current DSH process permissions and reads local session logs; you should review the GitHub Source Code and the MIT license before installing.
- Unofficial plugin, not affiliated with DeepSeek or Hithink RoyalFlush; statistics are for observation only and are not a basis for billing. Changes in internal event streams or
*.jsonllayouts after DSH upgrades may invalidate statistics, requiring fixes alongside upstream updates. - README Known Risks: When inserting via absolute path patches, it has not been fully verified whether
dsh.clientis scanned byctx.clientModules; the toolbar slot name borrows from the third-partydsh-ui-workbench. If your DSH version uses a different slot, the button may not appear, and you may need to switch toctx.sidebarRightTabs.register()according to officialui-sidebar-rightdocumentation. - The community directory SkillHub Plugin Page is an independent ecosystem site, not the official DeepSeek App Store.
Troubleshooting Cheat Sheet (excerpt from README):
| Phenomenon | Explanation |
|---|---|
No [dsh-usage-orb] in logs |
Plugin not loaded; check patch paths and file existence |
| Host logs exist but no “Usage” button | Client bundle may not be materialized; see “Known Risks” |
| Button exists but click does nothing | Check Browser Console (Ctrl+Shift+I) for errors |
Conclusion¶
dsh-usage-orb aggregates DSH local session logs into an actionable cross-session view: a bottom-right orb + a customizable panel, covering the four token classifications, cache economics, costs, balance, and tool attribution, while defaulting to local read-only with no data upload. If you are limited by “only seeing the current session account,” you can install and try it via the application or CLI as described above.
- Community Directory: https://www.skillhub.cn/plugins/zhifeiNi/dsh-usage-orb
- Source Code & Full Documentation: https://github.com/zhifeiNi/dsh-usage-orb