Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture that allows developers to extend its capabilities. In model inference debugging or performance monitoring scenarios, directly observing real-time output speed (tok/s) and per-step detailed metrics (such as TTFT and cumulative tokens) helps identify performance bottlenecks. dsh-token-speed is a plugin that runs on the DSH web client. It visualizes speed data through a draggable circular gauge.

Core Features

The plugin is anchored in the bottom-right corner of the web GUI by default and provides the following capabilities:

  1. Real-time Speed Display: During generation, the gauge needle and central number rise in real time with streamed output. The speed is estimated from the output text volume × the measured chars/token ratio.
  2. Per-Step Precise Calibration: After each step completes, it calculates the actual tok/s using the provider-reported usage.outputTokens and timing (firstToken → completed), then uses this to recalibrate the chars/token ratio.
  3. Details Panel: Click the gauge to expand it and view real-time speed, precise data for the previous step, output tokens, TTFT, and cumulative output within the current window.
  4. Status Indication: It indicates generating, tool executing, or idle state through colors or status markers.
  5. Draggable and Persistent Position: It supports press-and-drag repositioning, and the position is remembered in localStorage.
  6. Browser-Only: It does not modify host state and only reads session data as a read-only subscriber.

Installation and Enablement

The plugin is installed into a DSH profile via a local link. Using the desktop profile as an example, the steps are as follows:

  1. Create or clone dsh-token-speed in a local repository, and add the dependency to the DSH profile’s package.json:
// ~/.dsh/profiles/desktop/package.json
{
  "dependencies": {
    "dsh-token-speed": "link:/Users/<you>/Documents/DSH/dsh-token-speed"
  }
}
  1. Enter the profile directory and install dependencies:
cd ~/.dsh/profiles/desktop
pnpm install
  1. Activation Rules:
    • insert lines in cordis.patch.yml are hot-reloaded by the profile’s HMR watcher, so no restart is usually required after changes.
    • If modifying the source code of lib/client.js, a full page refresh (Cmd+R) is required for changes to take effect.

Typical Usage

After installation, the plugin is automatically mounted in the bottom-right corner of the interface. During model generation, observe the changes in the gauge needle and number; click the gauge to view the specific speed and token statistics for the previous step; press and drag the gauge to move it to any position on the screen.

Architecture and Considerations

The plugin’s data sources and scope constraints are key implementation details:

  • Data Sources: The plugin does not use useChat or useProjection in the session scope, nor can it read the session snapshot in the root scope (this scope only contains .subagent/.queue/.value). The correct entry point is to use ctx.uiConversation.binding(sessionId).target('chat') to retrieve the data.
    • legacy.partial: used as the real-time speed source; it contains in-progress {turn, step, blocks}.
    • legacy.nodes: used as the precise tok/s source; it contains usage.outputTokens and timing for settled nodes.
    • legacy.runningCalls: non-empty indicates that a tool call is executing.
  • Dependency Services: It depends on slots (slot registration) and uiConversation (session chat data).
  • Ecosystem Background: This plugin belongs to the DSH ecosystem and is maintained by the community. The directory page and GitHub link are provided at the end of this document.

Conclusion

dsh-token-speed provides DSH users with a lightweight inference speed monitoring solution through a circular gauge and details panel. It leverages browser-side capabilities and, without altering host logic, provides precise step-by-step performance data.