brittanistrehlowll-oss/dsh-quota-panel 预览 preview

brittanistrehlowll-oss/dsh-quota-panel

面向dsh Web界面的提供方配额/余额角标面板(DeepSeek Harness插件):包含服务端凭据代理及配置驱动的页面角标。

Project Overview项目介绍

This is a native DSH plugin that adds a persistent quota and balance indicator to the DeepSeek Harness interface. It displays small capsules for each configured API provider (DeepSeek, OpenCode, CommandCode) in the bottom-left corner of the page, so users can check their remaining balance and usage at a glance. It registers server-side proxy routes for each provider, handles API key parsing entirely on the host side, and never exposes credentials to the browser frontend. It works on both DSH Web and the official Electron desktop build, and has no external npm dependencies.

The plugin has two display states: collapsed and expanded. When collapsed, it only shows a status dot and a rounded integer value for each account to enable quick scanning. When expanded, it displays full usage details, including progress bars for 5-hour, weekly, and monthly cycles along with their reset times. Users can drag the panel to any position within the viewport, and both the last saved position and lock status are persisted to browser localStorage. It is built for DSH users who want constant, at-a-glance visibility into their API usage and costs.

This plugin is released under the open source MIT license. Installation steps differ slightly between Web and desktop DSH: Web users can install it directly via the dsh plugin add command from the CLI, while desktop users need to manually create a directory junction and edit the profile configuration before restarting the DSH app. It automatically adapts to DSH's active light or dark theme by using DSH's built-in design tokens, and follows strict security practices that never expose API keys to the frontend. All API requests are proxied through the host, and responses never include raw sensitive credentials.

这是专为 DeepSeek Harness(DSH)开发的原生额度面板插件,用于在 DSH 界面左下角为已配置的各个提供方(DeepSeek、OpenCode、CommandCode)显示余额与用量角标。它会为每个配置的提供方注册一条服务端代理路由,API Key 始终在宿主侧解析,绝不进入浏览器前端,同时支持 DSH Web 版和官方 Electron 桌面版,本身没有任何外部 npm 依赖。

插件提供两种交互尺寸,收起状态仅显示每个账户的状态点和整数值方便快速浏览,展开后会展示完整明细,包括五小时/周/月不同周期的用量进度条和重置时间。用户可以将面板拖动到任意位置,位置和锁定状态都会保存在浏览器本地存储中。它面向需要随时掌握各API提供方账户余额与用量消耗的DSH用户。

本插件采用 MIT 许可开源,Web 版和桌面版的安装方式不同:Web 版可直接通过 dsh plugin add 命令安装,桌面版需要手动建立目录 Junction 并编辑配置文件后重启应用。它遵循 DSH 设计令牌,自动适配深浅主题,有严格的安全机制,永远不会将API密钥暴露给前端。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add "github:brittanistrehlowll-oss/dsh-quota-panel"

把 brittanistrehlowll-oss/dsh-quota-panel 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-quota-panel

简体中文 · English

version license DSH plugin platform dependencies providers stars

DeepSeek Harness(DSH)的提供方额度 / 余额角标。 页面左下角一行胶囊,扫一眼就知道还有多少钱、还剩多少额度;点开是一张完整卡片,再点一下收回一行。

零依赖宿主端插件:为每个配置的提供方注册一条服务端代理路由 /api/quota/<id> —— API Key 通过凭据系统在宿主侧解析,绝不进入浏览器 —— 然后在页面注入这个原生组件。Web(dsh web)和官方 Electron 桌面版共用同一份实现,不依赖任何其他插件。

界面

收起态:每个账户一对「状态点 + 数值」(如 ● ¥58 · ● 86% · ● 23%),没有文字标签;只有出问题的那个账户自己的点会变色。金额取整数用于速览,精确值见展开与悬停。

浅色 深色
收起(浅色) 收起(深色)

展开态:纵向排列各账户的余额与用量,五小时 / 周 / 月各自带进度条和重置时间;CommandCode 另显示本期费用与剩余额度。右上角是刷新按钮与独立的锁按钮。

浅色 深色
展开(浅色) 展开(深色)

页面中的默认位置(左下角,自动在侧栏「设置」行上方留出净空,不进入正文、不遮挡宿主控件):

浅色 深色
页面效果(浅色) 页面效果(深色)

可交互离线示例:浅色 / 深色(npm run demo 生成的单文件页面,用浏览器直接打开即可;数据为离线模拟,不连接真实账户)。仓库里的示例图由 npm run showcase 从这条真实注入脚本里重新截取,docs/verification/ 是回归测试产物。

特性

  • 两种尺寸,同一个组件 —— 收起 128×34px,长宽比约 3.76;展开宽 168px(--dsh-quota-width)、高度随内容自适应(当前三账户约 382px),圆角两端、无阴影,从底边向上展开。
  • 每个账户独立 —— 一个账户异常只染红它自己的状态点,不牵连其他账户。
  • 「接口挂了」不等于「额度危险」 —— 两者不共用红色,见下表。
  • 读数不编造 —— 缺失或非有限数值判定为数据异常,绝不折叠成 0%:「没读到数字」不能显示成「额度还很足」。
  • 跟随产品主题 —— 完全由 Harness 设计 Token(--dsw-alias-*、--dsw-static-*、--dsw-font-*)驱动,token 缺失时有合理 fallback,不携带自己的配色。
  • 可拖动、位置记忆、可锁定 —— 位置按浏览器持久化,窗口变化重新钳位,锁定后不再移动。
  • Web 与桌面同源 —— 宿主端载体中立:路由注册在 connection 的精确 Fetch 路由表上,Web 服务器与桌面 host 派发进同一张表。
  • 零依赖、前端零密钥 —— 不引入任何 npm 依赖;浏览器只访问 /api/quota/<id>,凭据始终留在宿主侧。
  • 键盘与无障碍 —— Enter/Space 开合、Tab 到锁按钮、Space 切换锁定、Esc 收起并回到主按钮;DOM 只用 createElement/textContent 构建。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-no-workspace 下一个 Next dsh-cae-plugin →