rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:jieyueriluo/DSH_balance-chip
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness (DSH) Web plugin that puts this conversation's estimated spend and the account balance beside the message composer.
┌─────────────────────────────┐
│ ● 本次 ¥15.93 │
│ 余额 ¥13.35 │
└─────────────────────────────┘
A community plugin, not an official DeepSeek package. The spend figure is an estimate; the platform bill remains authoritative.
Repository: https://github.com/jieyueriluo/DSH_balance-chip · npm: https://www.npmjs.com/package/dsh-cost-balance-chip
conversation.input.right, the right-hand control cluster inside the composer card, immediately before the model selector.tokenUsage projection and the selected model's reference unit prices.zh / en) and the active light/dark theme.— instead of inventing a zero; the panel states the reason and offers a retry.From npm, into any DSH profile:
dsh plugin --profile <profile> add dsh-cost-balance-chip
Or from this checkout:
dsh plugin --profile <profile> add <absolute-path-to-this-directory>
The bundle patch inserts the cost-balance-chip row. Restart or let the profile's HMR reload the Web page after installing.
The client has no billing API, so spend is estimated from provider-reported token buckets. Reference unit prices are CNY per one million tokens:
const DEFAULT_PRICING = { input: 2, cacheRead: 0.2, cacheWrite: 2, output: 3 }
const MODEL_PRICING = {
'deepseek-flash': DEFAULT_PRICING,
'deepseek-v4-pro': { input: 4, cacheRead: 0.4, cacheWrite: 4, output: 12 },
}
input — uncached input tokens.cacheRead — cache-hit tokens.cacheWrite — cache-write tokens.output — output tokens.Edit client.js and reload the page if your account's price list differs. The panel shows the rates in force.
Limitation: when a Session switches models, all of its tokens are currently priced at the latest selected model. A per-request split would require reading the full Session log and segmenting by request header.
useProjection('tokenUsage') from @deepseek-ai/dsh-token-meter, which folds the complete durable Session log into four disjoint buckets.useProjection('modelSelection'), using next.model and falling back to lastUsed.model.ctx.remote.account.getBalance(clientMetadata), with the plugin explicitly injecting the remote.account namespace.index.js exports an empty apply().The plugin never reads or uploads credentials. The balance request goes through DSH's own remote.account proxy.
>=0.2.1-rc.3 (declared in engines.dsh).react / react-dom seed modules.dsh-cost-balance-chip/
├── client.js # chip, detail panel, balance polling
├── index.js # empty Host half
├── cordis.patch.yml # inserts the loader row
├── package.json # bundle / client declaration
├── icon.svg
├── locale/{zh,en}.json
├── market/index.json # optional self-hosted DSH market index
├── docs/market/ # the same index served by GitHub Pages
├── tests/package.test.mjs
├── PUBLISHING.md # release and community-posting checklist
└── ANNOUNCEMENT.*.md # ready-to-post community announcement drafts
A composer chip for DSH showing the current conversation's estimated cost and the account's available balance, with a click-through token/cost breakdown. Costs are estimated from the tokenUsage projection and reference prices; the balance is read through DSH's account Remote. MIT licensed, no credentials touched.
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。