Repository navigation
Releases
v0.1.0 — DeepSeek 峰谷时段指示灯
首个公开版本。
在 DeepSeek Harness(DSH)Web GUI 的输入框工具行里、模型名左侧显示一颗 5px 小圆点,一眼看出当前 DeepSeek API 的计费时段:
- 🟡 黄
#f2b705= 高峰时段(标准价) - 🟢 绿
#22c55e= 空闲时段(半价)
除颜色外不渲染任何文字、图标或占位文案(带 aria-label,屏幕阅读器可读)。
特性
- 只在 DeepSeek 提供商下显示:读取当前会话的模型选择(
ctx.modelDirectories),provider 为deepseek-official/deepseek-account才渲染,第三方中转或未知 provider 一律不显示、不占位。 - 时段判定按官方定价页:北京时间周一至周五(不含中国法定节假日)9:00–12:00、14:00–18:00 为高峰,其余时段(含周末与法定节假日全天)为空闲;边界左闭右开,一律按
Asia/Shanghai计算。 - 节假日自动更新:三层来源,
localStorage缓存 → holiday-cn 联网刷新 → 内置 2026 年兜底表。次年安排公布后自动生效,无需改代码;完全离线时回落内置表。 - 位置可微调:注册在
conversation.input.right(正好渲染在模型名左侧),nudgeX/nudgeY控制像素级偏移,用transform实现,不会推动相邻控件。 - 零依赖、零构建:浏览器半边是单个
client.js,用window.__ModuleLoader__.load({ id, factory })注册惰性工厂,React 由宿主模块表提供。 - 带回归测试:
node tools/test-classify.mjs,26 例覆盖时段边界、午休、周末、调休上班日、各法定节假日,以及 provider 判定。
安装
在侧边栏的**「插件」页 →「添加插件」**,填入:
https://github.com/cumthugo/dsh-deepseek-offpeak-indicator
想锁定本版本:
github:cumthugo/dsh-deepseek-offpeak-indicator#v0.1.0
安装器会把它写进 profile 的 dsh.profile.bundles 与依赖,并按仓库自带的 cordis.patch.yml 插入 Loader 条目;结果为 application: applied 即刻生效,无需刷新页面。
环境
开发并验证于 macOS + DSH 桌面版 0.2.0-rc.2。非官方插件,计费规则与价格以 DeepSeek 官方定价页 为准。
English — First public release: a 5px dot just left of the model name in the DSH composer tool row — yellow for DeepSeek peak hours, green for off-peak (half price). It renders only when the session's provider is DeepSeek, computes the window in Asia/Shanghai, and refreshes Chinese statutory holidays from holiday-cn with a built-in 2026 fallback. Install it from the Plugins page with github:cumthugo/dsh-deepseek-offpeak-indicator#v0.1.0. See README.md.