dsh-quota-usage: Viewing DeepSeek Account Remaining Quota in the DSH Sidebar

Introduction

When running sessions in DeepSeek Harness (DSH), confirming recharge balances and bonus credits often requires switching to the official account page. Although there are entries for Settings and Account at the bottom of the sidebar, they do not directly display the total Platform wallet amount. If you want to see “how much is left” at a glance within the same interface used for coding and tuning agents—without opening extra pages or integrating third-party statistics—the community client plugin dsh-quota-usage (maintained by lbqcgza) addresses exactly this gap: it pins the total balance (including a breakdown of bonus credits) directly above the username and supports click-to-refresh and session usage estimation.

What is this

dsh-quota-usage is a Web Client Plugin for DSH (Category: Client). It hooks into the sidebar.footer.action slot, displaying a “Quota” row at the bottom of the sidebar, above the username/avatar row, and optionally followed by a “This Session” usage subtitle below. Balance data is sourced from the official Remote interface remote.account.getBalance, the same source as the “Settings → Account” page. The plugin describes itself as zero-telemetry (no disk reporting, no token access, and no browser storage writes other than a single local display preference key).

Repository: https://github.com/lbqcgza/dsh-quota-usage
Directory Page: https://www.skillhub.cn/plugins/lbqcgza/dsh-quota-usage
License: MIT (see package.json in the repository).

Core Features

Below are the capabilities described in the README that align with the implementation description.

Quota Main Row

  • Total Balance: The sum of the Platform recharge balance (normal_wallets) and bonus balance (bonus_wallets) in the current currency; the bonus portion is shown in parentheses. If the bonus is less than 0.01 (or zero), the parentheses and the corresponding display are omitted to avoid noise like <0.01.
  • Status Text: Clear prompts are provided for loading, read failure, disconnected, and logged-out states; the component does not remain silently blank.
  • Click to Refresh: Clicking the entire row triggers an immediate re-read; a spinner appears to the right of the amount during loading. Background polling and refreshes triggered by window focus changes do not flash the spinner.
  • Auto Refresh: Reads once upon mounting; retries every 5 seconds before remote.account is ready, then switches to every 60 seconds after readiness. Page visibility, gaining focus, connection resets, and account login/logout (account.watch) also trigger re-reads; concurrent refreshes are deduplicated into a single Remote call.

Session Usage Subtitle (Optional)

When a session is open, the token usage and estimated cost range (e.g., ~¥1.20–2.40) for the current session can be displayed below the quota. Costs are calculated based on the official price list. Since logs do not contain cost fields and historical requests cannot be traced back to peak hours, a range is displayed; token counts are shown in the hover tooltip, consistent with the DSH tokenUsage projection.

This can be disabled via Settings → General → Session Usage Display; the toggle state is stored in the localStorage key dsh-quota-usage:show-usage (the only local key written by the plugin). It covers the current session only and does not summarize the entire workspace.

Layout and Language

When the sidebar is expanded, it uses a two-line list layout (labels left-aligned, amounts right-aligned); when collapsed to the 56px rail, it transforms into a 36px circular button (the usage subtitle is not displayed in rail mode). Interface text switches between Chinese and English following the DSH language settings.

Environment and Limitations

  • Requires DSH 0.2.0-rc.2 or newer Web version (Desktop App or dsh web). Relies on sidebar.footer.action and remote.account; profiles without a Web client (headless / SDK / ACP) are not applicable.
  • Read-only display; does not provide recharge or alternative entry points to the official account overlay.
  • Prioritizes CNY for multi-currency displays; otherwise, uses the first wallet currency.
  • Usage costs are estimates, not billing statements; price changes require updating the price constants within the plugin (see repository instructions).

Installation and Activation

Install via plugin_manager within DSH (Creator mode or the plugin page in Settings). Use the repository README for installation commands:

plugin_manager install_bundle  target = github:lbqcgza/dsh-quota-usage

If using a local repository path:

plugin_manager install_bundle  target = <absolute path to this repository>

The Desktop App requires a restart after installation: The client module startup image is generated only when the host process starts; refreshing the page alone will not load the new plugin. For dsh web browser mode, simply refreshing the page is sufficient. Once installed, a “Quota” row will appear at the bottom of the sidebar, above the Settings and Username rows.

The plugin runs with the permissions of the current DSH process; please review the source code and MIT license before installation to ensure compliance with your security and compliance requirements.

Typical Usage

  1. Complete installation and restart or refresh according to your environment (see previous section).
  2. After logging into your DeepSeek account, expand the sidebar and view Quota and the amount on the right above the username; hover to see the recharge/bonus breakdown, update time, auto-refresh interval, and current session tokens and estimated range.
  3. For immediate updates, click the entire Quota row to trigger a manual refresh.
  4. If the session usage row is not needed, disable it in Settings → General → Session Usage Display.

Illustration of the expanded sidebar (from README):

  Quota                    ¥13.34 (Bonus ¥1.00)
  This Session            ~¥1.20–2.40
  ⚙ Settings
  (Avatar) John Doe

Developers modifying lib/client.js can disable and then re-enable the plugin on the plugin page to reload page modules without restarting the App (different from “initially installing a new client plugin”).

Privacy and Security (Summary)

  • Holds no credentials; only calls remote.account.getBalance. Request metadata includes version, locale, and timezoneOffsetSeconds, consistent with the official account page.
  • The Host side has an empty apply, registers no HTTP routes, and executes no commands or file reads.
  • No telemetry outbounds such as fetch / XHR / WebSocket; security issues can be submitted via the GitHub private vulnerability reporting channel (see repository SECURITY.md).

Conclusion

dsh-quota-usage places the total Platform wallet amount and optional session usage estimates in a fixed sidebar position, suitable for users working long-term in the DSH Web client who do not want to switch to the account page frequently. The community plugin directory is not officially affiliated with DeepSeek or Hithink RoyalFlush; installation and usage are subject to your local DSH version and repository instructions.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye