在侧边栏设置按钮旁显示 LLM 账户余额并定时刷新
27.6/100
综合分
1
GitHub 星标
—
npm 周下载
—/5
用户评分
数据截至 2026/9/16 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。
安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add flluhaoran/dsh-plugin-account-balance该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)
状态速览
判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态信任档位:已验证
是什么
dsh 原生插件 · browser
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
更新放缓:最近一次提交在 80 天前
档位由哪些信号合成
本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码v2.7.0🟢 扫描:未发现敏感能力尚无人工评估展开查看扫描说明与证据 ↓
安全扫描自动 · 静态分析源码
v2.7.0静态扫描未发现敏感能力:最多只发网络请求、读取自身元数据或只读文件,未发现执行命令、文件写入或敏感信息读取。
发起外部网络请求
查看扫描证据(共 2 处,展示前 2 条)
- 发起网络请求lib/host.js:101
const response = await fetch(build(baseURL), { - 发起网络请求lib/client.js:129
const response = await fetch("/account-balance", { signal: AbortSignal.timeout(15000) });
扫描于 2026/11/3(1 天前) · 范围 入口闭包 + 发布文件清单 · 来源 GitHub 仓库
静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。
依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh-credentials给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个
功能亮点
- 显示账户余额
- 定时刷新余额
DeepSeek Harness 插件:在侧边栏底部、设置按钮旁显示当前 LLM 服务商账户余额
README
由 DeepSeek 最新模型翻译生成dsh-plugin-account-balance
一个 DeepSeek Harness 插件:在客户端侧边栏左下角显示当前 LLM 提供商的账户余额,紧挨着设置按钮右侧并排显示。
- 设置按钮宽度减半,余额显示框并排在右侧
- 余额每 5 分钟自动刷新,点击余额框可手动刷新
- API Key 只在 host 进程内使用,绝不进入浏览器上下文
效果
┌──────────────┐
│ ... │
│ │
│ [运行控制] │
│ [⚙ 设置][余额 ¥5.79] │ ← 左下角:减半的设置按钮 + 余额框并排
└──────────────┘
安装
插件是 npm 包,通过 profile 机制安装(dsh plugin 是 pnpm 的薄转发层)。
从 npm(推荐,无需构建授权)
dsh plugin --profile web add dsh-plugin-account-balance
从 GitHub
dsh plugin --profile web add github:flluhaoran/dsh-plugin-account-balance
pnpm ≥10 首次安装 git 依赖会要求构建授权:把 pnpm 打印的包键加入该 profile 的
pnpm-workspace.yaml 的 allowBuilds,然后重新执行 add。
展开完整文档(README 剩余 1 节)
dsh-plugin-account-balance
一个 DeepSeek Harness 插件:在客户端侧边栏左下角显示当前 LLM 提供商的账户余额,紧挨着设置按钮右侧并排显示。
- 设置按钮宽度减半,余额显示框并排在右侧
- 余额每 5 分钟自动刷新,点击余额框可手动刷新
- API Key 只在 host 进程内使用,绝不进入浏览器上下文
效果
┌──────────────┐
│ ... │
│ │
│ [运行控制] │
│ [⚙ 设置][余额 ¥5.79] │ ← 左下角:减半的设置按钮 + 余额框并排
└──────────────┘
安装
插件是 npm 包,通过 profile 机制安装(dsh plugin 是 pnpm 的薄转发层)。
从 npm(推荐,无需构建授权)
dsh plugin --profile web add dsh-plugin-account-balance
从 GitHub
dsh plugin --profile web add github:flluhaoran/dsh-plugin-account-balance
pnpm ≥10 首次安装 git 依赖会要求构建授权:把 pnpm 打印的包键加入该 profile 的
pnpm-workspace.yaml 的 allowBuilds,然后重新执行 add。
从 tarball
pnpm pack # 在插件仓库内打包
dsh plugin --profile web add ./dsh-plugin-account-balance-0.1.0.tgz
安装后重启(或刷新)客户端界面即可看到左下角的余额框。
桌面版说明:桌面应用使用 web profile(~/.dsh/profiles/web)。若你的机器没有 node/pnpm,可先用 Electron 内置的 Node 运行 dsh CLI:
ELECTRON_RUN_AS_NODE=1 "/Applications/DeepSeek Harness.app/Contents/MacOS/DeepSeek Harness" \
"/Applications/DeepSeek Harness.app/Contents/Resources/host/node_modules/@deepseek-ai/dsh/lib/bin.js" \
plugin --profile web add dsh-plugin-account-balance
(或用 Homebrew 安装 pnpm 后直接使用 dsh plugin。)
卸载
dsh plugin --profile web remove dsh-plugin-account-balance
工作原理
插件是单包双面(bundle):
- host 半(lib/host.js):在 loopback webserver 注册精确路由 /account-balance。处理时解析当前默认模型的提供商及其 settings profile 中的 apiKeyEnv 引用,通过 credentials 服务解析密钥(密钥不出 host 进程),调用提供商余额接口并返回 JSON。
- client 半(lib/client.js):以 priority: -1 影子注册 sidebar.settings 槽(最低优先级先渲染,覆盖内置设置壳),复刻设置面板外壳的同时把触发按钮改为半宽,并在右侧并排渲染余额框;余额框通过同源 fetch("/account-balance") 获取数据,5 分钟自动刷新、点击手动刷新。所有既有设置分区(通用、模型、权限、主题等)通过同名子槽继续原样渲染。
支持的提供商
| 提供商 | 余额接口 |
| deepseek-official | GET https://api.deepseek.com/user/balance |
其他提供商当前返回 supported: false,界面显示「暂不支持」。欢迎 PR 补充。
开发
git clone https://github.com/flluhaoran/dsh-plugin-account-balance.git
cd dsh-plugin-account-balance
dsh plugin --profile web add . # 从 checkout 安装,改动即时生效(客户端 HMR 热重载)
License
MIT
A DeepSeek Harness plugin that
shows the current LLM provider's account balance in the sidebar footer,
right beside a halved Settings button.
- Auto-refresh every 5 minutes; click the box to refresh immediately.
- The API key is only used inside the host process and never crosses into the
browser context.
Install
dsh plugin --profile web add dsh-plugin-account-balance # npm
dsh plugin --profile web add github:flluhaoran/dsh-plugin-account-balance # git
dsh plugin --profile web add ./dsh-plugin-account-balance-0.1.0.tgz # tarball
How it works
One package, two faces (a "bundle"): the host half registers an exact
环回 Web 服务器上的 /account-balance 路由(通过 credentials 服务解析当前提供商的凭据,并查询其余额 API);客户端部分以 priority: -1 遮蔽内置的 sidebar.settings 插槽,重新渲染设置外壳,使用减半的触发器和一个内联余额框,该余额框以同源方式获取 /account-balance。
支持的提供商
| 提供商 | 余额端点 |
| deepseek-official | GET https://api.deepseek.com/user/balance |
其他提供商报告 supported: false(“暂不支持” / “Unsupported”)。预览分享卡片长什么样 ↓
分享 · DeepSeek Harness Hub
flluhaoran/dsh-plugin-account-balance
在侧边栏设置按钮旁显示 LLM 账户余额并定时刷新
相关插件 · 浏览器
智能体插件框架deepseek-ai/deepseek-harness
DeepSeek Harnessdsh是由 DeepSeek AI 开发的开源 agent harness智能体框架。
★ 270,422已汉化DSH
71.9
多设备 Agent 看板YaoApp/yao
✨ 所有 Agent 和工作区集中管理,覆盖你的每一台设备。任务看板追踪进度,桌面端、移动端、浏览器、API…
★ 8,147已汉化DSH
71.2
可扩展侧边栏工作台omdsh-dev/DSH-better-sidebar
DSH 的双工作台:原生右侧栏 + 自绘底部面板,并把 ctx.betterSidebar 服务开放给所有插件
★ 4,761已汉化DSH
71.1
浏览器自动化桥Tencent/BrowserSkill
你的 Agent。你的浏览器。连接,就能协作。
★ 9,967已汉化DSH
71
AI 小说创作工作台EthanYoQ/AI-Novel-Writer
AI 小说作家 / AI Novel Writer
★ 1,591已汉化DSH
70.7
智能体浏览器引擎platonai/Browser4
DeepSeek Harness 集成
★ 1,175已汉化DSH
70.4
这是你的仓库?认领条目