dshbase

Plugin directory / Developer / dsh-cost-balance-pro

dsh-cost-balance-pro

Unverified kingcharleslzy-ai

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
Language
2026-08-17Last push
Cross-platformPlatform

What it does

A plugin in the Developer category for DeepSeek Harness.

Our take
Unverified — not yet verified

A plugin in the Developer category for DeepSeek Harness. Not yet verified — install and test it yourself.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

README

dsh-cost-balance-pro

DSH 插件:输入框下方可见文字的会话花费/余额统计条,带设置页与一键还原。

能力

  • 折叠态直接显示 余额(¥)· 本次花费($),点击展开明细(缓存命中 / Token / 花费 / 余额)
  • 设置页(设置 → 插件 → 余额统计条):显示开关(余额/花费/命中率)、字号(10–16px)、颜色(跟随主题/灰色/自定义取色器)、一键还原
  • 配置持久化于 $DSH_HOME/dsh-cost-balance-pro.json,重启保留,保存后统计条即时刷新

设置页字段

字段 类型 默认值 说明
showBalance boolean true 折叠态显示余额
showCost boolean true 折叠态显示本次花费
showHitRate boolean true 展开面板显示缓存命中率
costCurrency enum cny 花费货币:cny 人民币 / usd 美元
balanceCurrency enum cny 余额货币:cny 人民币 / usd 美元
usdCnyRate number 6.82 USD→CNY 汇率(余额/花费换算用,官方峰谷价隐含值)
fontSize number 12 折叠态字号,限制 10–16
colorMode enum auto auto 跟随主题 / mono 灰色 / custom 自定义
customColor string #8b5cf6 colorMode=custom 时的文字颜色(#RRGGBB)

相对 dsh-cost-balance 的修复

  1. 槽位注册 id 改为唯一 cost-balance-pro,不再与官方统计栏冲突(原版同槽同 id 同 priority 会挂掉整个前端);
  2. ctx 经 props 传入组件(原版模块级裸 ctx 导致槽位条目渲染期 ReferenceError,药丸从未渲染成功);
  3. 折叠态从 5px 无字细线改为可见文字;
  4. 客户端工厂补上 return module.exports(缺失时加载器收到 undefined,插件静默失效);
  5. 客户端模块声明 exports.inject = ['timer']ctx.interval 需要 timer 注入)。

安装

dsh plugin --profile web add dsh-cost-balance-pro

装后重启服务一次(或下次登录),刷新页面即可看到统计条;样式去设置页调整。

模型定价(峰谷计费)

DeepSeek 自 2026-08-17 起执行峰谷计费:高峰 = UTC 01:00-04:00 与 06:00-10:00(北京 09:00-12:00 / 14:00-18:00),谷价为峰价一半。本插件按当前时段自动计价,折叠态显示 峰/谷 徽标(峰橙、谷绿),展开面板显示当前时段说明。

内置官方价(USD/1M):

模型 时段 缓存命中 未命中 输出
V4-Flash 0.014 0.44 1.32
V4-Flash 0.007 0.22 0.66
V4-Pro 0.044 1.32 3.96
V4-Pro 0.022 0.66 1.98

可在 profile 的 cordis.patch.yml 按 id 覆盖整行 config 传入 prices(结构 { 模型: { peak: {hit, miss, out}, offPeak: {...} } })。

开发

npm test          # 客户端契约测试(node:test)
npm pack --dry-run

发布:push v* 标签触发 GitHub Actions,经 npm OIDC trusted publishing 自动发布(带 provenance)。

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-cost-balance-pro for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:kingcharleslzy-ai/dsh-cost-balance-pro

Headless (CLI) profile:

dsh plugin --profile headless add github:kingcharleslzy-ai/dsh-cost-balance-pro

Test report

Not yet L3-verified — see failure note below if we already ran it.

Status: pending · last test 2026-08-26 · flagged webonly
Note: 验证: web-only;待 L4 web CDP;L4 web CDP runtime-fail on dsh 0.1.0-rc.8. Browse all pending failures →
Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7795 plugins →