Introduction

When using DSH Web GUI, knowing whether DeepSeek is currently in peak or idle hours can help control costs. The dsh-price-phase plugin displays a centered time-phase badge in the toolbar row at the bottom of the input card, intuitively indicating the current state and providing a countdown to the next switch.

Core Features

  1. Real-Time Phase Display
    Every 30 seconds, the current state is recalculated based on the system clock. It is displayed as “peak” or “idle”.

  2. Countdown
    Displays the time until the next state flip, formatted as 2h13m / 45m / 38s.

  3. Hover Details
    On mouse hover, it displays the current Beijing time (including the weekday), the previous and next phases, and details about the next switch.

  4. Narrow-Screen Adaptation
    On mobile, the badge automatically becomes an inline short label and omits the dot to avoid covering the model selector.

  5. Accurate Cross-Weekend Countdown
    After Friday 18:00, the countdown points to Monday at 09:00 rather than Saturday at 09:00.

Installation and Enablement

In the terminal, run the following command to install the plugin into the Web GUI profile:

dsh plugin --profile web add dsh-price-phase

After restarting the DSH process, the time-phase badge will appear centered in the toolbar row at the bottom of the input card.

Technical Details

  • No Third-Party Dependencies: The code only depends on React (require('react')) and does not introduce any other external libraries.
  • Time Zone Logic: Time phases are based on Beijing time, converted from the local clock using UTC+8. This means users outside China also see the time phase corresponding to Beijing time.
  • Slot Registration: The plugin registers only the conversation.input.right slot. This slot is kind: list and can coexist with other plugins (sorted by order: 90).
  • Dependency Contract: It depends on the client slot contract in DSH 0.1.5.

Use Cases and Notes

  • Use Cases: Users who need to monitor changes in billing phases at all times, or who want to avoid long conversations during peak hours.
  • Notes:
    • The plugin does not handle price values; it only indicates the time phase.
    • It has no click interactions, does not read host state, and does not make any network requests.
    • Before installing, check the source code and license to ensure compliance with your environment requirements.

Links