- Inicio
- Plugins
- Uso y facturación
- dsh-session-stats
dsh-session-stats
chenkaining/dsh-session-stats
Shows the current session's workspace, model, token usage, and output speed in a row below the composer.
Instalar
dsh plugin --profile web add github:chenkaining/dsh-session-statsREADME
dsh-session-stats
DeepSeek Harness (dsh) Web GUI 插件:在输入框下方的 dock 区显示一行当前会话统计。
A DeepSeek Harness (dsh) Web GUI plugin that shows a live statistics row for the current session below the composer.
功能 / Features
| 项 | 说明 |
|---|---|
| 工作区 / Workspace | 当前会话所属 Workspace 的主机目录路径(悬停显示标题与完整路径) |
| 模型 / Model | 会话当前生效的模型路由(来自 Host 的 modelSelection 持久投影) |
| 输入 / 输出 / 缓存 / 合计 | 整个会话持久日志的 provider 上报 token 用量(来自 token-meter 的 tokenUsage 投影);悬停「缓存」可分别查看读 / 写 |
| 速度 / Speed | 根据用量样本到达时间在客户端测算的输出速度:按时间间隔加权的 EMA(时间常数 15s) |
| 平均 / Average | 活跃时段平均速度(样本间隔超过 90s 视为空闲,不计入时长;会话运行中时计入未闭合的尾段) |
数据全部通过槽位标准 props 读取(Host 投影,客户端不折叠会话事件);缺数据的项显示 —,不会报错。配色使用宿主 --dsw-alias-* 主题令牌,随明暗主题切换;文案走 dsh locale 服务(中文 / 英文)。
All data is read through the standard slot props (Host-computed projections — the client never folds session events). Missing data renders as —. Styling uses the host --dsw-alias-* theme tokens; labels are localized via the dsh locale service (zh / en).
安装 / Install
方式一:DSH 插件页(推荐)
- 克隆本仓库到任意目录:
git clone https://github.com/chenkaining/dsh-session-stats.git - 打开 dsh Web GUI → 插件 → 添加插件(Add plugin) → 选择克隆出的目录。
方式二:拷贝目录
直接把本目录拷到目标机器,用 Plugins → Add plugin 指向它即可。
安装后建议重启一次 DeepSeek Harness:浏览器模块图在启动时做全量扫描,运行期安装的新 bundle 需要重启才会进入客户端模块图。
要求 / Requirements
- DeepSeek Harness ≥ 0.2.2(在 0.2.2-rc.5 上开发验证)
- token 用量 / 速度列依赖 token-meter 插件挂载(desktop / web profile 默认启用);未挂载时相应项显示
—
工作原理 / How it works
- 槽位:注册到
conversation.composer.dock(session 作用域 list 槽),组件接收标准会话 props(useSession/useProjection/useWorkspaces/t)。 - 用量:
useProjection('tokenUsage')— Host 端 token-meter 对持久会话日志的折叠结果(未缓存输入 / 输出 / 缓存读 / 缓存写四个桶)。 - 模型:
useProjection('modelSelection')— 会话持久模型选择的 wire 视图。 - 工作区:全局
useWorkspaces快照,按sessionIds匹配当前会话,取WorkspaceView.path。 - 速度:组件内维护样本环形缓冲(240 条),EMA 与活跃时段平均均在客户端计算;页面刷新后从当前累计值重新开始。
详见 docs/DETAIL.md。
目录结构 / Layout
session-stats-plugin/
├── package.json # dsh.bundle.patch + dsh.client 声明
├── cordis.patch.yml # 插入 session-stats 行
├── index.js # Host 半区(无逻辑)
├── client.js # 浏览器半区:统计行组件 + locale
├── locale/ # Plugin Manager 元数据(en / zh)
├── docs/DETAIL.md # 插件详情页文档
└── icon.svg # 插件图标
License
Plugins relacionados
DeepSeek-Balance-Whale-Widget
meteornox/deepseek-balance-whale-widget
dsh-context
bowenliang123/dsh-context
dsh-cost-meter
han-1413141/dsh-cost-meter
dsh-damage-pulse
wssfk12138/dsh-damage-pulse