返回目录
模型与 MCP 插件

dsh-strength-meter

chou109/dsh-strength-meter

强度表是 DSH Web 开源插件:设置页按模型统计 token 用量(环形图、热力图、趋势),数据仅来自本地日志。一条命令安装,重启即用。 dsh-strength-meter: a DSH plugin. Settings shows per-model token usage (donut, heatmap, trend), local logs. One command, restart.

Stars
0
Forks
0
Issues
0
更新
1 个月前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:chou109/dsh-strength-meter

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-strength-meter — Model Usage Stats for DSH 0.2.x

A local token-usage statistics section for the DeepSeek Harness Settings panel: metric cards, per-model donut, a 15-week activity heatmap, and a daily token trend. Everything is folded from your local session logs through the current sessionQuery service; nothing is uploaded.

中文文档见 README.zh.md。

Plugin dsh-strength-meter 2.0.0
Harness DeepSeek Harness 0.2.1-rc.2 (Desktop or dsh web)
Layer Host route + Settings client section
License MIT

What changed from 1.x

DSH 0.2 replaced the old host session seams. Version 2 keeps the same UI and route path but reads the corpus through today's API:

Concern 1.x 2.0.0
Live sessions ctx.sessions.list() → session.events ctx.sessions.list() for ids; logs read through sessionQuery
Cold sessions sessionPersistence.listSnapshots() / inspect(id) sessionQuery.readSession(id) (live-preferred, replay-validated)
Cache key persistence revision from listSnapshots sessionPersistence.list() revision (optional; folds still work without it)
Client icons @deepseek-ai/dsh-client-ui-primitives Local SVG glyph (no primitives import)
Registration settings.section (compatible) settings.section (unchanged)

The fold itself (lib/fold.js) is unchanged and still mirrors the durable log: request/header names the model, assistant/message.usage / assistant/chunk carry tokens, and user/assistant messages drive the activity calendar.

Install

Plugin Manager (Desktop)

Install this folder as a bundle and enable dsh-strength-meter.

CLI

dsh plugin --profile <profile> add /absolute/path/to/dsh-strength-meter

Manual

Link the package into the profile's node_modules, then add to cordis.patch.yml:

- insert:
    - id: dsh-strength-meter
      name: 'dsh-strength-meter'

Reload the page. No Harness file is patched.

Use

Open Settings → Usage stats (the section sits after the built-in sections). Pick Last 7 days / Last 30 days, or press the refresh button to bypass the 15 s response cache. The first read folds the whole corpus with a concurrency of 4; subsequent reads reuse folds whose persistence revision is unchanged.

Route

GET /plugins/dsh-strength-meter/usage.json?days=7|30&force=1

The payload contains total, models[], sessions, messages, activeDays, streak, topModel, byDay[], heatmap[][], and a debug block with corpus/folded/cached/errors.

Verify

npm test
# → fold tests, host smoke test, bundle smoke test

Live check: open the stats section; the metric cards must show non-zero totals for a profile with history, and the heatmap must render 15 columns.

Limits

  • Response cache — 15 seconds unless force=1.
  • Bounded corpus — at most 400 sessions per request.
  • No projection dependency — the plugin deliberately folds raw logs instead of registering a sessionStats projection, so it works in any composition.

License

MIT.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness、deepseek-harness-plugin。