rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Shuaige-Da/dsh-cost-pill
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · 简体中文
Continues the DSH composer's own token-usage pill with what the session has cost so far in yuan — the amount is written inside that pill, so it inherits the host's spacing and reads as part of the same row.

In the desktop app: the cost continues the composer pill row, after the token usage and cache-hit readings.

Rendered from this repository's own lib/client.js with sample usage data.
What the install includes. The plugin gives you the composer pill and the priced usage dialogs. The per-turn cost row under each answer — the third screenshot on the listing — is not part of the install: it needs a small host patch. Follow Per-turn cost.
· 费用 ¥0.0871 — the estimated cost of every token this session has billed so far.
Hovering the pill reveals the breakdown the number is made of:
费用 ¥0.0871 · 高峰 · deepseek-flash
未缓存输入 ¥0.0557 · 缓存读取 ¥0.0055 · 输出 ¥0.0259
按官网标价估算
The pill disappears while the session has billed no tokens yet.
The host's own token-usage dialogs show counts but no money. While one is open, each bucket row gains its own amount and the list closes with the estimated total, the rate window in force, and a one-line note — the same figures the pill shows.


The row under each answer — 用量 6.2M tok · 费用 ¥0.1718 — is rendered by the host
from per-turn billing buckets that are not exposed to plugins, so this plugin
cannot add that row. The repository ships the procedure in two forms; install
either one on top of the plugin.
per-turn/SKILL.md to
~/.dsh/skills/dsh-per-turn-cost/SKILL.md
(%USERPROFILE%\.dsh\skills\dsh-per-turn-cost\SKILL.md on Windows).用 dsh-per-turn-cost 给每轮加上费用.Open per-turn/PROMPT.md, copy the fenced block, and send it
in a normal conversation. The agent does the same work without needing the skill.
It edits the host's own bundled dsh-client-ui-chat/lib/client.js — inside
node_modules for an npm/dsh web install, inside app.asar for the desktop app,
which must be closed first. The agent backs the file up, syntax-checks the result,
and tells you the restore command.
A DSH update replaces that file, so the row has to be added again afterwards. That is precisely why it cannot ship as a plugin: shipping it would mean writing into the host's own code on every user's machine.
Official DeepSeek list prices, yuan per 1M tokens:
| Model | Cache hit (peak / off-peak) | Cache miss (peak / off-peak) | Output (peak / off-peak) |
|---|---|---|---|
deepseek-flash |
¥0.04 / ¥0.02 | ¥2 / ¥1 | ¥8 / ¥4 |
deepseek-v4-pro |
¥0.30 / ¥0.15 | ¥9 / ¥4.5 | ¥27 / ¥13.5 |
deepseek-v4-flash and deepseek-v4-flash-vision-exp are billed
at the deepseek-flash rate, which is what DeepSeek's own sheet says happens to
requests still naming them.deepseek-flash, and the breakdown says so.From the repo (works today):
dsh plugin --profile <name> add https://github.com/Shuaige-Da/dsh-cost-pill
From npm, once published:
dsh plugin --profile <name> add dsh-cost-pill-cny
The npm package is
dsh-cost-pill-cny, notdsh-cost-pill: the shorter name already belongs to an unrelated plugin, and installing that one would give you a different feature set.
Or from a local checkout:
dsh plugin --profile <name> add /path/to/dsh-cost-pill
Then reload the page. No restart is needed on hosts that hot-apply profile patches.
tokenUsage and modelSelection session projections for the pill,
and appends amounts to the host's own usage dialogs by reading the counts those
dialogs already render. It never replaces a host component, and if that markup
does not look the way it expects, it leaves the dialog exactly as it found it.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。