deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Token usage heatmap for the DeepSeek Harness (dsh) web GUI — a GitHub-style
contribution graph for daily / weekly / cumulative token consumption, with a
summary bubble, hover details, and activity insights. Mounted through the
official dsh plugin mechanism (dsh plugin add) — no dsh source changes.
A "Token Activity" entry appears in the settings sidebar.
Daily heatmap — dark theme, English (12-month window)
Three views — dark theme, English
| Daily | Weekly | Cumulative |
|---|---|---|
![]() |
![]() |
![]() |
Light theme & Chinese UI
| Light (English) | 深色主题(简体中文) |
|---|---|
![]() |
![]() |
fs / path / os / zlib), works on Windows, macOS and Linux; the browser half is platform-agnostic.Requires pnpm on PATH:
npm install -g pnpm
From npm (recommended):
dsh plugin --profile web add @kelearns/dsh-token-usage
Listed in awesome-dsh-plugin curated registry; also searchable as
token-usagein the Plugin Market tab of dsh settings (dsh-market).
Local development install (run from this repository's root — link:.
resolves to the current directory):
dsh plugin --profile web add link:.
Remove:
dsh plugin --profile web remove @kelearns/dsh-token-usage
The installer reads
cordis.patch.yml(thedsh.bundle.patchmanifest field) and applies the plugin row automatically — no manual patch editing. Restart dsh web to activate.
$DSH_HOME/profiles/web/node_modules/@kelearns/dsh-token-usage;$DSH_HOME/cordis.patch.yml (idempotent):- insert:
- id: dsh-token-usage
name: '@kelearns/dsh-token-usage'
$DSH_HOME/sessions/
Token usage is folded from assistant/chunk events with
chunk.type === "usage" (usage { inputTokens, outputTokens, cacheReadTokens })
attributed to local days by event time (epoch ms). Total = input + output + cache read.
Insights additionally read request/header (model / reasoning effort),
tool/call (tools) and usage timestamps (peak hour / weekday).
Per-file results are cached by (size, mtimeMs); rescans only re-decode
changed (active) sessions.
| Method | Path | Description |
|---|---|---|
| GET | /dsh-token-usage/stats | Full statistics: { totals, stats, insights, today, days:[{d,i,o,c,a}], scan } |
| POST | /dsh-token-usage/refresh | Force cache invalidation and rescan |
| GET | /dsh-token-usage/status | Cache / last scan state |
- insert:
- id: dsh-token-usage
name: '@kelearns/dsh-token-usage'
config:
refreshIntervalMinutes: 5 # background rescan interval (default 5)
node test/mock.test.mjs # synthetic full pipeline
node test/mock.test.mjs "$env:USERPROFILE\.dsh" # real-data smoke (any DSH_HOME)
node test/layout-algo.mjs # layout algorithm matrix
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。