DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-Api-monitor

l

dsh-Api-monitor

Manifest valid★ 1

DeepSeek Harness API balance monitor

UI (client)hasBundlePatch

dsh-api-balance — API 余额检测插件

在 DSH「设置」面板新增 API 余额 模块:实时查询已配置供应商(DeepSeek)的账户余额、可用状态与真实 Token 用量,支持手动刷新。API Key 只存在于后端,浏览器只会拿到余额数据。

快捷安装(推荐,DSH 原生插件指令)

插件已声明为 DSH bundle,一条命令即可从 GitHub 安装到 web profile:

dsh plugin --profile web add github:gaozhiwei521/Deepseek-Harness-Api-monitor

装完重启 DSH(退出「DSH 对话」再打开),在「设置 → API 余额」即可看到界面。

⚠️ 迁移注意:若之前用过下方的手动 Copy-Item 安装,请先移除 cordis.patch.yml 中的 api-balance insert 块,并删除 ~\.dsh\profiles\node_modules\dsh-api-balance\,避免与 bundle 双份注册。

安装位置

  • 源码(本目录):E:\deepseekwork1\dsh-api-balance\
  • GitHub:gaozhiwei521/Deepseek-Harness-Api-monitor
  • bundle 补丁:extensions/dsh/cordis.patch.yml(dsh plugin add 自动应用)
  • 手动装载补丁(旧方式):~\.dsh\profiles\web\cordis.patch.yml

工作原理

层实现
后端 lib/index.js注册两条回环路由:GET /dsh-balance/query(通过 credentials.resolve() 读取 DEEPSEEK_API_KEY,调用 {baseURL}/user/balance)和 GET /dsh-balance/usage(聚合本地会话日志中的真实 token 用量,60s 缓存)。baseURL / apiKeyEnv 跟随「设置 → 模型」里 llm-deepseek 配置段的覆盖。
前端 lib/client.js注册 settings.section 槽位(id=api-balance,label=「API 余额」):可用额度大数字 + 可用状态徽章 + 用量卡片(累计/今日 Tokens、会话数、用量记录)。样式全部使用全局 --dsw-alias-* 主题令牌,与暗色主题一致。

手动安装(旧方式,DSH 升级后插件可能丢失时备用)

# 1) 把包放到 profiles\node_modules
Copy-Item 'E:\deepseekwork1\dsh-api-balance\package.json' "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-api-balance\" -Force
Copy-Item 'E:\deepseekwork1\dsh-api-balance\lib' "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-api-balance\lib" -Recurse -Force

# 2) 确认 cordis.patch.yml 末尾有 api-balance insert 块(升级若覆盖则重新追加)
# 3) 重启 DSH(退出「DSH 对话」再打开;或杀掉后端进程由桌面壳看门狗自动拉起)

卸载

dsh plugin --profile web remove dsh-api-balance

(旧手动安装方式:1. 删除 cordis.patch.yml 中 api-balance 的 insert 块;2. 删除 ~\.dsh\profiles\node_modules\dsh-api-balance\;3. 重启 DSH。)

测试

node 'E:\deepseekwork1\dsh-api-balance\test\unit.test.mjs'        # 后端逻辑(13 项)
node 'E:\deepseekwork1\dsh-api-balance\test\client-load.test.cjs' # 前端模块结构

已知说明

  • 用量为真实数据:DeepSeek 无公开用量 API(/user/usage 实测 404),因此消耗数据来自本地会话日志中每次调用的真实 token usage(输入/输出/缓存/推理),非估算。
  • 赠送余额:账户无赠送余额(0)时自动隐藏该项。
  • 默认读取 DEEPSEEK_API_KEY;若模型设置在「设置 → 模型」中改过 Key 引用或 baseURL,插件自动跟随。
  • 仅支持 DeepSeek 官方账户余额接口;其他供应商的余额接口暂未接入。

Versions

Latest versionPublishedSize
1.0.0——
1.1.0——
1.2.0——
1.2.1——

Comments

Loading…

From the same category

open-design

by nexu-io

🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards,

Development & InfrastructureTerminal & ClientsUI & ExperienceManifest valid

★ 98.1k

Apache-2.0

TypeScript

Sep 25, 2026

Index only — not installable

deepseek-harness-desktop is a interface plugin for DeepSeek Harness. See the repository documentation for its documented capabilities.

Tools & CapabilitiesUI & Experience

★ 28.6k

MIT

Index only — not installable

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

Tools & CapabilitiesTerminal & ClientsDevelopment & InfrastructureModels & ProvidersUI & ExperienceManifest valid

★ 8k

Apache-2.0

TypeScript

Sep 25, 2026

dsh plugin --profile web add dsh-web

A collection of independent Web UI plugins and skins, including task boards, Git graphs, mobile access, and live token stats.

UI & ExperienceVision & MultimodalTools & CapabilitiesJust for FunManifest valid

★ 7.4k

Apache-2.0

TypeScript

dsh plugin --profile web add dsh-web

by ZSeven-W

The world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pe

UI & Experience

★ 6k

MIT

Rust

Sep 25, 2026

Index only — not installable

by omdsh-dev

开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,

Terminal & ClientsUI & ExperienceWorkflow & AutomationManifest valid

★ 3.7k

↓ 43.9k/wk

MIT

TypeScript

Sep 24, 2026

dsh plugin --profile web add dsh-better-sidebar