dsh-ui-deepseek-balance
by SeekerCodes
DeepSeek Harness(dsh)悬浮小部件:实时显示 DeepSeek 账户余额与最近任务成本(30 秒自动刷新)
A floating widget for DeepSeek Harness ( dsh ) that shows your DeepSeek account balance and the cost of the latest task in real time (auto-refresh every 30 s).
安装
dsh plugin --profile web add github:SeekerCodes/dsh-ui-deepseek-balanceGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
A floating widget for DeepSeek Harness (dsh) that shows your DeepSeek account balance and the cost of the latest task in real time (auto-refresh every 30 s).
为 DeepSeek Harness (dsh) 提供的一个悬浮小组件:实时显示 DeepSeek 账户余额 与 最近一次任务的花费(每 30 秒自动刷新)。
Features / 功能
- Floating card in the bottom-right corner (mounted on the
shell.overlayslot, above every column) / 右下角悬浮卡片(挂在shell.overlay全局悬浮层) - Balance: total / top-up / granted / 余额(总额/充值/赠送)
- Latest task cost in ¥, with total tokens / 最近任务花费(¥)与 token 总数
- The API key never leaves your machine: the host half (Node, loopback-only
127.0.0.1:3199) talks to DeepSeek; the browser half only fetches localhost / 密钥不出本机:host half(仅回环 127.0.0.1:3199)访问 DeepSeek,浏览器端只请求本机 - zh / en UI, auto-detected from browser language
Requirements / 环境要求
- DeepSeek Harness with
shell.overlaysupport (recent build; the npm release lags the repo — see Compatibility below) / 需支持shell.overlay的较新 dsh(npm 发布版落后于仓库,见下方兼容性) DEEPSEEK_API_KEYenv var (or anexport DEEPSEEK_API_KEY="..."line in~/.zshrc) / 需要 DEEPSEEK_API_KEY 环境变量(或 ~/.zshrc 中的 export 行)
Install / 安装
cd ~/.dsh/profiles/web
pnpm add dsh-ui-deepseek-balance
Append one row to ~/.dsh/profiles/web/cordis.patch.yml (your profile user patch layer — no fork, no rebuild):
在 ~/.dsh/profiles/web/cordis.patch.yml(用户 patch 层,无需 fork、无需重建)追加一行:
- id: ui-deepseek-balance
name: 'dsh-ui-deepseek-balance'
Restart dsh (or let the user patch layer hot-reload). The floating card appears bottom-right.
重启 dsh(或等待 patch 层热更新),右下角即出现悬浮卡片。
Using a different profile? Replace
webwith your profile name. / 用其他 profile?把web换成你的 profile 名。
Verify / 验证
Confirm you got the official package before installing — it should show 0.1.0 · MIT · zero dependencies and the maintainer seekercodes:
安装前确认你拿到的是官方包——应显示 0.1.0 · MIT · 零依赖,维护者 seekercodes:
npm view dsh-ui-deepseek-balance
npm view dsh-ui-deepseek-balance dist.tarball
Compatibility / 兼容性
- The widget mounts via
slots.inject('shell.overlay', …): on a dsh build that does not declareshell.overlay, it silently stays dormant — the page is unaffected (graceful degradation). / 组件通过slots.inject('shell.overlay', …)) 挂载:在不声明shell.overlay的旧版 dsh 上会安静地不挂载,页面不受影响(优雅降级)。 - The npm-published
@deepseek-ai/dsh/@deepseek-ai/dsh-web-appreleases currently lag the repo, so verify with a recent build. / 目前 npm 发布的 dsh/web-app 落后于仓库,建议用较新构建验证。
Data source & pricing / 数据来源与计价
- Balance:
GET https://api.deepseek.com/user/balancewith the key fromDEEPSEEK_API_KEY/ 余额:调用 DeepSeek 余额接口 - Usage: reads the harness projection cache
~/.dsh/storages/session_projcache.json(most recent session with token totals) / 用量:读取 harness 投影缓存中最近有 token 汇总的会话 - Cost is estimated from public list prices (¥ / 1M tokens): input 2.0, output 8.0, cache-read 0.5, cache-write 2.0. It is an estimate, not the official bill. / 费用按公开价目表估算(元/百万 tokens):输入 2.0、输出 8.0、缓存读 0.5、缓存写 2.0——是估算值,非官方账单。
Security / 安全
- The host data server binds
127.0.0.1only — never exposed to the LAN / host 数据服务仅绑定 127.0.0.1,不暴露到局域网 - The browser bundle contains no key material / 浏览器 bundle 不含任何密钥
- Port
3199is fixed; change it in bothsrc/index.tsandsrc/client/BalanceWidget.tsxif it collides / 端口 3199 固定,冲突时需同时改两个文件中的常量
Develop / 开发
pnpm install
pnpm typecheck # tsc --noEmit
pnpm test # vitest (9 tests)
pnpm build # tsdown -> lib/index.js (host) + lib/client.js (browser bundle)
The client bundle is a dsh closure-factory artifact (window.__ModuleLoader__.load({ id, factory })), with react resolved from the app module table at load time. / 客户端产物是 dsh 闭包工厂格式,react 在加载时从 app 模块表解析。
Publish / 发布
npm login
npm publish # prepublishOnly runs typecheck + tests + build
License / 许可
MIT
原始 README: https://github.com/SeekerCodes/dsh-ui-deepseek-balance/blob/main/README.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod