9Epuuuu/dsh-api-balance

插件 ⭐ 2 BSD-3-Clause web-ui

适用于DSH Web的DeepSeek账户余额显示(dsh-plugin)

catalog 简介:DeepSeek account balance readout for DSH Web (dsh-plugin)

安装

The balance comes from the official DeepSeek `GET /user/balance` endpoint, fetched by the host half (which sidesteps browser CORS). The per-session spend uses the balance-difference method: the first balance read for a session is recorded as its starting balance, and spend is the drop from it, clamped to zero.

## What it does

- **Host half**: registers `GET /api/balance` (loopback-only), resolves the API key through DSH's `ctx.credentials` service, fetches and caches the DeepSeek balance for the configured interval, and registers the `api-balance` settings namespace.
- **Client half**: mounts a line in `conversation.composer.dock` (the built-in stats line above the input box) and a settings card in the Web UI plugin group.

## Installation

Install the family aggregate package `@linxin666/dsh-web-ui-all` (all plugins and skins in one) or this plugin alone:

9Epuuuu/dsh-api-balance 加入你的 DSH 配置(web profile)即可启用。

README

展开完整 README 收起

README 内容为空。