dsh-webui-perf
awa-123-cw
DeepSeek Harness WebUI 性能优化开关插件:长代码流式渲染/历史加载/高亮缓存优化,设置面板一键开关(with official-package patches)
PROJECT TOPICS
PROJECT README
模型账户余额悬浮窗插件 for DeepSeek Harness Web GUI(dsh-web-ui 插件生态)。
右下角悬浮展示模型账户余额(每 60 秒自动刷新),可拖动、收起、关闭;设置页位于「设置 → 插件 → 模型余额悬浮窗」,带「显示余额悬浮窗」总开关。支持 DeepSeek / 硅基流动 / Moonshot / OpenRouter 余额接口(按 baseURL 域名自动识别)。
A floating model-account balance monitor for the DeepSeek Harness Web GUI: a draggable bottom-right card auto-refreshing every 60s, with a master show/hide switch on its Plugins-settings page. Supports DeepSeek / SiliconFlow / Moonshot / OpenRouter balance endpoints (auto-detected from the configured base URL).
~/.dsh/balance/settings.json。One-click show/hide on the Plugins-settings page, persisted locally.~/.dsh/balance/settings.json,接口只回传脱敏预览),或经 credentials 服务解析(环境变量 → ~/.dsh/.credentials.yaml → .env),永不下发到浏览器。Balance fetch runs on the host; the key can be entered in the settings page (stored locally, masked in responses) or resolved through the credentials seam — it never reaches the browser./user/balance、硅基流动 /v1/user/info、Moonshot /v1/users/me/balance、OpenRouter /api/v1/credits;其他域名明确提示不支持。Unsupported hosts fail with a clear message.lib/ 即发布产物)。No build toolchain.# 安装到 web profile(dsh 插件市场 / dsh CLI)
# Install into the web profile (dsh plugin market / dsh CLI)
dsh plugin --profile web add github:Mystery-God/dsh-balance
# 或直接改 profile 的 package.json / bundles 后 pnpm install
# Or edit the profile's package.json deps + bundles, then pnpm install
安装后重启 dsh web,即可在「设置 → 插件 → 模型余额悬浮窗」中配置。 Restart dsh web, then configure it at Settings → Plugins → 模型余额悬浮窗.
lib/index.js — host 半体:~/.dsh/balance/settings.json(浮窗总开关)+ /api/dsh-balance/* 路由(设置读写、余额查询)+ agent 公告
lib/client.js — 浏览器半体:设置页(settings.plugins.tab,总开关+余额预览)+ 悬浮卡片(shell.overlay)+ 60s 轮询
cordis.patch.yml — bundle patch:把插件行注入 profile 组合
node scripts/build.mjs # 把 src/ 复制为 lib/(无编译步骤)· copies src/ → lib/
node scripts/test.mjs # host 路由冒烟测试(mock 余额接口,临时 DSH_HOME)· host route smoke test
本仓库无 TypeScript / 无打包器:src/ 是手写源码,lib/ 是发布产物(需提交,dsh 插件市场校验安装包时要求入口文件存在)。No TypeScript, no bundler: src/ is the hand-written source, lib/ is the shipped artifact (committed).
纯中文版:README.zh.md
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。