DeepSeek Harness plugin

dsh-usage-indicator

Web sidebar indicator: API key context headroom, account balance, and estimated turns until compaction

Jump to install

Source facts

Repository
TiferKing/dsh-usage-indicator
Latest update
Aug 17, 2026
Category
Models & Providers
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/TiferKing/dsh-usage-indicator
Plugin: dsh-usage-indicator
Author: TiferKing

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-usage-indicator

![CI](https://github.com/TiferKing/dsh-usage-indicator/actions/workflows/ci.yml)

![Screenshot1](docs/screenshots/Screenshot1.png)

DSH(DeepSeek Harness)Web 侧边栏插件:实时显示上下文余量账户余额预计下次上下文压缩轮次。数据本地闭环,API Key 不离开本机。

功能

  • 上下文占用 / 模型窗口进度条,接近压缩阈值变黄、达到变红
  • 账户余额进度条,低于警示线整条变红
  • 「N 轮后压缩」EMA 估算,数据不足显示"评估中"
  • Web 设置面板可调整满条额度与警示线,热生效
  • 侧边栏收起时为紧凑圆环 + 余额状态点

安装

前置:已安装 DSH 与 pnpm(缺 pnpm 先执行 npm install -g pnpm)。

方式一:Release 包(推荐)

dsh plugin --profile web add C:\path\to\dsh-usage-indicator-<version>.tgz

方式二:源码安装(clone 即用,内置 lib/ 无需构建)

git clone https://github.com/TiferKing/dsh-usage-indicator.git
dsh plugin --profile web add .\dsh-usage-indicator

安装后重启 dsh web 生效;更新用新包再执行一次 add;卸载:dsh plugin --profile web remove dsh-usage-indicator

使用与配置

默认读取环境变量 DEEPSEEK_API_KEY 查余额,侧边栏顶部实时显示卡片;收起侧边栏自动切换为圆环视图。Web 设置面板「API 用量指示」可修改满条额度与警示线,写入 settings.yaml 热生效。

字段默认值说明
apiKeyEnvDEEPSEEK_API_KEY余额接口的凭证引用
baseURL$DEEPSEEK_BASE_URLhttps://api.deepseek.com余额接口基址(自定义网关时配置)
refreshIntervalMs60000host 轮询周期(毫秒),下限 30 秒
thresholdRatio0.8上下文压缩阈值,需与 dsh-compaction-basic 保持一致
fullBalance100资金条满条金额
warnBalance20余额低于该值时资金条变红

开发

npm install
npm run build      # 产出 lib/index.js + lib/client.js
npm run typecheck  # 类型检查
npm test           # 运行测试(需 Node ≥ 22.18)

结构:src/index.ts(host:轮询 + /api/usage-indicator 路由)、src/client.tsx(侧边栏卡片与设置页)、src/balance.ts(余额解析)、test/。欢迎提交 Issue 与 PR。

License

[MIT](LICENSE)