dsh-plugin-window-stats
部署运维 活跃维护

dsh-plugin-window-stats

wellorbetter/dsh-plugin-window-stats

轻量级窗口统计插件,提供全窗口概览,实时聚合所有会话的对话进度与令牌消耗;内置会话级分析,支持成本估算与令牌热力图,快速定位高消耗会话。装完即用,无需配置。

2
Stars 标星
0
Forks 分支
2
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
5.6 MB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:wellorbetter/dsh-plugin-window-stats
git clone https://github.com/wellorbetter/dsh-plugin-window-stats.git
git clone git@github.com:wellorbetter/dsh-plugin-window-stats.git
README.md main

Window Stats

English | 中文

License MIT For DeepSeek Harness dsh-plugin

A DeepSeek Harness web plugin that shows every session's conversation progress and token usage at a glance.
All-windows overview · session analysis · cost estimation · token heatmap.
100% read-only and local — no outbound requests, no session writes.

Window Stats

Session Analysis

Overview panel and sidebar summary

What this plugin provides

Installing this bundle adds a cross-session observability surface to every session of the target dsh profile. It reads the official tokenUsage / sessionStats / contextPressure / contextBreakdown projections (plus a tokenHistory projection it registers itself), so no host service or new RPC is required beyond that one projection unit.

Surface What it shows
窗口统计 view tab One row per session: status, turns/steps, input/output tokens, cache-hit ratio, context occupancy, duration, cost, last activity — with sort / filter / group-by-workspace / model & currency selectors, and a right detail panel (token buckets, context composition, timing, heatmap).
会话分析 view tab Time-range analysis (presets + custom) of the current session: token trend chart, tool-type duration distribution (donut + bars), and per-turn task summaries.
Sidebar footer summary Always-visible running count, total tokens, and cost.
Right overview drawer Collapsed by default; expands to a running-sessions + top-token-consumers + recent-activity panel with click-to-open.

Data source

Displayed Source
turns / steps / wall times sessionStats projection
input / output / cache tokens tokenUsage projection
context occupancy / composition contextPressure + contextBreakdown projections
per-day token history (heatmap) tokenHistory projection (registered by this plugin)
status SessionSummary.running / pendingInteraction / completed

Cost is estimated from DeepSeek's official pricing (V4-Flash / V4-Pro, cache-hit / cache-miss / output priced separately) with USD / CNY / EUR / GBP / JPY switching.

Install

Requires the dsh CLI (install DeepSeek Harness).

# from GitHub (recommended)
dsh plugin --profile web add github:wellorbetter/dsh-plugin-window-stats

# or from a local checkout
dsh plugin --profile web add ./dsh-plugin-window-stats

Restart the profile (dsh web) after installing. The plugin is a bundle: it declares dsh.bundle.patch, so dsh plugin reconciles it into the profile's dsh.profile.bundles automatically. It ships pre-built JavaScript (lib/), so a GitHub install needs no build step or allowBuilds permission.

Use

After restarting dsh web:

  • Sidebar — the footer shows running count + total tokens + cost at all times.
  • 窗口统计 tab — open any session and click the tab to see every session's progress, tokens, and cost; click a row for a rich breakdown; use the toolbar to sort / filter / group / switch model & currency.
  • 会话分析 tab — analyze the current session over a time range, by tool type, with a token trend chart and task summaries.
  • Right drawer — click the edge handle to expand the running / top-tokens / recent overview, click any row to open it.

Development

pnpm install
pnpm verify   # typecheck + build + test

License

MIT