DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-cost-widget

z

dsh-cost-widget

Manifest valid★ 1

DSH Web GUI Floating Panel: Today's V4-Flash/Pro Average Cost Per Million Tokens and Cache Hit Rate

UI (client)hasBundlePatch

dsh-cost-widget

DeepSeek Harness(DSH)Web GUI 客户端插件:可拖拽的悬浮浮窗(紧凑悬浮条 ⇄ 完整面板),实时展示你 DeepSeek 开放平台账号当天的:

  • V4-Flash / V4-Pro:每 100 万 token 的平均费用(= 当天成本 ÷ 当天 token 数 × 100 万)
  • 缓存命中率(含进度条)、今日消耗、请求数、今日总成本、总命中率、余额
  • 头部"峰时/闲时"标识(北京时间 9:00–12:00、14:00–18:00 为峰时)

默认形态是右下角的紧凑悬浮条(DeepSeek ¥x · 命中率 · 峰/闲);点击展开完整面板,按住标题栏可拖到任意位置(位置记忆在 localStorage),每 5 分钟自动刷新,也可手动 ↻。挂载在 Web GUI 侧栏底部动作区(sidebar.footer.action 插槽)。

姊妹项目:zhangshaobo608/deepseek-widget —— 同样的指标,macOS 桌面浮窗版(不依赖 DSH)。

安装

需要 DSH web profile(@deepseek-ai/dsh >= 0.1.0-rc.6):

dsh plugin --profile web add "github:zhangshaobo608/dsh-cost-widget"

重启 dsh web(或触发热重载),浏览器硬刷新(Cmd+Shift+R)后面板出现在右下角。

更新 / 卸载:

dsh plugin --profile web update dsh-cost-widget
dsh plugin --profile web remove dsh-cost-widget

配置凭证(一次性)

插件通过 harness 凭证管道读取平台会话 token,添加:

# 在 ~/.dsh/.credentials.yaml 中追加一行(值可从浏览器获取,见下)
# DEEPSEEK_PLATFORM_TOKEN: <userToken>

获取 userToken:Chrome 登录 platform.deepseek.com → F12 → Console 执行(copy() 会把 token 直接放进剪贴板,无需手动选中输出):

copy(JSON.parse(localStorage.getItem('userToken')).value)

然后 Cmd+V 粘贴。也可存成书签一键复制(在 platform.deepseek.com 页面上点一下):

javascript:(()=>{const v=JSON.parse(localStorage.getItem('userToken')).value;navigator.clipboard.writeText(v).then(()=>alert('token 已复制'))})()

复制输出的长串(以 eyJ 开头)。也可用环境变量 DEEPSEEK_PLATFORM_TOKEN 注入(优先级更高)。

数据来源与安全

  • 数据来自 platform.deepseek.com/api/v0/usage/by_api_key/{amount,cost} 和 /users/get_user_summary —— 与官方用量页同一个内部 JSON API,不是爬网页。
  • 插件只在本机注册一个只读、仅回环接口 GET /api/dsh-cost/today(非本机调用直接 403),token 在请求时经凭证管道解析,不落盘、不回显。
  • 公开 API key(api.deepseek.com)只有 /user/balance,没有用量统计,所以用量必须用平台会话 token。

开发

npm run check   # 语法检查 lib/*
npm run test    # platform.js 纯函数测试(合成数据断言)
  • lib/index.js — host 端 cordis 插件(代理 + 聚合)
  • lib/platform.js — 纯函数:时间范围、解析、聚合(可单测)
  • lib/client.js — 浏览器端 __ModuleLoader__ bundle(React 面板)

License

MIT

Comments

Loading…

From the same category

archify

by tt-a1i

Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self-contained HTML with motion and crisp export.

Workflow & AutomationTools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 71.6k

↓ 3.5k/wk

MIT

JavaScript

Sep 25, 2026

dsh plugin --profile agent add @tt-a1i/archify-dsh

DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.

Tools & CapabilitiesManifest valid

★ 41.7k

↓ 236/wk

MIT

Aug 24, 2026

dsh plugin --profile web add dsh-plugin-reactive-resume

by Tencent

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

Development & InfrastructureTools & CapabilitiesManifest valid

★ 30k

↓ 838/wk

NOASSERTION

Go

Sep 25, 2026

dsh plugin --profile web add @wxg-prc-cpg/dsh-weknora

by anywhere-labs

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

Tools & CapabilitiesManifest valid

★ 29k

↓ 167/wk

MIT

TypeScript

Sep 25, 2026

dsh plugin --profile web add dsh-plugin-desktop

deepseek-harness-desktop is a interface plugin for DeepSeek Harness. See the repository documentation for its documented capabilities.

Tools & CapabilitiesUI & Experience

★ 28.6k

MIT

Index only — not installable

by titanwings

Distilly — Distill how they think into reusable Skills for any Agent or Bot. Formerly Colleague Skill(原同事 Skill).

Tools & Capabilities

★ 25k

MIT

TypeScript

Sep 22, 2026

Index only — not installable