DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

Keleven-11 /

Keleven-11/dsh-offpeak-badge

Verified

DeepSeek Harness plugin: shows peak/off-peak pricing hours in the composer status row, with switchable provider presets.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@1d912c19

dsh-offpeak-badge

English · 中文

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(北京时间) 其余时段含节假日(默认开)
    Ollama Cloud(DeepSeek V4.1 Flash 1017) 20:00–次日 02:00(北京时间,官方按 UTC 12: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 折。」
  • Ollama Cloud:定价页 “Off-peak pricing apply outside 12:00 and 18:00 UTC on weekdays and all day on weekends.” —— 换算北京时间即周一至周五 20:00–次日 02:00 为高峰;deepseek-v4.1-flash 高峰 $0.30/$1.20(输入/输出,每百万 tokens),闲时 $0.15/$0.60。该窗口跨零点,插件按星期分别判定:周一至周五 20:00–24:00、周二至周六 00:00–02:00。

这张表是本插件唯一的判断依据;口径若变更,改 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'],不上传、不联网。

兼容性

  • dsh 0.2.x(dsh.bundle + dsh.client 两个 manifest 都声明)。
  • 只用宿主的 --dsw-alias-* 主题 token 与宿主字号变量,跟随主题与字号设置。
  • 纯客户端插件,Host 半是空实现:没有工具、没有网络请求、不读文件。

English

What it does

  • Registers one entry in the conversation.composer.dock slot, next to the harness's own tok/s and cache-hit pills. It flips on its own at the boundary minute.

  • Five 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)
    Ollama Cloud (DeepSeek V4.1 Flash 1017) 20:00–02:00 next day (UTC+8; published as 12:00–18:00 UTC) not stated upstream, off by default
    Custom your own 09:00-12:00,14:00-18:00 optional
  • 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.
  • Ollama Cloud: pricing page — “Off-peak pricing apply outside 12:00 and 18:00 UTC on weekdays and all day on weekends.” In Beijing time that is Mon–Fri 20:00–02:00 next day; deepseek-v4.1-flash is $0.30/$1.20 (input/output per 1M tokens) at peak and $0.15/$0.60 off-peak. The window crosses midnight, so the badge evaluates it per weekday: Mon–Fri 20:00–24:00 plus Tue–Sat 00:00–02:00.

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

—/ 5

No ratings yet

Verified DSH bundle

Commit 1d912c19f38b

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout