neltharion11/dsh-api-balance
neltharion11★ 0JavaScript最后同步: 2026-08-19
DeepSeek Harness plugin: show your DeepSeek API account balance in the DSH web sidebar (live widget) and expose it to the model via an api_balance tool
README 摘要
dsh-api-balance DeepSeek Harness 插件:在 DSH Web 界面左侧边栏底部显示你的 DeepSeek API 账户余额(实时小组件),并把余额查询暴露为 api balance 工具供模型在对话中汇报。 功能 - Web 侧边栏小组件 ( sidebar.footer.action 槽位,列表式追加,不影响其他条目): - 展开侧边栏:显示 API 余额 ¥110.00 (取第一个币种),悬停可看明细(充值 + 赠金、更新时间),点击立即刷新; - 收起为窄轨:只显示一个钱包图标按钮,悬停提示明细; - 每 20 秒自动轮询,由宿主端 60 秒缓存兜底,不会高频打 DeepSeek API。 - api balance 工具 :模型可在对话中查询并汇报余额(币种、总额、充值、赠金、更新时间)。 - 系统提示词小节 :告知模型余额小组件与工具的存在。 环境要求 - DeepSeek Harness web profile(Node.js ≥ 22.19) - 一个可用的 DeepSeek API 密钥(见下节) API 密钥来源(与官方 deepseek-official 适配器一致) 按以下优先级解析 DEEPSEEK API KEY (可通过配置 apiKeyEnv 改名): 1. ctx.credentials 凭据 seam —— $DSH HOME/.credentials.yaml (Models 页面写入的位置); 2. 启动环境快照(launch environment,含项目/用户 .env ); 3. 进程环境变量 process.env (Windows 下大小写不敏感)。 密钥 永不 出现在 HTTP 响应、工具结果或日志里——只存在于宿主内存中用于 Authorization: Bearer 头。 安装 方式一:从 GitHub 安装(推荐) dsh plugin 会把包 pnpm 安装进 profile 并自动把它加入 dsh.profile.bundles 层列表。前提:机器上已安装 pnpm( dsh plugin 依赖 pnpm)。 方式二:本地路径安装 在 DSH 安装目录(如 F:\deepseek-harness )下执行: 方式三:手动安装(无 pnpm 时,请严格按此执行) 最常见的翻车点 :从 GitHub 下载 ZIP 解压出的文件夹叫 dsh-api-balance-main (默认分支会带 -main 后缀)。 文件夹名必须与包名完全一致: dsh-api-balance ,否则 dsh 启动时会报 cannot resolve profile bundle "dsh-api-balance" 并拒绝启动。 1. 下载并解压仓库(或用 git clone https://gi…
在 GitHub 查看完整 README →分类
Enhancement suite for Gemini, AI Studio, Claude & ChatGPT — plus a prompt manager for any web UI, DeepSeek Harness included. / 面向 Gemini、AI Studio、Claude 与 ChatGPT 的增强套件;提示词管理器可用于任意 Web UI,含 DeepSeek Harness。
★ 19,772
zhu1090093659/dsh-web-uiPlugin and skin collection for DeepSeek Harness (DSH) Web UI - task board, git graph, right-side panel, remote mobile UI, pet, live token stats, and skin center.
★ 5,470
omdsh-dev/DSH-better-sidebar开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git, and sub-agent pages.
★ 2,596