OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Yoke0/dsh-balance-widget
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness Web GUI 余额悬浮窗插件 —— 打开页面即可实时看到 DeepSeek 账户余额。
English · 一个零依赖的小插件:在 DeepSeek Harness 的 Web 界面右下角挂一个悬浮卡片,定时查询你的 DeepSeek 账户余额,余额多少、还剩多少一目了然,不用再手动打开控制台去查。
dsh web 进程本身不做任何主动请求$DSH_HOME/.credentials.yaml(Models 页面写入的位置)或环境变量git clone https://github.com/Yoke0/dsh-balance-widget.git
在包含克隆目录的父目录下执行(--profile web 换成你自己的 profile 名):
dsh plugin --profile web add ./dsh-balance-widget
这会用 pnpm 把仓库链接进 ~/.dsh/profiles/web,并把 dsh-balance-widget 追加进 dsh.profile.bundles。
不克隆也可以直接按 GitHub 仓库安装(纯 JS 包,无需构建脚本):
dsh plugin --profile web add github:Yoke0/dsh-balance-widget
dsh web
重启后刷新浏览器页面,右下角出现悬浮窗。若显示「未配置 API Key」,按下方「配置」补上 Key 即可,无需再次重启。
dsh plugin --profile web remove dsh-balance-widget
在 profile 的 cordis.patch.yml 中覆盖插件的 config:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: balance-widget
config:
baseUrl: https://api.deepseek.com # 供应商源站
intervalSeconds: 60 # 轮询间隔(秒,最小 10)
intervalSeconds 会随路由响应回传给浏览器,浏览器据此重新调度定时器——改配置后刷新页面即生效。
每次请求实时解析(改 Key 无需重启),优先级:
config.apiKey(不推荐:配置会共享给浏览器半边)$DSH_HOME/.credentials.yaml 里的 DEEPSEEK_API_KEY(推荐:GUI Models 页面写入的位置,改完热生效)DEEPSEEK_API_KEY┌────────────── dsh web 进程 ──────────────┐ ┌──────────────────┐
│ index.js (host half) │ │ 浏览器 │
│ ┌─────────────────────────────────────┐ │ │ client.js │
│ │ ctx.credentials.resolve │ │ fetch │ 悬浮窗 (React) │
│ │ DEEPSEEK_API_KEY ◄─ .credentials │ │◄───────│ shell.overlay 槽 │
│ │ │ │ │ │ 每 60s 轮询 │
│ │ ▼ │ │ └──────────────────┘
│ │ GET /api/balance-widget 路由 │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ GET https://api.deepseek.com/ │ │
│ │ user/balance (Bearer key) │ │
│ └─────────────────────────────────────┘ │
└──────────────────────────────────────────┘
GET /api/balance-widget 路由,收到请求才解析 Key 并调用 DeepSeek 余额接口——完全被动,没有浏览器打开时零请求;shell.overlay 槽位,页面打开时开始轮询,关页面即停止;每个标签页独立计时。node test/standalone.mjs # 离线路由行为(无 Key / 错误 Key)
node test/standalone.mjs --live # 用本机凭证对真实 DeepSeek API 实测
插件是双半边单包结构:index.js(Node 服务端)+ client.js(浏览器 bundle,手写 lazy-CJS 工厂格式)。浏览器半边由 dsh.client 扫描自动编入 window.__DSH_BOOT__ 组合图,改完 client.js 刷新页面即生效(服务端每次从磁盘读 bundle)。
127.0.0.1。MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: rag。