The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When debugging agents or analyzing sessions, simply looking at total token consumption is often not enough. You need to know which requests hit the cache and how large the output volume was. The dsh-token-meter-mood plugin was designed specifically to meet this visualization need.

Core Features

The plugin displays token consumption details and a mood emoji below each assistant reply for that interaction.

  1. Statistics Dimension: Each reply (turn) is measured separately, including input, cache hits, cache misses, and output.
  2. Number Format: Uses Chinese numeric units and displays exact values with 4-digit grouping (e.g., 190万2900, 1亿2900万3999).
  3. Mood Emoji: The emoji is graded only by the output tokens of that reply:
    • < 50,000: 🥳
    • 50,000–100,000: 😄
    • 100,000–200,000: 🙂
    • 200,000–400,000: 😐
    • 400,000–600,000: 😕
    • 600,000–800,000: 😟
    • 800,000–1,000,000: 😠
    • 1,000,000: 😡 (overheated)

  4. Artifacts and Reasoning:
    • Turns with artifacts (edited/written files) retain the “Artifacts” line, and files can be clicked to open.
    • When reasoning tokens are present, hovering displays “Output X (incl. reasoning Y)”.

Install and Enable

Prerequisite: dsh --profile web has already been run locally (the profile directory ~/.dsh/profiles/web/ has been initialized).

Run the following command to install:

pnpm dsh plugin --profile web add "github:firekula/dsh-token-meter-mood"

After installation, restart dsh --profile web (or refresh the page). After refreshing the page, a token line will appear below each completed assistant reply.

Note: Older versions (≤0.2.1) lack the dsh.bundle.patch declaration, so the install command only installs it as a regular dependency and does not mount it. If you install an older version, you need to manually add the following to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: token-meter-mood
      name: 'dsh-token-meter-mood'

Starting from 0.2.2, this step is no longer required.

Adjustment and Build

If you need to customize emoji thresholds or modify functionality, you can modify the source code.

  1. Modify the tiers of emojiOfOutput in src/client/TokenMeterTail.tsx.
  2. Rebuild: place this repository under packages/client/ in the deepseek-harness monorepo, and run tsc following its build process.

Summary

dsh-token-meter-mood uses intuitive emojis and clear numeric grouping to help developers quickly assess the cost and complexity of a single reply. Combined with cache-hit statistics, it enables more precise optimization of agent costs.

  • GitHub repository: https://github.com/firekula/dsh-token-meter-mood