dsh-quota-overview: Add DeepSeek balance and OpenCode Go usage to sidebar

Introduction

The DSH (DeepSeek Harness) interface lacks a dedicated quota panel. To check account balance, one usually has to open the DeepSeek console; to confirm how much is left in the OpenCode Go plan window, another page needs to be opened. These two numbers are located in different places. For people running agents for a long time, the only options are repeatedly switching windows to confirm, or simply relying on scripts to check the APIs.

dsh-quota-overview solves this problem. It is a DSH Web plugin maintained by joyboy-yy. It adds a full row of “Quota” entries at the bottom of the sidebar, above the user avatar, displaying both the DeepSeek account balance and the OpenCode Go 5-hour / weekly / monthly usage. Clicking the entry opens a detail modal where you can see the breakdown and reset countdown. If keys are missing, you can also fill in the API Key directly in the modal. Below is an introduction to its features, installation, and usage.

What it does

One-sentence positioning: Adds a persistent sidebar quota entry for the DSH Web client and aggregates the DeepSeek account balance and OpenCode Go plan usage in one place.

Repository: https://github.com/joyboy-yy/dsh-quota-overview. License MIT (© 2026 joyboy-yy), latest version on npm 1.0.1 (released 2026-11-05). GitHub stars are 0, an early project maintained by an individual.

It solves the trouble of “having to leave DSH to check quotas”: the entry is persistent in the sidebar; you can see the summary just by hovering; clicking it shows details, without needing to manually write scripts for polling.

Core Features

Sidebar Entry

The entry is a full row, displaying the summary in two rows:

  1. First row: DeepSeek Balance (¥);
  2. Second row: OpenCode Go badges for 5-hour / weekly / monthly usage, color rules are <60% green, 60–85% yellow, ≥85% red;
  3. Hovering shows the full summary; when the sidebar collapses into a narrow column, the entry automatically turns into an icon.

Detail Modal

Clicking the entry opens a modal supporting three close methods: Esc, clicking the backdrop, and the ✕ in the top-right corner. The modal is divided into two cards:

  • DeepSeek Card: Total amount, top-up balance, bonus, available status, data source;
  • OpenCode Go Card: Three progress bars (5 hours / weekly / monthly), percentages, reset time, and a countdown that updates every second.

There is a refresh button in the top-right corner. When bypassing the cache is needed, the plugin provides a ?fresh=1 parameter to skip the 30-second cache, and there is an “Refresh All” button to refresh both types of data at once.

Key Parsing Order

The plugin reads credentials first and usually works with zero configuration. The parsing order is as follows:

  1. DSH Credential Storage: DEEPSEEK_API_KEY / OPENCODE_GO_API_KEY (also overrides values provided by startup environment variables);
  2. Same-name process environment variables;
  3. opencode-go entry in the OpenCode CLI login file ~/.local/share/opencode/auth.json.

Prompt to Fill in When Missing

When neither type of Key is found, or the upstream returns a 401, the corresponding card in the modal directly displays a password input box. Saving will write to the two DSH credentials DEEPSEEK_API_KEY / OPENCODE_GO_API_KEY, sharing the same key with the DSH model provider, and re-query immediately after saving.

The plugin also supports “Change Key” and “Clear” saved Keys (Clear requires confirmation). If the Key comes from an environment variable or is read-only, the plugin will reject the operation and prompt for the reason.

Installation & Enablement

Installation commands come from the README:

# Install from npm (after release)
dsh plugin add dsh-quota-overview

# Or specify a profile
dsh plugin --profile desktop add dsh-quota-overview

You can also install via the Plugin Market in DSH’s “Settings → Plugins” by searching for dsh-quota-overview (after it is listed).

The plugin package requires Node >= 22.19.0 (see engines field) and belongs to the Web platform client. After enabling, the entry in the sidebar will be visible without additional configuration.

Typical Usage

After installation, daily usage is divided into three steps:

  1. View Summary: The persistent “Quota” row at the bottom of the sidebar shows the DeepSeek balance and OpenCode Go usage for three tiers. When the 5-hour window is about to run out, the badge changes from green to yellow to red, so you know the situation without clicking.
  2. View Details: Click the entry to open the modal. When the 5-hour window is almost used up, there is a countdown ticking down below the progress bar. You can directly judge whether to wait for the reset or switch tasks first. Click the refresh button in the top-right when you need new data, or request ?fresh=1 when you need to bypass the cache.
  3. Fill Key: On first use, if neither credentials nor environment variables contain a Key, a password input box will appear in the modal. Fill in DEEPSEEK_API_KEY / OPENCODE_GO_API_KEY and save; the plugin re-queries immediately, and the entry will then display values normally.

Keys are only used within the Host process and will not be returned to the browser; the browser side only receives the balance, percentages, and source description. This way, even if the modal renders a client-side page, the API Key will not be exposed to the browser context.

Data Sources

The plugin queries upstream interfaces as follows:

  • DeepSeek: GET https://api.deepseek.com/user/balance (Bearer DEEPSEEK_API_KEY)
  • OpenCode Go: GET https://opencode.ai/zen/go/v1/usage (Bearer OPENCODE_GO_API_KEY)

Credential sources and these two interfaces both come from the “Data Sources” and “Key Parsing Order” sections of the README.

Suitable Scenarios & Notes

Suitable for the following types of people:

  • Users who run tasks in DSH for a long time and need to frequently confirm DeepSeek balance and OpenCode Go window status;
  • People who want to check quotas “without leaving the interface” rather than maintaining polling scripts;
  • People who want to complete checking details, watching the reset countdown, and filling in API Keys in the same modal.

Three points need attention:

  • The plugin runs with the permissions of the current dsh process. Before installing, you should check the source code (index.js, client.js, cordis.patch.yml) and the license (MIT) to confirm that its routing, credential read/write behavior matches your environment;
  • GitHub stars are 0 and npm release time is short, relying on upstream interface behavior. When DeepSeek or OpenCode changes the interface, the plugin may need to be updated synchronously;
  • The plugin will read and write DEEPSEEK_API_KEY / OPENCODE_GO_API_KEY, two DSH credentials, sharing the same Key with the model provider. If this does not match your key management habits, you need to evaluate it yourself.

Conclusion

The value of dsh-quota-overview is bringing the quota checking task back into the DSH interface: a single line entry handles the summary, the modal handles details and the reset countdown, and fills in missing keys via the modal. For users who use DeepSeek and OpenCode Go simultaneously, it reduces the cost of repeatedly switching windows to confirm.

Directory Page: https://www.skillhub.cn/plugins/joyboy-yy/dsh-quota-overview
GitHub: https://github.com/joyboy-yy/dsh-quota-overview

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

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

Xiaoye