精选
为什么选中它
待人工精选——以下事实来自源码仓库。
它能做什么
dsh plugin: per-turn USD cost badge in the Web UI (session total + per-message footer, hover breakdown) from token usage x a configurable pricing table.
适合谁
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
风险提示
- 未发现明显风险信号;安装前仍建议查看源码。
dsh plugin: per-turn USD cost badge in the Web UI (session total + per-message footer, hover breakdown) from token usage x a configurable pricing table.
待人工精选——以下事实来自源码仓库。
dsh plugin: per-turn USD cost badge in the Web UI (session total + per-message footer, hover breakdown) from token usage x a configurable pricing table.
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
dsh plugin --profile web add github:Sttrevens/dsh-cost-meter 作者没有声明支持的平台。
dsh.client package: - Host half (lib/index.js) registers a sessionCost projection on the session-projection seam. The fold tracks the current provider/model from request/header events and accumulates cost from the provider-reported usage buckets (uncached input / output / cache-read / cache-write), reusing token-meter's "replace the same (turn, step) sample instead of double-counting" rule. The view exposes the whole-session totals plus a byTurn map keyed by turn number. - Client half (lib/client.js) registers a badge into the conversation.chat.assistant-actions slot — the action row at the end of each assistant message, alongside the turn's time/duration info. Each badge shows that turn's cost; hovering opens a tooltip with the per-bucket breakdown (input / output / cache-read / cache-write) plus the session total. ## Pricing table Pricing is USD per million tokens, keyed by provider/model: jsonc { "per": 1000000, "currency": "USD", "default": { "input": 0.6525, "output": 1.9575, "cacheRead": 0.02175, "cacheWrite": 0 }, "models": { "deepseek-official/deepseek-v4-pro": { "input": 0.6525, "output": 1.9575, "cacheRead": 0.02175, "cacheWrite": 0 }, "deepseek-official/deepseek-v4-flash": { "input": 0.2175, "output": 0.6525, "cacheRead": 0.00725, "cacheWrite": 0 } } } The plugin reads ~/.dsh/cost-pricing.json on boot (override the path with the DSH_COST_PRICING env var or the row's config.pricingPath). On first run it writes the default table to that path; edit it and restart dsh web to apply changes. A model without a models entry falls back to default (zero cost when no default is present). ## Install The package declares a dsh.bundle manifest, so dsh plugin add installs it and adds it to the profile's bundle layers automatically — no manual patch edit: sh dsh plugin --profile web add @steven-wu/dsh-cost-meter # restart the web profile, then refresh the page For a local checkout during development: sh dsh plugin --profile web add file:/path/to/dsh-cost-meter Notes: - @deepseek-ai/dsh-* are declared as peerDependencies (resolved from the harness), never as dependencies — installing them into a profile shadows the harness copy and can pull a stale dist-tag. - The Settings "Plugins" panel is read-only (inventory + config cards); install happens only through dsh plugin --profile … add. - Purely-cordis mounting (a cordis.patch.yml insert row) also works — the shipped cordis.patch.yml holds that row for either path. The sessionCost projection is delivered through the same seam as tokenUsage / sessionStats, so it also appears in every projection carrier (history tail page, session/projection push frames) without extra wiring.不看 Star,人工一条条挑的。
把 DSH 的 settings.yaml 做成可视化看板:所有已注册的 settings namespace——包括官方界面从未覆盖的第三方插件配置——都渲染成可编辑表单。项目还早,但方向很对:告别手改 YAML。
给 DSH 的 DIY 轨迹可视化:把 agent 的计划与执行画成图,不用翻原始日志也能看清它在干嘛。项目还早,但补上了「一眼看懂 agent 在做什么」这个真实缺口。
从 Claude Code / Codex 把活派给 DSH:在宿主内拉起带分级预设的 DSH agent 会话,看原生子代理进度,还能借它的多模态桥给纯文本的 DSH 补上视觉和生图。编排型插件,把 DSH 变成其他编码 agent 的后端。