dsh-peak-badge
DeepSeek API peak/off-peak hours badge for the dsh web GUI.
Floating pill, bottom-right by default, showing whether the current UTC time falls in DeepSeek's peak pricing hours. Red when peak, green when off-peak, with a live countdown to the next transition.
Peak hours (per DeepSeek pricing docs)
> Peak hours are 01:00–04:00 UTC and 06:00–10:00 UTC; all other hours are off-peak. Off-peak rates are half the peak rates.
The schedule is hardcoded in the plugin. Update PEAK_WINDOWS in lib/client.js if DeepSeek changes it.
Features
- Floating pill, default position bottom-right 14px
- Red = peak hours, Green = off-peak
- Live 1s countdown to the next transition (
Peak 1h 25m 03s left) - Draggable — drag anywhere, position is remembered in
localStorage - Click to customize — popover with countdown format and opacity controls
- Monospace font: digits stay fixed-width, no jitter while ticking
- No host-side logic, no API calls, no network — pure client UI
Customization
Click the badge (don't drag) to open the settings popover:
- Show "left" — toggle the trailing word (
Peak 1h 25m 03s left→Peak 1h 25m 03s). The Peak / Off-peak label itself is always shown. - Countdown format —
H:M:S(default,1h 25m 03s),M:S(85m 03s), orS(5103s) - Opacity — 20%–100% slider (default 80%)
All choices persist in localStorage and survive refreshes.
Demo
Peak hours — customization popover open (red, countdown to off-peak):

Off-peak hours (green, countdown to next peak):

Install
dsh plugin --profile web add github:ngtongsheng/dsh-peak-badgeRestart dsh web, hard-refresh (Ctrl+F5), and the badge appears.
Requirements
- dsh web profile (
dsh web) - pnpm ≥ 10 (for
dsh plugin)
Development
The plugin is a plain-JS bundle: no build step, no TypeScript, no bundler. Files:
lib/index.js— host half (no-op; exists so the loader mounts the package)lib/client.js— browser half (the badge), served by dsh's client-modules loadercordis.patch.yml— profile bundle patch (inserts thepeakloader row)package.json—dsh.bundle.patch+dsh.clientdeclarations
Local iteration:
dsh plugin --profile web add file:C:/path/to/dsh-peak-badgeNote: pnpm copies file: dependencies — re-copy lib/client.js (or re-add) after each edit, then restart dsh web.
License
MIT