DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-plugin-account-balance

d

dsh-plugin-account-balance

Identified

Shows the remaining DeepSeek account balance in the composer dock, right after the cache-hit reading, and links to the Platform usage page. Requires a signed-in DeepSeek account; API-key-only setups s

dsh-plugin-account-balance

DeepSeek Harness 插件:在输入框底部统计行里显示账号剩余额度,位置紧挨「缓存命中」右边。

A DeepSeek Harness plugin that shows your remaining DeepSeek account balance in the composer dock, right after the cache-hit reading.

输入框底部统计行,蓝框标出本插件渲染的 ¥14.79

图中蓝框圈出的 ¥14.79 就是本插件渲染的格子。金额是充值余额 + 赠金余额按币种合计:悬停显示拆分(充值余额 ¥9.99 · 赠金余额 ¥5.26),点击打开 DeepSeek 平台用量页,页面可见时每 60 秒刷新一次。读不到钱包时显示 -- 并保留这一格,不会让整行跳动。

前提

  • DeepSeek Harness 的 Web 界面(dsh web),profile 里要有 conversation.composer.dock 这个插槽(官方 web 组装自带)。
  • 用 DeepSeek 账号登录。只用 API Key 的组装没有账号态,插件不会显示任何东西。
  • 账号要能查到钱包摘要。查不到时显示 --,此时打开 设置 → 账号与余额 看到的通常也是"前往开放平台查看"——那是账号侧的问题,不是插件。

安装

插件是一个 DSH 插件包(dsh.bundle.patch + dsh.client),仓库里不带构建产物:client.js 是手写的模块装载包,index.js 只提供一个空的宿主半边。

从 Discover 安装

本仓库同时发布了一份插件市场索引(docs/index.json,由 DSH 官方的 market generator 生成)。profile 启用了插件市场(@deepseek-ai/dsh-experimental-plugin-market-bundle)时,把下面这个地址加进 设置 → 插件 → 发现 的索引源,就能在应用内搜到并直接安装:

https://cai-like.com/dsh-plugin-account-balance/index.json

也可以在对话里直接问 Agent:"用 plugin_market 搜一下 account balance" —— plugin_market 是 DSH 内置的工具,读取的就是 profile 里配置的这些索引源。

GitHub Pages 的 cailikelog.github.io/... 地址会 301 到上面的自定义域名,而市场抓取把重定向当作失败,所以索引源请用自定义域名这一条。

手工安装

# 1. 装进 profile 的 node_modules
cd ~/.dsh/profiles/web           # Windows: C:\Users\<你>\.dsh\profiles\web
pnpm add github:cailikelog/dsh-plugin-account-balance

# 2. 在 profile 的 cordis.patch.yml 里插入一行(文件末尾追加,注意 YAML 数组缩进)
- insert:
    - id: dsh-plugin-account-balance:pill
      name: dsh-plugin-account-balance

# 3. 重启
dsh

这条 pnpm add github:... 在干净目录里实测过:装上 0.1.0,装进去的 client.js 与仓库里的字节完全一致。

索引是怎么生成的

docs/index.json 由 DSH 仓库里的 market generator 读 market-sources.txt 生成,改完包名/描述/图标后重新生成即可:

pnpm --filter @deepseek-ai/dsh-plugin-market-generator start \
  --input market-sources.txt --output docs/index.json \
  --title "cailikelog plugins" --description "DeepSeek Harness plugins by cailikelog"

卸载

删掉 cordis.patch.yml 里那三行(- insert: 和下面两行),pnpm remove dsh-plugin-account-balance,重启。

实现要点

  • 只占一个槽位:conversation.composer.dock(列表槽),id 为 account-balance,order: 2——缓存命中那颗是 order: 1。
  • 数据走 remote.account:getState() 拿登录态和用量页地址,getBalance() 拿钱包摘要。不读取、不复制任何凭据,凭据始终留在宿主进程里。
  • 注册和读取都挂在 remoteAccess.whenAccess('account/watch') 下:对端没有账号访问权限时不会注册这个格子,权限被收回时一并拆除。
  • 不依赖其它插件,也不依赖主题包:颜色走 --dsw-* / --dsh-* CSS 变量,样式内联。

已知限制

  • client.js 里的 CLIENT_VERSION = '0.2.1-rc.3' 会作为 x-client-version 发给平台。平台若开始校验版本,改这一个常量即可。
  • 金额用浮点数求和、向下取两位,只用于显示,不参与任何计费。
  • 与本仓库 packages/client/ui-settings-account 里的 AccountBalancePill 使用同一个格子 id,不要同时启用两份,后注册的会替换先注册的。

开发

pnpm install
pnpm test        # 装载 client.js、跑 apply、断言注册项与渲染结果

test/smoke.cjs 复刻了浏览器装模块的方式:先给出 window.__ModuleLoader__,再执行 client.js,用假 ctx 跑 apply,最后用 React 渲染出那一格。

Comments

Loading…

Similar plugins

dsh-account-balance

by ls-cool-123

DeepSeek account balance dashboard plugin for dsh web — shows your DeepSeek API balance above the chat window.

Manifest valid

★ 0

↓ 12/wk

MIT

JavaScript

Aug 22, 2026

dsh plugin --profile web add dsh-account-balance

DeepSeek account balance in the dsh web sidebar footer with live config hot reload and an editable Settings → Plugins card.

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 0

↓ 114/wk

dsh plugin --profile web add @choi-p/dsh-deepseek-balance

by Rannist

Shows DeepSeek account balance and current-session token and cost usage in the sidebar footer and composer dock, including peak and off-peak billing and subagent consumption.

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 2

↓ 592/wk

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add balance-dsh

by dsh-plugin-lab

DSH plugin: shows your DeepSeek account balance at the bottom of the left sidebar (native UI)

Tools & CapabilitiesManifest valid

★ 4

↓ 511/wk

MIT

TypeScript

Oct 20, 2026

dsh plugin --profile web add dsh-ds-balance

by novaschai7

DeepSeek account balance, today's token usage and estimated spend in the dsh Web client sidebar. · 在 dsh 侧边栏显示 DeepSeek 余额、今日 token 用量与花费估算。

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Sep 30, 2026

dsh plugin --profile web add dsh-plugin-balance-ui

Shows DeepSeek API account balance and Volcengine Ark Coding/Agent Plan quota windows (5h/weekly/monthly with reset countdowns) in the settings panel, composer dock, and a draggable floating refresh b

Tools & CapabilitiesModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add dsh-billing-balance