- Home
- Plugins
- Usage & Billing
- dsh-offpeak-badge
dsh-offpeak-badge
keleven-11/dsh-offpeak-badge
Adds a peak/off-peak badge to the composer status row, using four switchable provider presets (DeepSeek API, OpenCode Go, WorkBuddy, custom) whose windows come from each vendor's own documentation, with a per-provider public-holiday switch.
Install
dsh plugin --profile web add github:keleven-11/dsh-offpeak-badgeREADME
dsh-offpeak-badge
A DeepSeek Harness (dsh) plugin that puts a 忙时 / 闲时 (peak / off-peak) badge in the composer status row — the same line as 1 轮 37 步 · 117 tok/s and 缓存命中 96% — so you can see at a glance whether the provider you are routed to is charging peak rates right now.
一个 DeepSeek Harness 插件:在输入框下方的状态栏(与 117 tok/s、缓存命中 96% 同一行)显示忙时 / 闲时,让你一眼看出当前供应商此刻是否按高峰价计费。
中文
它做什么
-
在
conversation.composer.dock槽位追加一枚状态徽章,跨过整点自动翻转,不需要刷新页面。 -
时段来自各供应商的官方口径,内置四套预设,可在 设置 → 闲忙时段 中切换:
预设 高峰时段(周一至周五) 法定节假日 DeepSeek 官方 API 09:00–12:00、14:00–18:00(北京时间) 全天空闲(默认开) OpenCode Go 09:00–12:00、14:00–18:00(北京时间,官方按 UTC 01:00–04:00、06:00–10:00 发布) 官方未提,默认关 WorkBuddy 09:00–12:00、14:00–18:00(北京时间) 其余时段含节假日(默认开) 自定义 自己填,如 09:00-12:00,14:00-18:00可选 -
每个供应商各有一份「法定节假日按闲时」开关:勾选后,2026 年国务院公布的放假日(国办发明电〔2025〕7 号)全天计闲时。
-
设置里可以整个关掉徽章(关掉后不注册任何 DOM)。
-
悬停显示完整口径与当前时间。
官方口径出处
- DeepSeek:定价页 「空闲时段价格为高峰时段价格的一半。北京时间周一至周五(不含中国法定节假日)9:00 - 12:00、14:00 - 18:00 为高峰时段;其余时段,包括周末及中国法定节假日全天均为空闲时段。」
- OpenCode Go:Go 文档 “Peak hours are 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday; all other hours, including weekends, are Off-Peak.”(换算为北京时间 09:00–12:00、14:00–18:00)
- WorkBuddy:腾讯云开发者社区官方口径文章 「周一至周五的 09:00–12:00、14:00–18:00 是高峰,按原价计积分;其余非高峰时段,积分打 5 折。」
这张表是本插件唯一的判断依据;口径若变更,改 client.js 里的 PRESETS 即可,半小时内就能发新版。
安装
dsh plugin add dsh-offpeak-badge
# 或直接从仓库装
dsh plugin --profile desktop add github:Keleven-11/dsh-offpeak-badge
装完刷新页面,徽章出现在输入框下方状态栏、「缓存命中」右侧。
配置
设置(Ctrl+Alt+,)→ 左侧 闲忙时段:
- 显示闲/忙时 —— 总开关。
- 供应商时段 —— 四选一。
- 法定节假日按闲时 —— 按当前供应商各自记忆默认值。
- 当前状态 —— 实时显示判定结果与当前北京时间。
配置存在浏览器 localStorage['dsh-offpeak-badge/config'],不上传、不联网。
兼容性
dsh0.2.x(dsh.bundle+dsh.client两个 manifest 都声明)。- 只用宿主的
--dsw-alias-*主题 token 与宿主字号变量,跟随主题与字号设置。 - 纯客户端插件,Host 半是空实现:没有工具、没有网络请求、不读文件。
English
What it does
-
Registers one entry in the
conversation.composer.dockslot, next to the harness's owntok/sand cache-hit pills. It flips on its own at the boundary minute. -
Four preset providers, all taken from official sources, switchable in Settings → Off-peak badge:
Preset Peak window (Mon–Fri) Public holidays DeepSeek API 09:00–12:00, 14:00–18:00 (UTC+8) off-peak all day (on by default) OpenCode Go 09:00–12:00, 14:00–18:00 (UTC+8; published as 01:00–04:00, 06:00–10:00 UTC) not stated upstream, off by default WorkBuddy 09:00–12:00, 14:00–18:00 (UTC+8) everything else is off-peak (on by default) Custom your own 09:00-12:00,14:00-18:00optional -
Each provider keeps its own public holidays count as off-peak switch. When on, the 2026 State Council holiday calendar is treated as off-peak all day.
-
The badge can be switched off entirely; hover it for the exact rule and the current clock.
Sources
- DeepSeek: pricing page — off-peak costs half of peak; peak is Beijing time Mon–Fri 09:00–12:00 and 14:00–18:00, excluding Chinese public holidays; everything else, weekends and holidays included, is off-peak.
- OpenCode Go: Go docs — “Peak hours are 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday; all other hours, including weekends, are Off-Peak.”
- WorkBuddy: Tencent Cloud developer article — peak is Mon–Fri 09:00–12:00 and 14:00–18:00 at full credit cost; everything else is 50% off.
Install
dsh plugin add dsh-offpeak-badge
# or straight from the repository
dsh plugin --profile desktop add github:Keleven-11/dsh-offpeak-badge
Reload the page; the badge appears in the composer status row, right of the cache-hit pill.
Privacy
Client-side only. The host half is an empty apply(). No tools, no network calls, no file access; settings live in localStorage.
License
MIT
Related plugins
DeepSeek-Balance-Whale-Widget
meteornox/deepseek-balance-whale-widget
dsh-context
bowenliang123/dsh-context
dsh-cost-meter
han-1413141/dsh-cost-meter
dsh-damage-pulse
wssfk12138/dsh-damage-pulse