Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. Developers often need to monitor Token decoding speed and account balance during development. mc-hud is an unofficial plugin that transforms DSH’s default consumption panel into a Minecraft-style HUD, providing an intuitive display of data through heart and drumstick icons.

Core Features

The plugin displays data through two methods: a sidebar and a top bar, and supports light and dark themes.

  • Sidebar Display

    • The bottom displays hearts (decoding speed) and drumsticks (balance).
    • Heart anchor segment mapping: 0→10, 100→9, 130→7, 200→3, supporting half-heart granularity.
    • Drumstick supports half-cell granularity, capped at ¥100, with each cell representing ¥10.
    • The information line displays cache hit rate (to the right of the hearts) and cumulative consumption for the current session (to the right of the drumstick).
  • Top Bar Icons

    • Mode labels and the mode selector use original Minecraft icons:
      • Normal = Iron Sword
      • Minimal = Map
      • PTC = Command Block
      • Creative = Grass Block
  • Data Refresh and Adaptation

    • Balance refreshes every 60 seconds, retries after 15 seconds on failure; UI updates every 2 seconds.
    • The sidebar automatically hides when narrow.
    • Icons adapt to the sidebar width.
    • Light and dark theme adaptation is automatic; text color, outline, and background color switch according to the DSH theme.

Installation and Enablement

Use the official installation command to complete deployment.

dsh plugin --profile web add mc-hud

After installation, restart the DSH process to take effect.

Technical Details and Configuration

The plugin consists of a Host (server-side) and a Client (front-end).

  • File Structure

    • lib/index.js: Host side, handles balance queries, pricing constants, and cache statistics.
    • lib/client.js: Client side, responsible for UI slot registration and rendering logic.
  • Pricing Constants and Anchors

    • Pricing constants are located in lib/index.js:
        PRICE_IN_MISS = 1.5
        PRICE_IN_HIT = 0.05
        PRICE_OUT = 4.5
        // 高峰时段价格翻倍
*   The heart anchor logic is in the `heartsFromTok` function in `lib/client.js`.
  • Development and Debugging
    • After modifying code, the copied directory must be synchronized for changes to take effect (for file: dependencies).
    • Syntax check command:
        npm run check

Notes

  • Project Nature: This plugin is an unofficial fan project and is not affiliated with Mojang / Microsoft.
  • Asset Licensing: The texture assets are non-commercial derivative works, intended for personal use only; do not use them commercially. Runtime only depends on small embedded derived pixel images.
  • Privilege Execution: The plugin runs with the permissions of the current DSH process. Please ensure the installation source is trusted.

References