dsh-account-ring: A Unified View of Multi-Source Balances and Quotas at the Bottom of the DSH Sidebar

Introduction

When using DeepSeek Harness (DSH) to connect to DeepSeek’s official account, Volcengine, Codex, LobeHub, and other models or tools, balances and usage are often scattered across different consoles, CLIs, or local login states. Checking them usually involves switching pages, running commands, or opening various usage pages, which interrupts the flow of coding or agent tuning. The community plugin dsh-account-ring (maintainer hexiao160705-dev) collects balances or quotas from multiple providers into a “ring” display at the bottom of the sidebar: it defaults to showing the DeepSeek official recharge wallet; clicking expands details for each provider, and allows specifying one source as the primary display and ignoring alerts for unused sources.

What is this

dsh-account-ring is a multi-provider balance/quota ring plugin for DSH, version 0.3.0, MIT license. It injects into the DSH client sidebar via a Cordis patch (@deepseek-ai/dsh-client-ui-sidebar), displaying the ring in the footer area next to Settings. After aggregating data from various sources on the host side, the browser receives only display fields (provider labels, amount or percentage, reset time, status words); sensitive information does not pass through frontend routes back to the browser.

Core Features

Ring and Interaction

  • The ring defaults to showing the DeepSeek official balance of the logged-in DSH account (via ctx.remote.account.getBalance, no need to configure DEEPSEEK_API_KEY).
  • Clicking the ring views details for each provider; the Primary button on a row sets a provider as the main display (saved in the current browser’s localStorage).
  • The bell button ignores or restores alerts for a specific provider (only takes effect for the current browser configuration; not synced across devices).

Built-in Providers

DeepSeek: Uses the logged-in DSH account; details may show bonus quotas in some cases.

Volcengine / Volcengine: Reads Agent Plan AFP quota and cash balance via the locally logged-in ve CLI, for example:

ve ark GetAFPUsage --force --version 2024-01-01 --method POST --output json

Also queries balance via ve billing QueryBalanceAcct. If ve is not in PATH, you can set the environment variable VOLCENGINE_CLI. The plugin does not save AK/SK; related actions are read-only.

Codex: Reads ~/.codex/auth.json (or $CODEX_HOME/auth.json), calls the ChatGPT usage API and normalizes 5-hour and weekly windows; prompts to run codex login in the terminal if the login expires. The plugin does not write to ~/.codex/auth.json; the access token is retained only in the host’s memory after refresh.

LobeHub and other coding plans: The host reads the DSH model directory via ctx.llm.listProviders() and listModels(). Providers configured in the model list that have at least one model automatically appear as plan rows (refreshes approximately every 30 seconds). LobeHub displays quota percentage, remaining balance, reset time, and model list via GET https://app.lobehub.com/api/v1/usage; plans without a public balance API can still appear as display and selection rows without fabricated percentages.

Manual Entries

For tools that are not DSH model providers, you can add manual rows in ~/.dsh/account-ring.json, supporting remainingPercent or amount + currency:

{
  "providers": [
    { "id": "some-api", "label": "Some API", "amount": 18.5, "currency": "CNY" }
  ]
}

Alert Rules

  • Usage / Manual percentage: Warning if remaining ≤ 20%, Error if ≤ 10%.
  • Balance: Warning if ≤ ¥10, Error if ≤ ¥5 (Ring fill scales to a full ring of ¥30).

Privacy and Refresh

Codex token, account ID, email, and raw usage payload remain on the host side; the DeepSeek balance uses the already masked wallet amount from the DSH account Remote. Refreshes every 30 seconds when the page is visible; no polling when hidden. Settings do not sync across browsers or machines (local-first).

Installation and Activation

Install from GitHub (DSH desktop configuration):

dsh plugin --profile desktop add github:hexiao160705-dev/dsh-account-ring

Or install from a local checkout directory:

dsh plugin --profile desktop add /absolute/path/to/dsh-account-ring

After installation, reload or restart DSH; the ring will appear in the sidebar footer.

Typical Usage

  1. Install the plugin and restart DSH. Confirm you have logged into a DeepSeek account; the sidebar footer should display the default DeepSeek balance ring.
  2. If using Codex, complete codex login in the terminal first; if using Volcengine, ensure the local ve is logged in and the command is available, and set VOLCENGINE_CLI if necessary.
  3. Click the ring to view the list, set frequently used sources as Primary, and click the bell to ignore alerts for deprecated tools.
  4. For APIs that cannot be automatically discovered, edit ~/.dsh/account-ring.json to add manual providers entries.

Use Cases and Notes

Suitable for developers doing long-term development in DSH who rely on multiple models or billing tools and want to check balances and quotas at a glance in the same interface.

It is recommended to read the GitHub repository source code and the MIT license before installing; the plugin accesses local CLI, local codex login, and configuration with the current DSH process permissions, so you should evaluate the security implications yourself. The Codex usage API is a non-public contract and may change. The DSH ecosystem philosophy is “everything is a plugin”; the community directory site and DeepSeek/Fangfang have no official affiliation; this introduction is not expressed in the tone of an official app store.

Conclusion

dsh-account-ring gathers DeepSeek wallet, Volcengine AFP, Codex plan, LobeHub, DSH configured coding plans, and manual entries into the sidebar ring, reducing the need to switch back and forth to check balances. For more information, see the community directory hexiao160705-dev/dsh-account-ring and GitHub README.

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

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

Xiaoye