TiferKing/dsh-usage-indicator
TiferKing★ 0TypeScript最后同步: 2026-08-17
简约的余额指示器,一眼看尽 DeepSeek 用量。上下文余量、账户余额、压缩倒计时,全部在侧边栏顶部。
README 摘要
dsh-usage-indicator DSH(DeepSeek Harness)Web 侧边栏插件:实时显示 上下文余量 、 账户余额 和 预计下次上下文压缩轮次 。数据本地闭环,API Key 不离开本机。 功能 - 上下文占用 / 模型窗口进度条,接近压缩阈值变黄、达到变红 - 账户余额进度条,低于警示线整条变红 - 「N 轮后压缩」EMA 估算,数据不足显示"评估中" - Web 设置面板可调整满条额度与警示线,热生效 - 侧边栏收起时为紧凑圆环 + 余额状态点 安装 前置:已安装 DSH 与 pnpm(缺 pnpm 先执行 npm install -g pnpm )。 方式一:Release 包(推荐) 方式二:源码安装(clone 即用,内置 lib/ 无需构建) 安装后重启 dsh web 生效;更新用新包再执行一次 add ;卸载: dsh plugin --profile web remove dsh-usage-indicator 。 使用与配置 默认读取环境变量 DEEPSEEK API KEY 查余额,侧边栏顶部实时显示卡片;收起侧边栏自动切换为圆环视图。Web 设置面板「API 用量指示」可修改满条额度与警示线,写入 settings.yaml 热生效。 字段 默认值 说明 apiKeyEnv DEEPSEEK API KEY 余额接口的凭证引用 baseURL $DEEPSEEK BASE URL → https://api.deepseek.com 余额接口基址(自定义网关时配置) refreshIntervalMs 60000 host 轮询周期(毫秒),下限 30 秒 thresholdRatio 0.8 上下文压缩阈值, 需与 dsh-compaction-basic 保持一致 fullBalance 100 资金条满条金额 warnBalance 20 余额低于该值时资金条变红 开发 结构: src/index.ts (host:轮询 + /api/usage-indicator 路由)、 src/client.tsx (侧边栏卡片与设置页)、 src/balance.ts (余额解析)、 test/ 。欢迎提交 Issue 与 PR。 License MIT
在 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,780
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,521
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,621