DeepSeek Harness Plugin

MoreanP2003/dsh-speed-gauge

Stars ★ 1 Downloads (30d) 843 Category Usage & Billing Added 2026-10-19 npm dsh-speed-gauge

Real-time generation-speed gauge for DSH: a half-circle dial and a flowing trend curve, sampling tok/s 50 times a second for finer, more accurate measurement.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-speed-gauge

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:MoreanP2003/dsh-speed-gauge

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

中文 | English

dsh-speed-gauge

A generation-speed gauge for DSH. It lives in the header bar: click once to open, and watch how fast the current session is producing tokens.

50 tok/s samples per second: every streamed chunk is counted for finer, more accurate measurement, and a busy main thread does not stall the animation.

Panel

Features

  • Live speed: 0–500 tok/s half-dial with a smoothly animated needle
  • 30-second curve: a continuously scrolling trend chart, so bursts and dips are visible
  • Average / peak: both over the last 30 seconds; peak falls back once it leaves the window
  • Total output: uses the provider's official outputTokens when available
  • Per-session: switching session or sub-agent switches the numbers with it
  • Out of the way: floats at the top of the conversation column and matches its width; the header button hides it any time
  • Follows the host theme: light text on dark UI, dark text on light UI

Install

Plugin marketplace

Not listed yet. Once it is, you will be able to find dsh-speed-gauge in the DSH marketplace. For now use one of the options below.

Option 1: GitHub Releases (recommended)

Download dsh-speed-gauge-1.0.0.tgz from Releases, then:

dsh plugin --profile desktop add ./dsh-speed-gauge-1.0.0.tgz

Option 2: Clone the repository

git clone https://github.com/MoreanP2003/dsh-speed-gauge.git
dsh plugin --profile desktop add ./dsh-speed-gauge

Option 3: npm (one command)

dsh plugin --profile desktop add dsh-speed-gauge
dsh plugin --profile web add dsh-speed-gauge

Package page: https://www.npmjs.com/package/dsh-speed-gauge

Desktop note

The desktop app ships its own CLI; a plain dsh command cannot manage the desktop profile:

"<install dir>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add <package or folder>

Reload the app (or restart it) after installing, and the header button shows up.

Update / uninstall

dsh plugin --profile desktop add <package or folder>
dsh plugin --profile desktop remove dsh-speed-gauge

Usage

After installing, a Speed dial button appears in the header bar. Click it to open the panel, click again to close it (the choice is remembered).

Click here to open the panel

The Reset button on the right clears the totals and peak for the current session.

Light Dark
Light Dark

How the numbers are computed

  • Character counts come from llm/stream deltas: text, reasoning text, and tool-call arguments;
  • Live speed = character rate ÷ characters-per-token, with the ratio calibrated online from official usage.outputTokens;
  • Total output accumulates official usage when present, otherwise falls back to an estimate;
  • Curve, average, and peak all use a 30-second window.

Compatibility

  • DSH >= 0.2.1 (developed and verified on 0.2.1-rc.2), requiring the webServer service and the llm/stream hook
  • Node.js >= 20
  • Requires the DSH webServer service and the llm/stream hook
  • React 18 is provided by the host and not bundled
  • Rendering uses a Worker with OffscreenCanvas; if the page CSP blocks Blob workers it falls back to a one-line text readout
  • All DOM class names are prefixed with dsg-, and the plugin only touches nodes it created, so it coexists with other plugins

Web / remote access

Custom routes only accept loopback by default. For the web build or a reverse proxy, set this where DSH starts:

DSH_SPEED_GAUGE_ALLOW_REMOTE=1

Debugging

Sample logging is off by default. Set DSH_SPEED_GAUGE_LOG=1 to write it to the system temp directory.

Development

node --test test/sampler.test.mjs test/host.test.mjs
File Purpose
host.js Listens to llm/stream, serves SSE and snapshot routes
sampler.js Sampling and statistics, pure logic, unit-tested
client.js Header button and panel container
panel-worker.js Panel rendering (Worker + OffscreenCanvas)

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.