Introduction

In the plugin ecosystem of DeepSeek Harness (DSH), developers need an intuitive view of account balance and remaining token count to control API call costs. Existing interfaces usually do not provide real-time balance display. As a floating component, dsh-balance-window solves this pain point.

Plugin Overview

This plugin was developed by maintainer sixtysevenlf and is intended for DSH desktop and Web users, providing real-time balance display and remaining token estimation.

Features

  • Floating Window: Defaults to the bottom-left corner; can be held and dragged to any location on the screen.
  • Real-Time Balance: Calls the official DeepSeek GET /user/balance endpoint to retrieve data.
  • Token Estimation: Estimates projected remaining tokens based on the current model and configured unit price.
  • Auto Refresh: Automatically refreshes every 60 seconds; supports immediate refresh by clicking the window or the ↻ button.
  • Status Indicator: A green breathing dot indicates data is normal; on failure it automatically retries without flickering or interruption.
  • Position Memory: Dragged position is saved in localStorage and restored after restart.
  • Privacy & Security: The plugin does not contain any secrets; API keys are read only in the user’s own environment.

Installation & Configuration

For the installation process, please refer to the official documentation.
* Installation Guide: install-guide.md
* Configuration Example: cordis.patch.example.yml

Customization

  • Adjust Price: Modify PRICE_PER_MILLION in lib/index.js to adjust the unit price used for token estimation.
  • Adjust Refresh & Position: Modify the refresh interval (default 60000ms) and default position in lib/client.js.
  • Hot Loading: Save changes after modifying code; they take effect without restarting.

Notes

  • The plugin does not contain any secrets.
  • API keys are read only in the user’s own environment.
  • Ensure configuration is completed according to the installation guide before use.