跳到主内容

deepseek-harness-wallet 使用指南

为 DSH Web 提供官方 DeepSeek 余额、每会话成本与三方 Token 用量面板,支持多账号热切换、24h 峰谷时钟和防钓鱼充值入口。

本文为派生内容(基于 wiki / faq / compatibility_json 自动组装),非 AI 即时创作。

本文由本站基于该插件已收录的字段自动派生(wiki / faq / compatibility_json / readme),非 AI 即时创作。每节末尾标源字段。

快速上手

deepseek-harness-wallet

— 源: plugin_wiki.wiki_content

安装与验证

dsh plugin --profile web add github:feibi-mochi/deepseek-harness-wallet

复制以上命令在 DSH Web Profile 内运行。安装完成后在「插件列表」启用即可。

— 源: plugins.install

关键要点

  • Third-party total — current-session tokens (input / cache read / output). No balance guessing, no cost math, zero configuration.
  • Floating window mode — detach the detail panel into a draggable window with a remembered position, or minimize it directly to a freely movable dot; the dot turns red below the threshold.
  • Low-balance alert — below the threshold the chip turns red with a breathing animation and fires one desktop notification; it resets automatically once the balance recovers.
  • Clear current-session wallet data — one button clears only the open conversation's token/cost records; it does not delete the conversation, and every other conversation is untouched.
  • Open the wallet panel → 账户管理 to add accounts (name + API key), switch the active one, or remove them.

— 源: plugin_wiki.readme_zh (fallback readme_raw)

常见问题

安装后标签(chip)不出现怎么办?

必须先 dsh plugin --profile web add deepseek-harness-wallet,再 restart dsh web,最后在浏览器里硬刷新页面。客户端半包通过 __ModuleLoader__.load({ id: 'deepseek-harness-wallet' }) 注入(lib/client.js:6-11),硬刷新是触发装载的必要条件(AGENTS.md:23-25)。

余额为什么显示错误 / 没有数字?

余额依赖 DEEPSEEK_API_KEY,没有或 key 失效时直接对官方 /user/balance 端点查询,key 只作为 Authorization 头离开本机。Token / 成本会计不依赖 key,仍可正常工作;只要在 DSH 模型设置里配上 key 或让账号管理添加,余额就会恢复(index.js:518-529 / AGENTS.md:13)。

三方模型会话为什么没有余额和成本,只有 Token?

余额与官方价表只对接官方接口,三方 provider 没有官方价表也没有余额端点,所以只统计输入 / 缓存读 / 输出的 Token 量,不估算花费和余额(README.md:27)。

怎么在多个 DeepSeek 账号之间切换?下次计费跟着谁?

在面板「账户管理」里添加账号(名称 + API key),切换会写入凭据通道 credentials.set('DEEPSEEK_API_KEY', ...)。llm-deepseek 路由按请求解析该凭据,所以下一次 LLM 调用即按新账号计费,不需重启;如果环境变量里也设了 DEEPSEEK_API_KEY,凭据通道会拒绝覆写,切换会失败并提示(index.js:435-451 / README.md:39-44)。

充值链接地址可以换吗?

不能。RECHARGE_URL = 'https://platform.deepseek.com/top_up' 在宿主侧硬编码,不可配置——这是有意做的防钓鱼措施。首次点击会弹窗确认域名(index.js:28 / README.md:138)。

「永久删除会话」开关是灰的,怎么开?

这是宿主能力,非插件可独立实现。它要求宿主 DSH 真正实现了会话删除路径并向客户端广播 data-dshw-capability-permanent-delete='true';当前官方发行版没有此能力,所以开关保持禁用。如果你是宿主开发者,参考 integrations/dsh-session-delete/ 套件把能力接上即可(AGENTS.md:54-57 / lib/client.js:1063)。

数据存到哪里?清除本会话数据会不会删掉对话?

钱包数据存到 $DSH_HOME/storages/wallet.json,账号存到 $DSH_HOME/storages/accounts.json,UI 内显示内容 / 缩放 / 布局等存在浏览器 localStorage。「清除本会话数据」只清掉当前会话的 token / 成本计数,不会删聊天和会话本身(README.md:128-136 / index.js:30-31)。

机器上装了旧版 dsh-wallet,怎么清理?

dsh-wallet 在 0.1.1 改名为 deepseek-harness-wallet,老包不卸载会和新包重复占同一行 UI。执行 dsh plugin --profile web remove dsh-wallet 后重启 dsh web 即可(README.md:93 / AGENTS.md:40-41)。

会话成本(¥/¥)看起来不太准?

成本是按每次用量事件落到价格表时的"当时价"逐次估价的:v4 模型自带峰 / 谷两档(北京时间 09:00–12:00 与 14:00–18:00 为高峰,谷价为高峰一半),历史调用的计费不会被新价覆盖。官方接口返回的余额是权威值,估价仅作参考(index.js:52-90 / README.md:140-150)。

— 源: plugin_wiki.faq_json

兼容性

  • DSH: 0.1.0-rc.6+(0.1.0-rc.7 实测)
  • Node: >=22.19.0
  • Platforms: 跨平台

— 源: plugin_wiki.compatibility_json

踩坑提醒

安装前请审阅上游仓库;本指南基于已收录字段自动派生,可能滞后于最新版本。如发现与官方文档冲突,请以上游为准。

— 来源:通用规则