跳到正文

yingjunnan/dsh-deepseek-quota

32最近提交 2026年8月14日

dsh-deepseek-quota DSH 插件

该插件在 DeepSeek Harness 网页界面右下角添加一个浮动卡片,显示总余额、可用状态、当前对话费用和今日消费。卡片自动刷新并跟随应用主题。

如何安装 dsh-deepseek-quota DSH 插件

dsh plugin --profile web add dsh-deepseek-quota

复制不会执行命令。安装 dsh-deepseek-quota DSH 插件前请核对仓库和版本。

dsh-deepseek-quota DSH 插件数据来源

dsh-deepseek-quota DSH 插件快照日期:2026年8月16日

discovered

dsh-deepseek-quota DSH 插件能做什么

  • 显示总余额、赠送余额、充值余额和可用状态。
  • 显示当前对话费用,悬停时展示详细 token 计价公式。
  • 余额每 60 秒自动刷新,对话费用每 5 秒刷新,支持手动刷新。
  • 支持通过可选的平台令牌获取精确的今日消费,否则基于余额差值估算。
  • 跟随应用浅色/深色主题(使用 CSS 自定义属性)。
  • 明确的错误状态:未配置 API Key、网络失败、接口报错等。

dsh-deepseek-quota DSH 插件适合哪些场景

  • 实时监控 DeepSeek API 余额,避免意外耗尽。
  • 追踪单次对话费用,优化提示词设计。
  • 查看每日消费,管理 API 预算。
  • 无需离开 DSH 网页界面即可快速查看余额。
  • 检测 API Key 配置问题或网络异常影响额度查询。

dsh-deepseek-quota DSH 插件适合谁

  • 使用 DeepSeek Harness 开发 AI 应用的用户。
  • 需要监控 API 使用量和费用的 DSH 用户。

dsh-deepseek-quota DSH 插件的限制

  • 需要运行中的 DSH 网页环境,且已安装 pnpm 和 DSH CLI。
  • 今日消费仅在配置可选平台令牌时精确,否则基于余额差值估算。
  • 余额自动刷新间隔为 60 秒,非实时。
  • 对话费用基于官方 DeepSeek 价格表计算,价格表更新未同步时可能导致不准确。
  • 仅支持 DSH 网页界面,无命令行版本。

dsh-deepseek-quota DSH 插件的仓库 README 摘录

以下文字摘自 dsh-deepseek-quota DSH 插件的上游仓库 yingjunnan/dsh-deepseek-quota 的 README,版权归原作者,仅作引用。

A plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) **web GUI** that shows your remaining **DeepSeek API quota (balance)** in a floating card pinned to the **bottom-right corner** of the page. ![dsh-deepseek-quota 截图](docs/screenshot.png) `中文说明见下文。` ## Features - Bottom-right overlay card (registered into the frame-wide `shell.overlay` slot — additive, never blocks the app). - Shows **total balance**, availability, **current conversation cost**, **today's consumption**, and the **granted** / **topped-up** balance. - **Current conversation cost** (`当前对话费用`): the host prices every `assistant/message` with the official DeepSeek price table (incl. peak/off-peak since 2026-08-17; pricing engine ported from [dsh-web-billing](https://github.com/bpc-oss/dsh-web-billing), MIT) and reports the current session's accumulated cost via `GET /api/deepseek-session-cost?sessionId=<id>` — the whole conversation is replayed from its persisted log, so the figure includes history from before the plugin was installed. Hover the circled **ⓘ** next to the value to see the live formula with real numbers (`输入/缓存命中/输出 tokens × 单价 = 小计`, with the effective blended ¥/

阅读完整 README仓库许可: MIT

dsh-deepseek-quota DSH 插件常见问题

如何安装 dsh-deepseek-quota 插件?

在终端运行 `dsh plugin --profile web add dsh-deepseek-quota`。需要先安装 DSH CLI 和 pnpm。安装后重启网页应用(`dsh web`)并刷新页面,右下角就会出现余额卡片。

为什么今日消费显示的是估算值而不是精确值?

精确值需要配置 DeepSeek 官方平台的会话令牌。登录 https://platform.deepseek.com,打开开发者工具的控制台,执行 `JSON.parse(localStorage.getItem('userToken')).value` 获取令牌,然后将其作为 `DEEPSEEK_PLATFORM_TOKEN` 存入凭证文件。未配置令牌时,插件会基于余额差值估算今日消费。

插件会把我 API Key 发送到外部服务器吗?

不会。API Key 始终留在你的机器上。浏览器只与插件宿主侧注册的本地路由通信,所有对 DeepSeek 的 API 调用均从本地 DSH 实例发起。

安装后浮动卡片没有显示,怎么办?

首先确保添加插件后已重启网页应用(`dsh web`)。然后强制刷新浏览器页面。如果仍然不显示,运行 `dsh plugin --profile web list` 检查插件是否在 bundle 层列表中。同时确认 DSH 网页界面已启动在 http://127.0.0.1:3080。

这个插件能在没有 DSH 网页界面的情况下使用吗?

不能。该插件专为 DSH 网页界面设计,将组件注册到 `shell.overlay` 槽位,没有命令行版本。