DeepSeek Harness plugin

dsh-api-usage-bar

Cache-aware API token usage bar for the DeepSeek Harness Web UI

Jump to install

Source facts

Repository
hurry060215-tech/dsh-api-usage-bar
Latest update
Aug 14, 2026
Category
UI Enhancements
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/hurry060215-tech/dsh-api-usage-bar
Plugin: dsh-api-usage-bar
Author: hurry060215-tech

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

dsh-api-usage-bar

![CI](https://github.com/hurry060215-tech/dsh-api-usage-bar/actions/workflows/ci.yml) ![Release](https://github.com/hurry060215-tech/dsh-api-usage-bar/releases/latest)

English | 简体中文

A lightweight API token usage bar for the DeepSeek Harness Web UI. It displays complete-session usage as three segments: cached input, uncached input, and output, with compact values beside the track.

![DSH API usage bar](docs/screenshot.png)

Features

  • Reads the existing DSH tokenUsage session projection; it never calls the DeepSeek API.
  • Reads no API key, polls no account balance, and writes no session-log event.
  • Green is cache-read input, amber is uncached input, and blue is output.
  • Hover text and the accessible label expose exact token totals for all three buckets.
  • Responsive on desktop and narrow screens; narrow layouts hide the words but retain colors and values.
  • UI only: no model tool, system prompt, or token overhead.

Requirements

  • DeepSeek Harness >=0.1.0-rc.6 <0.2.0
  • Web profile
  • Node.js ^22.19.0 or >=24
  • pnpm 10 (dsh plugin invokes it internally)

Install

Run in PowerShell or a terminal:

npm install --global pnpm@10
pnpm --version
npx --yes @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add https://github.com/hurry060215-tech/dsh-api-usage-bar/releases/download/v0.1.1/dsh-api-usage-bar-0.1.1.tgz
npx --yes @deepseek-ai/dsh@0.1.0-rc.6 web

Open <http://127.0.0.1:3080>. The bar appears below the composer after the first completed model request. The release includes prebuilt lib/ output, so users do not need to clone or build the repository.

This plugin is not published to npm. Do not use add dsh-api-usage-bar; the command above installs the prebuilt GitHub Release package directly.

Port 3080 is already in use

If DSH is already running on port 3080, stop that process with Ctrl+C in its terminal and run the web command again so the newly installed plugin loads. If another application owns 3080, use:

npx --yes @deepseek-ai/dsh@0.1.0-rc.6 web --port 3091

Then open <http://127.0.0.1:3091>.

Remove it with:

npx --yes @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web remove dsh-api-usage-bar

Accounting

SegmentDSH token projection fields
Cached inputcacheReadTokens
Uncached inputuncachedInputTokens + cacheWriteTokens
OutputoutputTokens

The three segments are normalized by their token total, so the track shows usage composition, not account quota or balance depletion. DeepSeek request usage reports prompt-cache hit and miss tokens, while the balance endpoint supplies no total-quota denominator; this plugin does not invent an “amount used” percentage.

Development

pnpm install
pnpm run check       # typecheck + tests + build
pnpm pack            # produce an offline-installable tarball

Source layout:

  • src/index.ts: inert Host plugin used for client-module discovery.
  • src/client/index.ts: locale, stylesheet, and composer-dock registrations.
  • src/client/ApiUsageBar.tsx: the track and compact legend.
  • src/client/usage.ts: pure token bucketing and formatting.
  • cordis.patch.yml: profile layer activated by dsh.bundle.

Privacy and model experience

The plugin only reads the cumulative token projection already delivered to the browser. It makes no network request, holds no credential, writes no session event, and changes nothing sent to the model.

License

[MIT](LICENSE)