Introduction

When using sessions in the DSH (DeepSeek Harness) Web GUI, in addition to the final reply, you sometimes want to observe the occurrence of certain phrases within the thinking/reasoning content. 21hbguo/dsh-thinking-counter is a DSH plugin that counts thinking phrase hits from the moment it is enabled, across running or newly started sessions, and provides a floating window panel in the sidebar.

The following introduces the positioning, installation method, and typical usage of this plugin.

What is this

21hbguo/dsh-thinking-counter is a Thinking phrase detection and statistics plugin for the DeepSeek Harness (DSH) Web GUI. It is maintained by 21hbguo and is licensed under MIT.

This plugin must run within the DSH process and is suitable for the DSH Web GUI. It counts thinking (reasoning) content phrase hits for all running or newly started sessions (including sub-agents) from the moment it is enabled and displays the statistics in the browser panel.

Core Features

Scope of Statistics

  • Count thinking/reasoning content from all running or newly started sessions (including sub-agents) starting from the moment the plugin is enabled.
  • Count thinking block count, thinking character count, total hits, and session count.
  • Display recent hit logs and session details.

Panel and Matchers

  • The “🐳 Fat Fish IQ” button in the sidebar opens a draggable, resizable, collapsible floating window panel.
  • Matchers can be freely added or removed.
  • Each word can be independently selected to be case-sensitive or case-insensitive.
  • Matchers can be grouped into “Snack Thief Words”, “Brainstorm Words”, and “Onlooker Words”.
  • Provide a reference judgment of “Liang Sheng/Fat Fish/Liang Zi” based on the hit ratio of “Brainstorm Words” and toggle the “Transparent Mermaid” status illustration.

Configuration and Optional Matching

  • Optionally include visible reply text in the matcher matching.
  • Configuration is persisted in browser localStorage for quick caching and in the DSH plugin-specific data space ~/.dsh/plugins/dsh-thinking-counter/config.json.

API Endpoints

This plugin provides the following endpoints:

POST /api/thinking-counter/config
GET /api/thinking-counter/snapshot
GET /api/thinking-counter/stream
Status Illustration Static Resource Endpoint

Among them, POST /api/thinking-counter/config accepts configurations such as enabled, matchers, matchVisible, reset. /api/thinking-counter/snapshot is used to get a snapshot, /api/thinking-counter/stream is a streaming endpoint, and the status illustration static resource endpoint is used to provide illustration resources for the panel.

Installation and Enablement

Use the following command to install:

dsh plugin --profile web add @21hbguo/dsh-thinking-counter

Then restart dsh and refresh the browser. After installation, the “🐳 Fat Fish IQ” button will appear in the DSH Web GUI sidebar. Click it to open the panel.

Typical Usage

  1. Open the DSH Web GUI and click the “🐳 Fat Fish IQ” button in the sidebar.

  2. Click “Release the Fish!” to start counting.

  3. Add matchers, for example let me, we should, however; choose case-sensitive or case-insensitive for each word, and select the “Snack Thief”, “Brainstorm”, or “Onlooker” group.

  4. Let any session generate thinking/reasoning content.

  5. View the thinking block count, thinking character count, total hits, session count, recent hit logs, session details, “Liang Sheng/Fat Fish/Liang Zi” reference judgment, and the transparent mermaid status illustration in the panel.

If you need to adjust configuration, you can also write via the API:

POST /api/thinking-counter/config

Configuration items can include enabled, matchers, matchVisible, reset, etc.

Applicable Scenarios and Notes

This plugin is suitable for people who want to observe thinking phrase hits in the DSH Web GUI. Pay attention to the following points when using it:

  • The matcher list defaults to empty and needs to be added manually.
  • Statistics are runtime data and reset to zero after the host restarts; matchers, switches, and other configurations will be restored from disk.
  • Only counts local DSH session events, does not read file contents, does not touch API keys/tokens, has no telemetry, and no external connections.
  • The snapshot endpoint is same-origin with DSH Web; the README suggests not exposing DSH directly to the public internet.
  • Multiple tabs share the host counter, but localStorage writes might overwrite each other, so it is recommended to keep only one control panel tab.
  • The “Liang Sheng/Fat Fish/Liang Zi” reference judgment is just entertainment/reference signals based on keyword proportions and does not represent real IQ.
  • This plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license before installation.

Links

  • Directory page: https://www.skillhub.cn/plugins/21hbguo/dsh-thinking-counter
  • GitHub: https://github.com/21hbguo/dsh-thinking-counter