dsh-web-ui
zhu1090093659
Plugin 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.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:KamiYA7/dsh-balance-widget
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek API 余额悬浮窗 —— 为 DeepSeek Harness (dsh) 的 Web 界面添加一个右下角常驻悬浮窗,实时显示 DeepSeek API 账户剩余余额。
A floating balance widget for the dsh (DeepSeek Harness) web UI — shows your DeepSeek API account balance in real time, loaded by default on every launch.
shell.overlay 框架层,随 dsh 每次启动自动加载(常驻插件,非会话临时扩展)subprocess 调 curl 代理 GET /user/balance),不出现在浏览器与日志中目标 dsh 机器上(已装 node,dsh 自带),无需构建:
unzip dsh-balance-widget-plugin.zip && cd dsh-balance-widget-plugin
node install.mjs # 多 profile 时:node install.mjs --profile <profile名称>
# 重启 dsh
安装脚本幂等、可重复执行,只做三件事:
<profile>/plugins/;$DSH_HOME/profiles/node_modules/@deepseek-ai 建立链接(与 dsh 的 profiles 模块回退机制一致);<profile>/cordis.patch.yml 追加两行插件挂载。也可以把本仓库的 packages/ 内容合入自己的 dsh 源码树后按常规流程构建(tsc -b + tsdown)。
余额经 DEEPSEEK_API_KEY 凭据读取,三种来源任选其一:
DEEPSEEK_API_KEYllm-deepseek 设置段的 apiKeyEnv 引用可选:llm-deepseek.baseURL 或环境变量 DEEPSEEK_BASE_URL 可覆盖接口地址(默认为 https://api.deepseek.com)。
重启 dsh 后:
<你的 dsh 地址>/balance-widget/balance,返回 {"ok":true,...,"totalBalance":...} 即成功;{"ok":false,"code":"no-key",...},卡片显示红色错误提示。node install.mjs --remove # 重启 dsh 后生效
| 层 | 包 | 职责 |
|---|---|---|
| Host | dsh-balance-widget |
cordis 插件,注册 GET /balance-widget/balance 路由;解析凭据 → subprocess 调 curl → 解析并归一化 DeepSeek 余额 |
| Client | dsh-client-ui-balance-widget |
浏览器 bundle(dsh.client 声明),在 shell.overlay 注册悬浮卡片,轮询路由并渲染 |
两个包均为独立 npm 包形态(package.json + lib/ + 类型声明),遵循 dsh 的标准双面插件结构。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: widget。