dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
DSH Web GUI 会话头部高峰指示灯,实时显示当前北京时间是否处于 DeepSeek API 高峰时段,附实时时钟与下一转折倒计时。
English | 中文
A peak-hour indicator for the DeepSeek Harness web GUI. A small native chip in the session header shows whether the current Beijing time is inside DeepSeek's API peak window, with a live clock, a countdown to the next transition, and a pricing hint.
DeepSeek's official peak/valley API pricing (effective 2026-08-17, weekends adjusted 2026-08-23):
| State | When (Beijing time) | Price |
|---|---|---|
| 🔴 Peak | weekdays 09:00–12:00 and 14:00–18:00 | peak price (= off-peak ×2) |
| 🟢 Off-peak | everything else — including all of Saturday & Sunday | half of peak |
Weekends (Saturday and Sunday) are charged at the valley price all day — no peak windows on weekends.
Per DeepSeek's peak/valley note, the only days that can peak are ordinary Monday–Friday working days:
| Day | State (Beijing time) |
|---|---|
| 法定节假日 (statutory holiday) | valley for the whole day, exactly like a weekend |
| 调休上班的周末 (a weekend worked) | valley for the whole day too — 调休 does not change billing |
So the chip shows 🟢 国庆节 instead of a red peak on 1 October, and 🟢 调休上班 · 谷价 on a 调休 Saturday.
HH:MM:SS, timezone Asia/Shanghai, independent of your machine's timezone)剩 3h 54m · 价格 ×2 during peak / 距高峰 3h 54m · 半价 off-peak国庆节) and counts down to the first peak window after the break; on a 调休上班的周末 it shows all-day valley and tags the dayHH:MM:SS countdown, and a progress bar of the current phase--dsw-alias-* variables — it blends into the interface instead of floating over itdsh plugin --profile web add dsh-peak-status
Prefer installing straight from GitHub:
dsh plugin --profile web add github:xiaoyi-xx/dsh-peak-status
Then restart dsh web (or refresh the page). The chip appears at the top-right of the conversation header.
The chip updates every second. Click it to expand/collapse the detail card; hover for a quick tooltip. Peak/off-peak state follows the official schedule above, computed in Beijing time over the official work calendar.
If DeepSeek ever changes the peak schedule, a new release will ship with the updated windows — open an issue on this repository if you notice a mismatch.
The calendar (法定节假日 + 调休 makeup days) is fetched over the network, with three layers of fallback:
/dsh-peak-status/holiday/<year>. It tries jiejiariapi first and apihubs second, normalizes both shapes and caches the result in memory for 6 hours, so every browser tab shares one fetch.api.apihubs.cn directly (it is CORS-enabled).Normalized days are cached in localStorage for 24 hours, so a restart or a spell offline still renders the right state, and the detail card always reports the source (已同步 · jiejiariapi / 未同步 · 暂按周末规则).
Pricing follows DeepSeek's 峰谷时间说明: 调休上班的周末 and 中国法定节假日 are billed at the off-peak rate for the whole day. The calendar supplies exactly those two labels — a 调休 day never gains a peak window.