
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-sidebar-balance
Advanced tools
Minimalist, native-adaptive DeepSeek Harness balance widget: DeepSeek official account balance + OpenCode Go plan consumption ring in the sidebar footer, frosted-glass hover card, in-UI restart. · 极简原生风 DSH 余额插件:侧边栏常驻 DeepSeek 余额与 Go 套餐消耗圆环,磨砂悬浮卡,一键重启
极简主义 · 原生适配 · 零配置的 DeepSeek Harness 余额插件 Minimalist, native-adaptive, zero-config balance widget for DeepSeek Harness.
一个「长在原生界面里」的余额小组件:常驻侧边栏底部,与「设置」同一行,不新增按钮、不改变布局。默认显示 DeepSeek 官方账户余额,右侧一枚 OpenCode Go 套餐消耗圆环;鼠标悬浮弹出磨砂玻璃卡片,同时展示 DeepSeek 余额明细与 Go 套餐三窗口余量。重启 dsh 由独立的 dsh-restart 插件负责,本插件只关注余额与用量。
┌─────────────────────────────┐
│ ⚙ 设置 ● ¥4.98 ◯ │ ← 常驻行:与设置同排,金额+Go 消耗圆环
└─────────────────────────────┘
│ 悬浮
▼
┌──────────────────────────────┐
│ 💳 账户概览 ↻ │ ← 磨砂玻璃悬浮卡片
│ ┌──────────────────────────┐ │
│ │ DeepSeek 账户 [可用] │ │
│ │ ● ¥4.98 │ │
│ │ 充值 ¥4.98 · 赠送 ¥0.00 │ │
│ └──────────────────────────┘ │
│ OpenCode Go 套餐 │
│ 滚动 (5h) 23% · 周 14% · 月 8%│
└──────────────────────────────┘

上方为常驻行(与「设置」同一行,金额右侧带 OpenCode Go 消耗圆环);下方为磨砂玻璃悬浮卡(DeepSeek 余额明细 + Go 三窗口余量)。支持系统深浅色主题。
也可直接打开 docs/preview.html 查看交互效果。
host 半零 npm 依赖,整个插件零构建、纯手写 bundle--dsw-alias-*),浅色/深色主题自动适配;注册在官方 settings.trigger 槽位,点击行为与内置完全一致(点击设置区域=打开设置,点击金额=仅刷新,绝不误触)需要 DSH 0.1.0-rc.6+(web profile)与 Node.js ≥ 18。
# 方式 A:GitHub(无需构建授权,纯源码即可运行)
dsh plugin --profile web add github:zhouchengke2046/dsh-sidebar-balance
# 方式 B:本地目录
dsh plugin --profile web add /path/to/dsh-sidebar-balance
# 方式 C:npm(发布后)
dsh plugin --profile web add dsh-sidebar-balance
然后重启 dsh web(可用独立插件 dsh-restart 在设置页一键完成)并硬刷新页面(Cmd/Ctrl+Shift+R)。
零配置开箱即用,依赖 credentials 中的两个 key:
| Credential | 用途 |
|---|---|
DEEPSEEK_API_KEY | DeepSeek 官方余额(GET /user/balance) |
OPENCODE_GO_API_KEY | OpenCode Go 套餐用量(GET /zen/go/v1/usage) |
可选覆盖(profile 的 cordis.patch.yml;重启功能见 dsh-restart):
- insert:
- id: dsh-sidebar-balance
name: dsh-sidebar-balance
config:
balanceApiKeyEnv: DEEPSEEK_API_KEY
balanceBaseUrl: https://api.deepseek.com
opencodeApiKeyEnv: OPENCODE_GO_API_KEY
opencodeBaseUrl: https://opencode.ai/zen/go
cacheMs: 30000
timeoutMs: 15000
dsh plugin --profile web remove dsh-sidebar-balance
| 部分 | 文件 | 说明 |
|---|---|---|
| Host 半 | lib/index.js | 零依赖 Cordis 插件:两个同源 JSON 路由(/api/dsh-sidebar-balance/balance、/opencode),凭证经 credentials 服务解析;客户端 bundle 自托管于 /dsh-sidebar-balance/client.js 并经 webServer.tapIndex 注入 boot 图 |
| Browser 半 | lib/client.js | window.__ModuleLoader__.load 手写 bundle,注册进 settings.trigger 槽(priority -1 影子替换,单一槽位最低优先级渲染,行为与内置一致);磨砂玻璃卡片(backdrop-filter + 设计令牌);SVG 进度圆环 |
| 组合层 | cordis.patch.yml | dsh.bundle 补丁层,dsh plugin add 自动挂载 |
第三方 client 包不会被 client-modules 扫描,所以浏览器端通过 host 路由自托管 +
tapIndex注入,保证任意安装位置都能加载(与生态内同类方案一致)。
0.1.0-rc.6+(web profile)MIT —— 见 LICENSE
FAQs

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.