dshbase

插件目录 / UI & Skins / dsh-balance

dsh-balance

已验证 · 实测可装 HiNEM66

✓ 持续维护 3 位贡献者 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

在 DSH 界面左下角显示 DeepSeek 余额。

我们的评价
可用 — 实测通过,早期项目

在 DSH 界面左下角显示 DeepSeek 余额。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-balance

A DeepSeek Harness (dsh) web profile plugin that puts a DeepSeek API balance button in the sidebar foot, right above the Settings entry.

  • One click → popover with total / granted / topped-up balance per currency, with refresh and close actions
  • Optional inline display: show the balance on the button itself without opening the popover
  • Optional auto refresh: re-query the balance in the background every N conversation turns
  • Full settings page (余额 / Balance) in the Settings panel: enable/disable the plugin, inline display, auto-refresh interval
  • Cosmetic touch: shrinks the built-in Cordis Plugin badge at the sidebar foot to a compact round icon so both buttons share the row cleanly
  • Clicking anywhere outside the popover closes it

The API key is never embedded: it resolves per request from the DSH credential seam (~/.dsh/.credentials.yamlDEEPSEEK_API_KEY, or the ambient environment variable).

Install

# 1. install the package into your web profile (pnpm under the hood)
dsh plugin --profile web add github:HiNEM66/deepseek-harness-balance

# 2. register the bundle patch layer: edit ~/.dsh/profiles/web/package.json
#    and add "dsh-balance" to the "dsh.profile.bundles" array, e.g.
#    "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-balance"]

# 3. restart the web GUI
dsh web

Alternative to step 2: add the row by hand to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: dsh-balance
      name: dsh-balance

Requires the DEEPSEEK_API_KEY credential (set it in ~/.dsh/.credentials.yaml
or through the dsh Models page). The plugin itself ships no key.

Settings

Settings persist in ~/.dsh/settings.yaml under the dsh-balance: section (live-applied; edits there are picked up within ~10 s):

Key Default Meaning
enabled true Show the sidebar button and run auto refresh. Disabling hides the button without deleting anything.
showInline false Show the balance in the button label (wide sidebar only; in the rail, hover the icon).
autoRefreshEvery 0 Refresh in the background every N closed agent turns; 0 disables.

Requirements

  • dsh 0.1.0-rc.x web profile with the standard client modules (sidebar, settings, slots)
  • Windows host for the balance route (it shells out to curl.exe); network access to https://api.deepseek.com

Development

No build step: lib/client.js is a hand-written, self-contained __ModuleLoader__ bundle (React comes from the shell's shared module registry), and lib/index.js is plain ESM.

npm run check   # node --check both files
npm test        # execute the client bundle against a fake ModuleLoader kernel

Layout:

lib/index.js        host half: /deepseek-balance, /state, /config routes +
                    settings namespace + agent turn counter
lib/client.js       client bundle: sidebar button + popover + settings page
cordis.patch.yml    bundle patch: inserts the dual-face row
dsh.plugin.json     plugin inventory metadata
tests/smoke.mjs     bundle contract smoke test

Upgrading

dsh plugin --profile web update dsh-balance   # refetches the latest commit
dsh web                                       # restart

Releasing (maintainers)

# 1. bump "version" in package.json and dsh.plugin.json, then:
npm run check && npm test

# 2. commit (Conventional Commits) and push
git add -A && git commit -m "feat: ..."
git push origin main

# 3. tag the release
git tag v<version> && git push origin v<version>

# 4. dogfood locally: refresh the git dep to the new commit and restart
cd ~/.dsh/profiles/web && pnpm update dsh-balance
dsh web

Known limitations

  • The badge-shrinking CSS targets the shipped Nqubda_* class names; a future dsh upgrade that renames them silently restores the stock badge (the balance button is unaffected).
  • The client syncs settings by polling /deepseek-balance/state every 10 s.

Uninstall

dsh plugin --profile web remove dsh-balance
# and drop "dsh-balance" from "dsh.profile.bundles" (or remove the row from cordis.patch.yml)

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-balance」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:HiNEM66/deepseek-harness-balance

Headless(CLI)profile:

dsh plugin --profile headless add github:HiNEM66/deepseek-harness-balance

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

改变 dsh 的外观或交互方式——一套主题、皮肤或新面板,重塑工作区。

适合谁

在 web UI 里一待几小时、想让它按自己的习惯好看又好用的人。

二次开发建议

皮肤、面板和主题 token 是扩展点——写新皮肤、加面板,或与上游配色同步 token。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

UI & Skins 里更多

浏览全部 7795 个插件 →