Introduction

In the DeepSeek Harness (DSH) ecosystem, debugging and optimizing model inference costs are a key focus for developers. DSH’s default chat interface usually streams the last line of the thinking process in the “Think” area, which makes it difficult for developers to intuitively estimate token consumption. The dsh-thinkmeter plugin was created to solve this problem by replacing the streamed preview with real-time token counting.

What Is This

dsh-thinkmeter is a DeepSeek Harness (DSH) client plugin developed by maintainer dmz2922990. Its core purpose is to replace the streamed “Think” preview in the chat view with a real-time token count display.

Core Features

  1. Token counting and status display
    The plugin displays different information based on the model’s thinking state. While thinking is in progress, it shows an animated token count (for example, Thinking ≈ 1,234 tokens); after thinking finishes, it shows Think · 1,234 tokens. The counting logic prioritizes the model-reported usage.reasoningTokens; if that is unavailable, it falls back to an estimation algorithm (CJK characters × 0.6 + other characters ÷ 4).

  2. Interaction and expansion
    Clicking the line can expand or collapse the full reasoning text. Keyboard interaction is also supported: press Enter or Space to toggle between expanded and collapsed states.

  3. Integration and compatibility
    The plugin exists as a DSH profile bundle and automatically integrates with the current profile’s layer list after installation.

Installation and Enablement

It is recommended to install it directly from the command line:

dsh plugin --profile web add https://github.com/dmz2922990/dsh-thinkmeter.git

Replace web in the command with the profile name you are using (for example, tui or headless). This command invokes pnpm add in the profile directory, so it supports specifiers such as Git URLs, tags, or local paths. If GitHub credentials are not configured, you can use the SSH form.

Typical Usage

After installation, initiate requests the same way as normal DSH chat usage. In the conversation interface, the “Think” area no longer displays streamed text; instead, it shows a real-time token count. Click the area to view the full reasoning text.

Use Cases and Notes

This plugin suits developers who need to precisely track model reasoning token consumption. However, keep the following trade-offs in mind when using it:

  • Markdown rendering impact: When the plugin is active, regular assistant text blocks are rendered as plain text instead of fully formatted Markdown.
  • Dependency requirements: The plugin depends on Cordis ^4.0.0 and React >=18.

Brief Conclusion

The dsh-thinkmeter plugin simplifies model tuning in DSH by quantifying token consumption during the thinking process. See the directory page and GitHub repository for more details and updates.