dsh-context-dashboard
Agent 与会话 活跃维护

dsh-context-dashboard

uckkk/dsh-context-dashboard

轻量级会话上下文统计面板,自动汇总每会话消息数、对话轮次、工具调用次数与预估token消耗,同时支持生成全局及分项目的上下文用量报告,数据展示直观清晰。

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

dsh-context-dashboard · DSH 会话上下文统计面板

npm
GitHub
License: MIT

统计 DeepSeek Harness(DSH)本地会话的上下文消耗:每个会话的消息数、轮次、工具调用、字符数与预估 token,并生成全量/按项目的上下文报告。
Context usage dashboard for DeepSeek Harness — per-session token/message statistics and context reports, so you know exactly where your context budget goes.

支持 zstd 压缩.jsonl.zstd,DSH 默认存储格式)与明文.jsonl)会话日志。纯 Node 实现,零第三方运行时依赖。

功能 Features

工具 说明
session_stats 每个会话:消息数、用户/助手消息、工具调用、轮次、字符数、预估 token;可按 token/消息数/时间排序
context_report 全局报告:总消息、总预估 token、Top 消耗会话、按项目(工作目录)分组汇总

安装 Install

dsh plugin --profile web add dsh-context-dashboard
# 或任意 profile:dsh plugin --profile <name> add dsh-context-dashboard

使用 Usage(agent 工具)

  • 「哪个会话消耗的上下文最多?」→ session_stats(默认按预估 token 降序)
  • 「给我一份全局上下文报告」→ context_report
  • English: "Which session uses the most context?" → session_stats

预估 token = 字符数 ÷ 1.5(中文为主场景的经验值),仅供参考。

为什么选它 Why

  • 上下文预算管理:agent 会话越长越贵,先看清再决策(清理/导出/压缩)
  • 成本可见:Token 消耗一目了然

配套插件 Companion plugins

License

MIT © istone