插件目录 / UI & Skins / dsh-plugin-peak-pricing
dsh-plugin-peak-pricing
已验证 · 实测可装 c-ling
功能简介
DeepSeek峰谷定价时段徽章,纯UI无状态
可用 — 实测通过,早期项目
DeepSeek峰谷定价时段徽章,纯UI无状态 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-plugin-peak-pricing
DeepSeek Harness 峰谷定价时段徽章(DSH 双面插件,纯 UI、无状态、无网络请求)。
简介
- 展开状态:侧边栏设置按钮下方贴底的一条单行卡片
● 空闲时段 · 半价 · 2小时12分后进入高峰(黄点 = 高峰全价,绿点 = 空闲半价),
悬停显示北京时间详情。 - 收起状态:居中的彩色圆点(36px 圆形 hover 与设置按钮一致),
悬停弹出磨砂浮窗显示完整文案。 - 每 30 秒刷新一次;时段边界一到自动切换。
- 文案支持中英双语,随 DeepSeek Harness 的界面语言设置(Settings → General → Language)实时切换。
时段规则(北京时间 UTC+8,无夏令时):高峰 09:00–12:00、14:00–18:00,其余为空闲(半价)。
安装
从 GitHub 安装到 web profile(需要 pnpm 在 PATH 上;没有则用下面的 corepack 方式):
npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
或使用已有的 dsh 命令:
dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
pnpm 不在 PATH 上时:
cd ~/.dsh/profiles/web
corepack pnpm add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
dsh plugin把参数原样转发给 pnpm,直接从本仓库拉取包(pnpm 9+,本机需装有git)。
安装时若看到declares no dsh.bundle — installed as a plain dependency的提示属正常现象:
本插件不是 profile bundle 层,而是通过下面的 loader 行激活。
然后在 ~/.dsh/profiles/web/cordis.patch.yml 增加一行插入:
- insert:
- id: peak-pricing
name: 'dsh-plugin-peak-pricing'
重启 dsh web(client-modules 按进程缓存包裁决,新包必须重启宿主),然后硬刷新页面,
侧边栏设置按钮下方即出现时段徽章。
验证
curl -s http://127.0.0.1:3080/plugins/dsh-plugin-peak-pricing/client.js | head -c 60
应输出 window.__ModuleLoader__.load({ 开头的 factory bundle;页面侧边栏脚部能看到徽章。
更新
dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
# 或:npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
# 或:cd ~/.dsh/profiles/web && corepack pnpm add "github:c-ling/dsh-plugin-peak-pricing#v1.1.0"
用新的 #v1.1.0 重新执行安装命令即可升级依赖;cordis.patch.yml 中的 loader 行保持不变。
重启 dsh web,然后硬刷新页面。
卸载
cd ~/.dsh/profiles/web
corepack pnpm remove dsh-plugin-peak-pricing # 或 dsh plugin --profile web remove dsh-plugin-peak-pricing
同时删除 cordis.patch.yml 中对应的 insert 行,然后重启 dsh web。
本插件无状态、无持久化数据,卸载后布局完全还原。
开发
node --check lib/index.js lib/client.js
客户端为手写 factory-CJS bundle(window.__ModuleLoader__.load({ id: "dsh-plugin-peak-pricing", factory })),
无构建步骤;UI 通过 sidebar.footer.action 插槽注册,inject: ["slots", "locale"] 保证 fiber 在插槽就绪后
apply,并通过 locale 服务注册中英文案字典,随 harness 配置切换。
已知限制
- 徽章定位依赖侧边栏脚部的样式类名(
hHd-Xa_footArea),DSH 升级后若类名变化,
徽章会回退到设置按钮上方的操作条中(不影响功能),需同步更新lib/client.js
中的:has()选择器。
License
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-plugin-peak-pricing」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:c-ling/dsh-plugin-peak-pricing Headless(CLI)profile:
dsh plugin --profile headless add github:c-ling/dsh-plugin-peak-pricing 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
改变 dsh 的外观或交互方式——一套主题、皮肤或新面板,重塑工作区。
适合谁
在 web UI 里一待几小时、想让它按自己的习惯好看又好用的人。
二次开发建议
皮肤、面板和主题 token 是扩展点——写新皮肤、加面板,或与上游配色同步 token。