DeepSeek Harness plugin

dsh-cost-balance-pro

DSH plugin: visible cost/balance stats pill below the composer, with settings page and one-click reset. Fixed fork-level issues of dsh-cost-balance (slot id collision, missing ctx, invisible 5px bar).

Jump to install

Source facts

Repository
kingcharleslzy-ai/dsh-cost-balance-pro
Latest update
Aug 17, 2026
Category
Usage & Billing
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/kingcharleslzy-ai/dsh-cost-balance-pro
Plugin: dsh-cost-balance-pro
Author: kingcharleslzy-ai

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-cost-balance-pro

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

能力

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

设置页字段

字段类型默认值说明
showBalancebooleantrue折叠态显示余额
showCostbooleantrue折叠态显示本次花费
showHitRatebooleantrue展开面板显示缓存命中率
costCurrencyenumcny花费货币:cny 人民币 / usd 美元
balanceCurrencyenumcny余额货币:cny 人民币 / usd 美元
usdCnyRatenumber6.82USD→CNY 汇率(余额/花费换算用,官方峰谷价隐含值)
fontSizenumber12折叠态字号,限制 10–16
colorModeenumautoauto 跟随主题 / mono 灰色 / custom 自定义
customColorstring#8b5cf6colorMode=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-Flash0.0140.441.32
V4-Flash0.0070.220.66
V4-Pro0.0441.323.96
V4-Pro0.0220.661.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