Introduction

In the plugin architecture of DSH, the session status bar can also be integrated as a Web client plugin. dsh-zhipu-codingbar places quota information in the DSH Web session header for the Zhipu GLM Coding Plan, reducing the need for manual quota checks.

What is it

dsh-zhipu-codingbar is a DSH Web plugin maintained by cesarX-AI under the MIT license. Its data source is limited to Zhipu, the client platform is web, and it injects slots and theme.

Core Features

  • Display Zhipu Coding Plan quotas (5-hour/weekly/MCP tools), remaining percentage, reset time, and countdown.
  • Turns yellow when the remaining amount is below 20%, and red when below 5%.
  • Displays a narrow bar in the session header; clicking it expands a detail card below the capsule.
  • When the right sidebar is open, the detail card maintains its width and shifts left to avoid obstruction.
  • Supports polling Zhipu quotas based on refreshMs, defaulting to 60000 milliseconds.

Installation & Enabling

First, install the plugin:

dsh plugin --profile web add github:cesarX-AI/dsh-zhipu-codingbar --config.minimumReleaseAge=0

Then restart dsh web.

Confirm the plugin is attached to the config layer:

dsh --profile web --dump-config | grep -A20 zhipu-codingbar

If doing local development, clone the repository first, then install using the path:

git clone https://github.com/cesarX-AI/dsh-zhipu-codingbar.git
dsh plugin --profile web add ./dsh-zhipu-codingbar --config.minimumReleaseAge=0

After modifying local source code, simply restart dsh web.

Typical Usage

Insert the id: zhipu-codingbar line into the profile’s cordis.patch.yml and configure config.refreshMs.

Override example:

- id: zhipu-codingbar
  config:
    refreshMs: 30000

Subsequent layers of patch will replace the entire config row, not perform a deep merge; when overriding, you must include the keys you want to retain. The schema will fill in unprovided default values.

Configuration & Credentials

Common configuration items:

  • refreshMs: Zhipu quota polling interval, default 60000 milliseconds.
  • zaiApiKey: Optional; if empty, it reads ZAI_CODING_CN_API_KEY or ~/.dsh/.credentials.yaml.

The Zhipu quota interface is:

open.bigmodel.cn/api/monitor/usage/quota/limit

Use ZAI_CODING_CN_API_KEY. The key is used only on the server side, and the route returns derived numbers.

Applicable Scenarios & Notes

Suitable for developers using Zhipu GLM Coding Plan in DSH Web who wish to see quota directly on the session interface.

Pay attention to the following points:

  • The plugin runs with the current dsh process permissions; you should check the source code and license before installing.
  • The data source is limited to Zhipu and does not apply to quotas of other models.
  • Overriding config performs a row replacement, not a deep merge.

Related Links

GitHub Repository:

https://github.com/cesarX-AI/dsh-zhipu-codingbar