Skip to content

Releases: HaoyueQin/dsh-usage-statistics-panel

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 19 Oct 18:09

版本概述 / Release Overview

v0.3.4 adds two short ranges — today and the last three days, both bucketed per hour — and makes the Tokens card state its figure exactly: a compact K/M/B headline with the full count and its unit underneath. The activity heatmap is fixed on two counts: its SVG viewport is now sized from the real track count, so the newest week is no longer clipped, and a window request that fails once no longer leaves the grid grey for the rest of the session (issue #15).

v0.3.4 新增「今日」与「最近 3 天」两个短范围(均按小时分桶),并让 Tokens 卡片把数值写清楚:K/M/B 紧凑主值,下方是带单位 tokens 的完整数字。热力图修了两处:SVG 视口改为按实际轨道数计算,最新一周不再被裁到边缘;窗口请求失败一次后,不再让整个会话都停在灰色(issue #15)。

新增 / Added

  • Today and the last 3 days are selectable ranges; for these two the token trend switches to hourly buckets.
  • The Tokens card leads with its compact K/M/B figure and repeats the exact count with its tokens unit underneath (issue #13).
  • 新增「今日」与「最近 3 天」两个可选范围;这两个范围下 Token 趋势按小时分桶。
  • Tokens 卡片以 K/M/B 紧凑值为主,下方重复带 tokens 单位的精确数字(issue #13)。

变更 / Changed

  • The sidebar glyph now draws at the weight of the shipped panel rows beside it, and the plugin-card icon's trend line is a two-bend polyline instead of three wiggling beziers (issue #12).
  • The README, its preview images, the animated demo and the banners now show the current panel: today / 3-day presets, the rebuild action, and the new Tokens card.
  • 侧栏图标线宽改为与旁边官方面板行一致;插件卡图标的趋势线由三段起伏的贝塞尔改为经过两个拐点的折线(issue #12)。
  • README、预览图、动画 demo 与 banner 换成当前面板:今日 / 3 天预设、重建按钮与新的 Tokens 卡片。

修复 / Fixed

  • The heatmap's SVG viewport now covers every week track the grid lays out, including the extra track a partial first week needs, so the newest week is no longer pushed past the right edge.
  • A heatmap window request that fails once no longer leaves the grid at level-0 for the rest of the session: the window is re-read on every panel load (range switch, refresh, rebuild), and the failure is logged to the console instead of being swallowed (issue #15).
  • 热力图的 SVG 视口现在覆盖网格实际铺出的全部周轨道(含首周不完整时多出的那一列),最新一周不再被挤出右边缘。
  • 热力图窗口请求失败一次后,不再让网格在整个会话里停在 level-0:窗口随每次面板加载重读(切换时间范围、刷新、重建),失败会写入 console 而不是被静默吞掉(issue #15)。

完整变更 / Full Changelog: v0.3.3...v0.3.4

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 13 Oct 17:45

版本概述 / Release Overview

v0.3.3 brings the plugin onto the dsh 0.2.1 line and closes the two compatibility gaps that line opened: the composer statistics row no longer duplicates itself (issue #10), and the panel's own /usage/api route answers again when the server is bound to a concrete non-loopback address or reached through --trusted-host. It also starts counting two billed call kinds that were previously invisible — compaction summaries and AI-generated session titles — so the panel's totals stop undercounting them.

v0.3.3 把插件带到 dsh 0.2.1 线,补上该线打开的两处兼容缺口:输入区统计行不再自我重复(issue #10),服务端绑定具体非 loopback 地址或经 --trusted-host 访问时,面板自己的 /usage/api 路由恢复应答。同时开始统计此前完全不可见的两类计费调用——会话压缩的摘要调用与 AI 生成的会话标题——面板总量不再少计它们。

修复 / Fixed

  • From DSH 0.2.1-alpha.1 the bottom statistics row is one speed pill plus one token pill again, instead of two duplicate pairs, and it keeps rendering as the single official-style row on DSH 0.2.0-rc.2 and earlier (issue #10).

  • On DSH 0.2.1-alpha.2, panel data loads again when the server binds a concrete non-loopback address or is reached through --trusted-host; on DSH 0.2.0-rc.2 and earlier a --trusted-host authority keeps working as before. Cross-site and foreign-Host requests stay refused on both.

  • Compaction summaries are counted: each adds its provider-reported tokens and one request, attributed to the route that wrote the summary.

  • Session-title calls are counted: a generated title is billed but writes no usage into the session log, so its tokens and one request are now recorded too. A title call whose stream is cut short — a timeout, or a cancelled session — is still counted, and one compaction counts one request no matter how often the backend retried internally, while a failed compaction is not counted at all.

  • 从 DSH 0.2.1-alpha.1 起,底部统计行恢复为一颗速度 pill 加一颗 token pill,不再是两组重复;在 DSH 0.2.0-rc.2 及更早仍渲染原来的官方样式整行(issue #10)。

  • 在 DSH 0.2.1-alpha.2 上,服务端绑定具体非 loopback 地址、或经 --trusted-host 访问时,面板数据恢复加载;在 DSH 0.2.0-rc.2 及更早,--trusted-host 授权一如既往可用。两代上跨站请求与陌生 Host 仍被拒绝。

  • 会话压缩的摘要调用开始计入:每次压缩加上其 provider 上报的 token 与一次请求,归因到写出摘要的路由。

  • 会话标题调用开始计入:生成的标题会计费却不在会话日志里写用量,现在其 token 与一次请求也会被记录。流被中断的标题调用——超时或会话被取消——同样计入;一次压缩不论后端内部重试多少次都只计一次请求,压缩失败则完全不计。

升级指引 / Upgrade Guide

  1. Upgrade the plugin to 0.3.3 and restart dsh once so the host half reloads; the panel and the bottom statistics row come back with no further configuration.

  2. If you disabled the plugin to work around the duplicated statistics row on DSH 0.2.1-alpha.1 or alpha.2, re-enable it: 0.3.3 takes that row over instead of stacking a second one beside it.

  3. 把插件升级到 0.3.3,并重启一次 dsh 让 host 半重新加载;面板与底部统计行无需额外配置即恢复。

  4. 如果你曾为规避 DSH 0.2.1-alpha.1 / alpha.2 上的重复统计行而整插件停用,请重新启用:0.3.3 会接管那一行,而不是在它旁边再叠一行。

已知问题 / Known Issues

  • The performance-usage display preference — its compact mode keeps only the speed, or only the cache hit — is not followed by this plugin's shadowing pills, which always render the detailed reading. The preference lives in ui-chat's private config form; this is a long-standing deliberate difference rather than a 0.2.1 regression.

  • 「性能与用量显示」偏好(紧凑档只留速度或只留缓存命中)不会被本插件的遮蔽 pill 跟随,它们始终渲染详细读数。该偏好位于 ui-chat 私有的 config form,这是长期存在的有意差异,不是 0.2.1 引入的回归。

完整变更 / Full Changelog: v0.3.2...v0.3.3

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 05 Oct 17:40

版本概述 / Release Overview

v0.3.2 collects the fixes and additions since v0.3.1 and matters to anyone on the dsh 0.1.7+ line. The two composer stat dialogs regain the official frosted material and, with deepseek-harness-background active, join that plugin's glass sheet (issue #6). The panel toolbar gains a guarded Rebuild action, the Plugins page shows the plugin's own card icon and localized metadata, and the activity heatmap scrolls without re-rasterizing its cell shadows every frame.

v0.3.2 收拢 v0.3.1 以来的修复与新增,面向所有 dsh 0.1.7+ 线的用户。输入坞的两个统计浮层找回官方磨砂材质,并在 deepseek-harness-background 激活时接入其玻璃体系(issue #6);面板工具栏新增带确认的重建操作;插件页显示本插件自己的卡片图标与本地化元数据;活跃热力图滚动时不再逐帧重绘格影。

新增 / Added

  • With deepseek-harness-background installed and its glass gate active, the two composer stat dialogs join that plugin's frosted-glass sheet: they keep the official menu fill and gain the shared sheen and the blur chain that follows the user's blur slider. With the gate off — wallpaper disabled, no source, panel opacity maxed — or the plugin absent, they render the official material unchanged.

  • The panel toolbar gains a Rebuild action: the first press arms it (red, "Rebuild?"), the second rebuilds the statistics through POST /usage/api/reset; blur, Escape, or five seconds without a second press cancels.

  • The plugin declares its card icon and en / zh / zh-TW locale dictionaries, so the Plugins page shows the plugin's own icon and localized title and description instead of the package-name fallback.

  • 安装 deepseek-harness-background 且其玻璃门禁激活时,输入坞的两个统计浮层接入该插件的毛玻璃体系:保留官方菜单填充,叠加共用高光与跟随模糊滑杆的模糊链。门禁关闭(停用壁纸、无图源、面板不透明度拉满)或未装该插件时,浮层保持官方材质不变。

  • 面板工具栏新增「重建统计」:首次点击进入待确认(变红显示「确认重建?」),再次点击经 POST /usage/api/reset 重建统计;失焦、Esc 或 5 秒内无第二次点击即取消。

  • 插件声明了卡片图标与 en / zh / zh-TW 语言字典,插件页显示本插件自己的图标与本地化标题、描述,不再回退到包名。

修复 / Fixed

  • The two composer stat dialogs (time & speed, token usage) keep the official frosted material on dsh 0.1.7 and later: the panel pairs the translucent menu fill with the official blur token instead of rendering as bare translucency with the page showing through crisply. Reported by @zlZayn in #6 — the dialogs had copied only the fill from the pre-0.1.7 opaque single-line recipe.

  • Scrolling the activity heatmap no longer re-rasterizes the 364 cells' two drop-shadows on every frame: the shadows ride the heatmap SVG on its own compositing layer, and the cells keep their original hairline highlight and soft under-shadow.

  • The standalone panel's top inset moves onto its back row, so the window-drag strip at the window's top edge is no longer split by a strip painted by the scrolling container. Rendering is unchanged.

  • 输入坞的两个统计浮层(用时与速度、Token 用量)在 dsh 0.1.7 及以后的宿主上恢复官方磨砂材质:面板把半透明菜单填充与官方模糊 token 成对使用,不再是无磨砂的纯透明、页底文字清晰透出。由 @zlZayn 在 #6 报告——此前浮层从 0.1.7 之前的不透明单行配方只抄了填充行。

  • 滚动活跃热力图不再逐帧重绘 364 个格子各自的两道投影:投影随热力图 SVG 移到独立合成层上,格子保留原本的发丝高光与底部柔影。

  • 独立面板的顶部内边距移到返回行自身,窗口顶边的拖拽条带不再被滚动容器绘制的条带切走一块。渲染不变。

完整变更 / Full Changelog: v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 26 Sep 13:21

破坏性变更 / Breaking Changes

This release requires DeepSeek Harness 0.1.7-rc.1 or later. On 0.1.6-alpha.2 and earlier the bottom info bar fails to render, because the host renamed the icon exports that bar used. Hosts at 0.1.6-alpha.2 or earlier must stay on 0.3.0.

本版本要求 DeepSeek Harness 0.1.7-rc.1 及以后。在 0.1.6-alpha.2 及更早的宿主上,底部信息栏无法渲染——宿主重命名了该栏使用的图标导出。这些宿主请继续使用 0.3.0。

版本概述 / Release Overview

v0.3.1 moves the panel onto the dsh 0.1.7 host line. When deepseek-harness-background is installed the panel also joins that plugin's frosted-glass sheet, the standalone panel gains a back control, and the activity heatmap cells become translucent tiles.

v0.3.1 把面板迁移到 dsh 0.1.7 宿主线。安装 deepseek-harness-background 后,面板接入其毛玻璃体系;独立面板新增返回按钮;活跃热力图的小方框改为半透明玻璃砖质感。

新增 / Added

  • The panel bed, the metric cards, the range group, the model and provider lists, the preference group and the chart tooltip join the background plugin's frosted-glass sheet, so they carry the same fill, sheen and backdrop-filter chain as that plugin's own glass surfaces. Registration is gated on the background plugin being present; without it nothing changes.

  • The standalone panel draws a back control in its top-left corner, returning to whatever was selected before it — the Conversation, the Plugins page, or another plugin's panel.

  • 面板底板、指标卡、时间范围选择组、模型与供应商列表、偏好设置组与图表浮层接入背景插件的毛玻璃体系,与它自带的玻璃面使用同一套填充、高光与 backdrop-filter 链。注册以「背景插件存在」为条件;未安装时外观不变。

  • 独立面板左上角新增返回按钮,回到进入它之前的界面——会话、插件页或其它插件的面板。

变更 / Changed

  • The activity heatmap's cells read as translucent tiles with a lit top edge and a soft under-shadow, and the legend swatches match the grid. The five heat levels keep an 82% fill so the level encoding stays readable.

  • 活跃热力图的小方框改为半透明玻璃砖:顶部高光、底部柔和阴影,图例色块与网格一致。五级色阶保留 82% 填充,以免削弱级数编码的可读性。

修复 / Fixed

  • On dsh 0.1.7 the composer bottom bar renders again; through 0.1.6-alpha.2 the host's renames left its two icons undefined.

  • The panel's data requests resolve under whatever mount served the page, so the panel loads when the shell is served behind a prefix-stripping proxy instead of only at the origin root.

  • 在 dsh 0.1.7 上,会话底部的信息栏恢复渲染;在这之前,宿主的改名让它的两个图标解析为 undefined。

  • 面板的数据请求改为在「提供页面的挂载点」下解析,因此 shell 挂在剥离前缀的代理下时面板也能加载,不再只在源站根目录可用。

升级指引 / Upgrade Guide

  1. Check the host version with dsh -V.

  2. At 0.1.6-alpha.2 or earlier, stay on plugin 0.3.0.

  3. At 0.1.7-rc.1 or later, install this release and hard-refresh the browser; the client half hot-reloads, and only host-half updates need a DSH restart.

  4. 用 dsh -V 查看宿主版本。

  5. 0.1.6-alpha.2 及更早:继续使用本插件 0.3.0。

  6. 0.1.7-rc.1 及以后:安装本版本并硬刷新浏览器;client 半会热加载,仅 host 半更新需要重启 DSH。

完整变更 / Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 17:15

v0.3.0 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.3.0 更新说明

本版本是面板的一次整体重排:面板从设置页搬上插件页、拿到整页内容列(#2),随后获得独立的主面板行作为常驻入口;模型与供应商占比图恢复为环形图。宿主适配面零变化,采集与存储契约不变,usage_history 域无需 reset。

搬进插件页,拿到完整内容列(#2):设置页 tab 的宽度装不下占比图,模型与供应商拆分上一版被迫从环形图降级为窄条。本版本改经 plugins.bundle.config 槽(以包名为 key)注册为 bundle 自己的配置页,直接渲染在插件页上,拿到该页 960px 内容列与整个中栏高度。

  • 设置页小节退役,连同它需要的设置页导航图标注入(settings-nav-icon)一并移除;侧栏快捷入口保留并改为打开面板自己的页面。
  • 模型与供应商占比恢复响应式环形图:直径按所在行实测宽度解出(200–280px),并与旁边的排行列表垂直居中;StackedBar 及其收起高度测量随之移除。
  • 六张指标卡排成一行,两个长值卡(总 tokens、最高用量模型)占更宽的端位档,最高用量模型移到末位。
  • 活跃热力图窗口从 26 周加宽到 52 周,几何求解器重写:先尽量把富余宽度花在更多周数上、再增大格子,两种分支都恰好填满容器;旧求解器在 900px 宽的行附近最多溢出 23px,收窄时也会留下接近一格的死空间。
  • 侧栏入口不再独占 flex: none,不再挤压共享页脚行里的其它插件入口。

独立的主面板行(#2 落地后的补强):快捷入口原本骑在 sidebar.footer.action——那是所有插件共享的单行 flex 行,去掉 flex: none 只是止损:再进一家插件,每个入口就只剩约 85px,装不下「用量统计」这样的标签。入口现在改为 New Session 下方、与自带面板并列的面板行,是本插件独享的席位。这让面板需要一处主面板供该行选中,于是同一组件渲染两处:插件页(形态不变)与独立主面板(同样收在 960px 内容列内),两个入口外观一致。注册面:以 usage-stats 为 id 注册 main 与 sidebar.panellist,不再注册 sidebar.footer.action;侧栏快捷入口偏好及其状态模块、SidebarEntry 组件随之删除——面板行常驻,与自带面板一致,开关已没有可控制的对象。

宿主与存储零变化:宿主适配面仍对齐 0.1.6-alpha.2(核验宿主列表不变),本版本的改动全部在客户端渲染与注册层;usage_history 域版本仍为 1,采集与回扫路径不受影响。dsh.client.inject 不再声明 @deepseek-ai/dsh-client-ui-settings(设置页小节退役后客户端已不消费该包);context-types.ts 删除两个全仓无消费者的服务镜像(UsageSettingsService/ctx.settings、UsageConnection/ctx.connection),UsageSlotEntrySpec 补上插件页按包名匹配所需的 key 字段并新增 UsagePluginConfigOwnerProps 镜像。

清理:发布评审发现的死代码一并移除——驱动旧设置页入口的四个 scripts/verify-*.mjs 实机脚本(其断言仍描述 StackedBar 与三列卡片布局,仓库中已无任何引用),以及 StackedBar 时代遗留的五个 data-bar-row 属性。CI 两处补强:test 工作流增加 typecheck 步骤(此前 tsconfig.build.json 只覆盖 src,测试文件的类型错误不会导致构建失败);Gitee 镜像同步对分支也加 --force 并按 ref 收敛并发组(镜像只读、覆盖即目的,与标签同因;被取代的运行会被取消,不再与最新运行赛跑)。

文档:README 双语版、docs/design.md(注册面、数据流图、热力图窗口、环形图描述)与所有示意图/横幅/演示动画同步到新形态——演示动画改由 scripts/make-demo-svg.mjs 单一来源生成中英两版;插件市场截图(assets/screenshots/)与四张横幅 SVG 换为环形图设计。

验证

  • 本地:tsc --noEmit 通过;pnpm test 24 个文件 246 个用例全绿(相对 0.2.3 的 253 例,增删相抵:新增 donut/heatmap-geometry/registration 三份规格与主面板挂载渲染,移除 bar/settings-nav-icon/sidebar-entry 三份规格)。registration.spec 额外钉住 BUNDLE_NAME 必须等于包名(改名会让插件页面板静默卸载)与侧栏行的 order/locale/label。
  • 实机(隔离 DSH_HOME,宿主 0.1.6-alpha.2,本地 tgz 装入 profile web):插件页面板与主面板行渲染一致、两个环形图正常,jsdom 看不见的布局(单行卡片、四档视口下的环形直径、环/列表居中、宽图填满容器)经实机核验;装 dsh-context 复核页脚行——该行现只留 dsh-context 入口、足宽 260px,新侧栏行实测 252px。
  • CI:push 到 main 与本次 tag 均跑 test 工作流(Node 22 + pnpm install --frozen-lockfile + typecheck),锁文件与 package.json 一致、换机器可复现。

已知事项

  • 实机核验基于夹具(假 provider + 静态历史日志,零模型调用);真实会话下底部信息栏与面板的并发表现不在本轮实机核验范围内。
  • 宿主 0.1.6-alpha.2 是预发布版本。若遇面板异常,0.2.3 + 宿主 0.1.6-alpha.2 之外,0.2.2 + 0.1.6-alpha.1、0.2.1 + 0.1.5-rc.2 也是已知可用的组合。

升级须知

  • 所有宿主版本用户:usage_history 域版本仍为 1,无需 reset,历史数据与回扫游标均不受影响。
  • 开关变化一处:侧栏「显示快捷入口」开关随入口常驻而移除,无替代开关。
  • dsh.plugin.json 的 engines.dsh 保持 >=0.1.2-rc.1,与 peer 的能力下界一致。
  • 插件版本号升至 0.3.0。

English · v0.3.0 Release Notes

This release is a full reshuffle of the panel: it moves off the Settings dialog onto the Plugins page with that page's full content column (#2), then gains its own main-panel row as a permanent entry point; the model and provider share charts return to donuts. The host adaptation surface is unchanged, collection and storage contracts are untouched, and the usage_history domain needs no reset.

Moving onto the Plugins page, with the full content column (#2): a Settings tab was too narrow for the share charts, so the model and provider breakdowns had been downgraded from donuts to columns. This release registers the panel as the bundle's own configuration page through the plugins.bundle.config slot (keyed by the package name), rendered directly on the Plugins page with its 960px content column and the whole centre-column height.

  • The Settings section is retired, along with the settings nav-icon injection it needed (settings-nav-icon); the sidebar quick entry stays and now opens the panel's own page.
  • The model and provider sections return to responsive donuts: the diameter is solved from the measured row (200–280px) and centred against the ranked list beside it; StackedBar and its collapsed-height measure go away.
  • The six metric cards lay out on one row, the two long-valued cards (total tokens, top model) on wider end tracks, with the top model moved last.
  • The heatmap window widens from 26 to 52 weeks and its geometry solver is rewritten: it spends spare width on more weeks before growing the cells and fills the container exactly in both branches; the old solver overflowed by up to 23px around a 900px row and left nearly a cell of dead space when it trimmed.
  • The sidebar entry no longer opts out of flex shrinking, which used to starve every neighbour registered in the shared footer row.

A main-panel row of its own (follow-up to #2): the quick entry rode sidebar.footer.action, a single flex row shared with every other plugin's footer action; dropping flex: none only stopped the starving — add a third plugin and each entry gets roughly 85px, less than a label like "usage statistics" needs. The entry is now a panel row under New Session, beside the shipped global panels — a seat no other plugin shares. That needs a main panel for the row to select, so the panel renders in two places from one component: the Plugins page (unchanged) and a standalone main panel capped to the same 960px column, so both entries look identical. Registration: main and sidebar.panellist under the id usage-stats; sidebar.footer.action is no longer registered. The quick-entry preference, its state module and the SidebarEntry component are removed — a panel row is always present, like the shipped ones, so the switch had nothing left to control.

Host and storage untouched: the host adaptation surface still targets 0.1.6-alpha.2 (the verified-host list is unchanged); this release's changes are all in the client rendering and registration layers. The usage_history domain stays at version 1, and collection and backfill paths are unaffected. dsh.client.inject no longer declares @deepseek-ai/dsh-client-ui-settings (nothing imports it since the Settings section retired); context-types.ts drops the two service mirrors with no consumer in the whole repository (UsageSettingsService/ctx.settings, UsageConnection/ctx.connection), gains the key field on UsageSlotEntrySpec that the Plugins page matches by, and adds the UsagePluginConfigOwnerProps mirror.

Cleanup: dead code found in the release review is removed — the four scripts/verify-*.mjs live-instance scripts that drove the retired Settings entry (their assertions still described the StackedBar and three-column layouts; nothing in the repository referenced them) and the five data-bar-row attributes left from the StackedBar era. Two CI hardenings: the test workflow gains a typecheck step (previously tsconfig.build.json covered only src, so type errors in test files could not fail the build), and the Gitee mirror sync force-pushes branches too and pins one concurrency group per ref (the mirror is read-only, overwriting is the point — same reason tags got --force; a superseded run is cancelled instead of racing the newer one).

Docs: both READMEs, docs/design.md (registration, data-flow diagram, heatmap window, donut description) and every preview image / banner / demo animation now match the new shape — the demo is generated from a single source (scripts/make-demo-svg.mjs) into the two language versions; the plugin-market screenshots (assets/screenshots/) and all four banner SVGs carry the donut design.

Verification

  • Local: tsc --noEmit passes; pnpm test runs 24 files / 246 tests, all green (down from 253 in 0.2.3 on net: donut, heatmap-geometry and registration specs plus a main-panel mount render arrive, while the bar, settings-nav-icon and sidebar-entry specs go). registration.spec also pins that BUNDLE_NAME must equal the package name (a rename would silently unmount the Plugins-page panel) and the sidebar row's order/locale/label.
  • Live instance (isolated DSH_HOME, host 0.1.6-alpha.2, local tarball installed into profile web): the Plugins-page panel and the main-panel row render identically with both donuts, and the layout jsdom cannot see was verified live — one card row, donut diameters across four viewport widths, ring/list centring, and both wide charts filling their container; with dsh-context installed the footer row now holds dsh-context's entry alone at its full 260px, and the new sidebar row measures 252px.
  • CI: both the main push and this tag run the test workflow (Node 22 + pnpm install --frozen-lockfile + typecheck), so the lockfile matches package.json and a fresh machine reproduces it.

Known items

  • The live check ran on fixtures (a fake provider plus static history, zero model calls); concurrent behaviours of the composer row and the panel under real sessions are outside this round's live verification.
  • Host 0.1.6-alpha.2 is a pre-release. If the panel misbehaves, besides 0.2.3 with host 0.1.6-alpha.2, 0.2.2 with 0.1.6-alpha.1 and 0.2.1 with 0.1.5-rc.2 are known-good combinations.

Upgrade notes

  • All host versions: the usage_history domain stays at version 1 — no reset needed; historical data and the backfill cursor are untouched.
  • One switch change: the sidebar "show quick entry" switch is removed along with the entry becoming permanent; there is no replacement.
  • dsh.plugin.json's engines.dsh stays >=0.1.2-rc.1, matching the peer capability floor.
  • The plugin version is now 0.3.0.

Full Changelog: v0.2.3...v0.3.0

v0.2.3

Choose a tag to compare

@github-actions github-actions released this 18 Sep 18:16

v0.2.3 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.2.3 更新说明

本版本适配 DeepSeek Harness 0.1.6-alpha.2,并修掉底部信息栏行在该宿主上的布局错位——其中包含实例核验中发现并修正的一处探测缺陷。

适配 0.1.6-alpha.2(逐项核验):宿主半零改动。host/webserver、session/session-persistence、storage/storage-domain、settings/settings 四个包的 src 零变更(只有 package.json 版本号),因此 webServer.register、list/open/分页 read/close/inheritedEventCount、open/defineDomain/domainTable、settings 命名空间全部原样;SESSION_FORMAT_VERSION 仍为 3,回扫路径不受影响;core/session 只新增 workspace/changes 事件类型(未知类型本就被回扫忽略)。采集口径不受影响:llm/src/types.ts 仅新增 inputModalities,TokenUsage/StreamChunk 未变,llm-deepseek、llm-pi-ai 的改动与 usage 上报无关。客户端面均为增量:ui-slots 新增 Factory 体系(SlotFactoryMap/registerFactory),但 register/inject 语义、优先级"最低者渲染"与 list 槽的 order 排序未变;ui-primitives 新增 Checkbox/SiteGlyph/两个图标,本插件 value 导入的六个导出(Button/Input/两个图标/两个 hook)仍在;ui-sidebar 新增 sidebar.toggle.badge,sidebar.footer.action 未变;ui-settings、locale 仅版本号。本轮唯一的破坏性变更 conversation.chat.turnTail 由 chain 改 list,以及 LinkIcon 新增 href,本插件都不消费。装载链路:client/modules 重写了 entry 生命周期(entries.start + applyIndexInjections),但 bundle 注册契约不变(window.__ModuleLoader__.load({id, factory})、id = 包名、dsh.client.{platform,inject} 校验未变,仅新增可选 chunk 字段),PLATFORM_MODULES 与 PRELOADED_CLIENT_EXTERNALS 也未变,故本包双通道产物与 cordis.patch.yml 的双挂载守卫继续有效。

底部信息栏行的双容器契约(本版本唯一的实质改动):0.1.6-alpha.2 把 conversation.composer.dock 渲染进 InputBar 新的 flex .dock(与常驻 ContextMeter 并排:居中、gap:12px、padding-top:4px),并把这一行原先自持的内容宽度、左右侧边距(clearance + 16px)与 4px 顶距移交该容器——官方 StatsPills.module.css 同步删掉了那四条声明;0.1.6-alpha.1 及以前,槽位仍直接渲染进 InputBar 自己的列,这一行仍自持上述三者。本版本让同一份构建同时满足两条宿主线:行在 DOM 挂载时探测自己落进的是不是 flex 行容器,并据此打 data-dock-row 标记,样式表按标记在两套声明间切换;探测失败时退回旧契约(安全方向)。

实例核验中发现并修正的缺陷:首轮实机(宿主 0.1.6-alpha.2)里这一行仍按旧契约渲染(实测 max-width 780.8px、padding 4px 32px、行高 26px),根因是 slot 渲染器在行外还包了一层 display: contents 元素——parentElement 并不是 InputBar 的 .dock,display 读取到的是这个无盒包装层,探测天然失效。修正为向上跳过 contents 包装层、取第一个真正参与布局的祖先再判断轴方向(深度有界)。

测试基础设施:ui-primitives@0.1.6-alpha.2 的 lib/index.js 新增运行时裸导入 simple-icons(LinkIcon 的站点标记)。本插件的 client 组件测试通过 vitest inline 该包、会强制解析它的裸导入(此前已镜像 anser、shiki、katex、diff、micromark-、mdast-),故补 simple-icons 为开发依赖;与发布产物无关(ui-primitives 在浏览器里是平台外部模块)。

文档:README 的兼容性段改为"开发依赖与核验目标对齐宿主 0.1.6-alpha.2,已在 0.1.2-rc.1、0.1.5-rc.2、0.1.6-alpha.1、0.1.6-alpha.2 上核验",并补充底部信息栏行的双布局说明;docs/design.md 新增"底部信息栏接管"小节,记录两代 dock 契约。

验证

  • 本地:tsc --noEmit 通过;pnpm test 24 个文件 253 个用例全绿(相对 0.2.2 的 248 例,新增 5 例集中在 tests/stats-line.spec.tsx 的容器契约断言:flex row / flex column / 普通 block / contents 包装 / 全 contents 链)。
  • 实机(隔离 DSH_HOME,dsh -V = 0.1.6-alpha.2,本地 tgz 装入 profile web,夹具为假 provider + 静态历史日志,零模型调用):宿主半 /usage/api/status 报 total 13 / done 13 / recordFailures 0,/usage/api/range 7 天为 tokens 129025 / requests 11 / cacheHit 118400 / activeDays 5,按天 byModel/byProvider 正确;客户端半底部信息栏行文本 2 轮 · 2 步 · 55 tok/s + 41K tok · 缓存命中 97%,DOM 实测该行落在 display:flex; flex-direction:row; gap:12px; padding-top:4px 的容器内(容器高 26px、行高 22px),行自身 max-width:100%、padding:0、data-dock-row 为真;设置页「使用统计」汇总卡片(184,380 tok / 20 会话 / 93.4% 命中 / 活跃 11 天)、活跃热力图、按天 Token 趋势与模型/供应商拆分全部渲染,控制台零错误。
  • CI:push 到 main 与本次 tag 均跑 test 工作流(Node 22 + pnpm install --frozen-lockfile),锁文件与 package.json 一致、换机器可复现。

已知事项

  • 两项未实测:ContextMeter(宿主上下文占用环)与容器并排的实际形态——夹具实例的假 provider 不提供上下文容量,13 个会话逐一打开均不渲染该环;0.1.6-alpha.1 及以前的宿主回归也未在旧宿主上跑过(旧契约分支按该版本官方 StatsPills.module.css 原样复原)。本机没有触发这两者的环境。
  • 容器契约靠运行时读取祖先计算样式判定:宿主若再次更换容器,探测失败会单向退回旧契约(表现为多 4px 顶距与侧边距),不会导致功能失效。
  • 宿主 0.1.6-alpha.2 是预发布版本。若遇面板异常,0.2.2 + 宿主 0.1.6-alpha.1、或 0.2.1 + 宿主 0.1.5-rc.2 是已知可用的组合。

升级须知

  • 所有宿主版本用户:usage_history 域版本仍为 1,无需 reset,历史数据与回扫游标均不受影响。
  • 没有新增或删除开关。唯一的用户可见变化:在 0.1.6-alpha.2 上,底部信息栏行恢复"与输入卡内容宽度对齐、间距正确"的形态(0.2.2 在该宿主上因双重容器职责而多出内缩与顶距)。
  • dsh.plugin.json 的 engines.dsh 保持 >=0.1.2-rc.1,与 peer 的能力下界一致。
  • 插件版本号升至 0.2.3。

English · v0.2.3 Release Notes

This release adapts the plugin to DeepSeek Harness 0.1.6-alpha.2 and fixes the composer stats row's misalignment on that host — including one probe defect the live instance check uncovered and this release corrects.

Adapting to 0.1.6-alpha.2 (item by item): the host half needs no change. host/webserver, session/session-persistence, storage/storage-domain and settings/settings have zero src changes (only a package.json version bump), so webServer.register, list/open/paged read/close/inheritedEventCount, open/defineDomain/domainTable and the settings namespace are all unchanged; SESSION_FORMAT_VERSION stays at 3, so the backfill is unaffected; core/session only adds the workspace/changes event type (unknown types were always skipped by the backfill). Collection is unaffected too: llm/src/types.ts only gains inputModalities, TokenUsage/StreamChunk are unchanged, and the llm-deepseek / llm-pi-ai edits do not touch usage reporting. Every client-side change is additive: ui-slots gains the Factory layer (SlotFactoryMap/registerFactory) while register/inject, priority order ("lowest renders") and list order sorting are unchanged; ui-primitives gains Checkbox/SiteGlyph/two icons while the six exports this plugin value-imports (Button/Input/two icons/two hooks) remain; ui-sidebar gains sidebar.toggle.badge while sidebar.footer.action is unchanged; ui-settings and locale only bump versions. The one breaking change this round — conversation.chat.turnTail moving from chain to list — plus LinkIcon's new href, are both surfaces this plugin never uses. Loading path: client/modules rewrote entry lifecycle management (entries.start + applyIndexInjections), but the bundle registration contract is unchanged (window.__ModuleLoader__.load({id, factory}), package name as the id, the same dsh.client.{platform,inject} validation, one new optional chunk field), and PLATFORM_MODULES / PRELOADED_CLIENT_EXTERNALS are untouched, so both bundle channels and the cordis.patch.yml double-mount guard still hold.

The composer row's dual container contract (the only substantive change): 0.1.6-alpha.2 renders conversation.composer.dock inside InputBar's new flex .dock (beside the resident ContextMeter: centred, gap:12px, padding-top:4px) and moved the row's own content width, side gutters (clearance + 16px) and 4px top pad onto that container — the official StatsPills.module.css dropped the same four declarations. Through 0.1.6-alpha.1 the slot still renders straight into InputBar's own column and the row still owns all three. This release serves both host lines from one build: at DOM attach the row probes whether the container it landed in is a flex row and marks itself accordingly (data-dock-row), and the stylesheet switches between the two contracts on that marker, falling back to the older contract when the probe cannot decide (the safe direction).

The defect the live check found: on the first run against a real 0.1.6-alpha.2 instance the row still rendered the column contract (measured: max-width 780.8px, padding 4px 32px, height 26px). The slot renderer wraps every entry in a display: contents element, so parentElement was that boxless wrapper rather than InputBar's .dock, and the probe could never see the flex row. It now walks up past display: contents wrappers (bounded depth) to the first ancestor that actually participates in layout.

Test infrastructure: ui-primitives@0.1.6-alpha.2's lib/index.js gained a runtime bare import of simple-icons (LinkIcon's site marks). This plugin's client component tests inline that package through vitest and must therefore resolve its bare imports (anser, shiki, katex, diff, micromark-, mdast- were already mirrored), so simple-icons joins the devDependencies. Unrelated to the shipped artifact: ui-primitives is a platform external in the browser.

Docs: the README's compatibility section now states that the dev-dependency line and the verification target track host 0.1.6-alpha.2 (verified against 0.1.2-rc.1, 0.1.5-rc.2, 0.1.6-alpha.1 and 0.1.6-alpha.2) and spells out the composer row's two layouts; docs/design.md gains a "StatsLineEnhanced — bottom-bar takeover" section recording both dock contracts.

Verification

  • Local: tsc --noEmit passes; pnpm test runs 24 files / 253 tests, all green (up from 248 in 0.2.2; the five new cases in tests/stats-line.spec.tsx pin the container contract: flex row / flex column / plain block / contents wrapper / an all-contents chain).
  • Live instance (isolated DSH_HOME, dsh -V = 0.1.6-alpha.2, local tarball installed into profile web, fixture built from a fake provider plus static history, zero model calls): the host half reports total 13 / done 13 / recordFailures 0 from /usage/api/status, and /usage/api/range reports tokens 129025 / requests 11 / cacheHit 118400 / activeDays 5 for 7 days with correct per-day byModel/byProvider; the composer row reads 2 轮 · 2 步 · 55 tok/s + 41K tok · 缓存命中 97%, and the DOM shows it inside a display:flex; flex-direction:row; gap:12px; padding-top:4px container (container 26px tall, row 22px) with the row itself at max-width:100%, padding:0 and data-dock-row true; the Settings "Usage statistics" section renders its summary cards (184,380 tok / 20 sessions / 93.4% hit / 11 active days), the activity heatmap, the daily token trend and the model/provider breakdowns, with zero console errors.
  • CI: both the main push and this tag run the test workflow (Node 22 + pnpm install --frozen-lockfile), so the lockfile matches package.json and a fresh machine reproduces it.

Known ite...

Read more

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 15 Sep 06:01

v0.2.2 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.2.2 更新说明

本版本包含两部分:适配 DeepSeek Harness 0.1.6-alpha.1,以及流式吞吐读数按"窗口内实际观测到的增量"重做(0.2.1 已知事项里那条未定位的抖动问题)。

适配 0.1.6-alpha.1(逐项核验):rc.2 到 0.1.6-alpha.1 之间是 3942 个文件的变更,落到本插件的依赖面上无需任何插件逻辑改动。host 面:host/webserver、session-persistence、storage-domain 三个包的 src 零变更(webServer.register、list/open/分页 read/close/inheritedEventCount、open/defineDomain/domainTable 全部原样);core/session 只新增 registerMessageProjection,并把 snapshotEvents/eventAt/ownEvents 标记弃用——本插件读取会话用的是事件流与 requestContext(),不碰这三个;SESSION_FORMAT_VERSION 仍为 3,回扫路径不受影响。client 面:本轮唯一破坏性重命名是 AssistantProvenanceView → AssistantProviderMetadataView(AssistantMessageNode.provenance → providerMetadata),本插件不读该字段;插件消费的 conversation.composer.dock 槽位声明、ui-chat 的 legacy.nodes/legacy.partial 兼容投影、sessionStats/tokenUsage 两个 projection、settings 与 sidebar 两个槽位、以及 ui-primitives 的六个 value 导入(Button/Input/两个图标/两个 hook)均未变。新增的 image/offload 事件及其 message projection 机制对本插件无影响——回扫是自读原始事件,不经过 foldSurface,遇到该事件会跳过。装载链路:vendor/loader 的 entry 实现被重写(197 行),但 insert 语义、disabled getter 与 !!js 求值(with(ctx) + ctx.loader.entries())都保留,本包 cordis.patch.yml 的双挂载守卫继续有效。依赖对齐:15 个 @deepseek-ai/dsh-* 开发依赖由 0.1.5-rc.2 移到 0.1.6-alpha.1,release-age 豁免放行 0.1.6-alpha.1,lockfile 重新解析后 0.1.2 线依赖保持不动。

peer 声明回归"能力下界"语义:@deepseek-ai/* 的 peer 范围(>=0.1.2-rc.1)保留为插件用到的最早接口面,但全部标记 optional。原因是 semver 的预发布匹配规则:>=0.1.2-rc.1 对 0.1.5-rc.2 与 0.1.6-alpha.1 都判不满足(satisfies 实测为 false),因为范围里没有与候选版本 [major,minor,patch] 相同的预发布比较器。这条声明既拦不住错误版本,又可能在未来的严格 peer 校验下误伤安装,所以实际支持的宿主版本改由 README 的兼容性段说明。

测试基础设施:ui-primitives@0.1.6-alpha.1 的 lib/index.js 新增运行时裸导入 diff(DiffBlock 的 structuredPatch)。本插件的 client 组件测试通过 vitest inline 该包、会强制解析它的裸导入(此前已镜像 anser、shiki、katex、micromark-、mdast-),故补 diff 为开发依赖;这与发布产物无关(ui-primitives 在浏览器里是平台外部模块)。

流式吞吐读数重做:0.2.1 的读数取"步骤累计 token ÷ 观测窗口",窗口从 UI 首次看到该步骤开始且只增不减。UI 迟发(流更新按动画帧发布,后台标签页会暂停发布而流继续跑)时,一整批积压被计入极短跨度,读过 2500 tok/s 并在此后随分母增长一路衰减。现在分子改为窗口内实际观测到的 token 增量,窗口最长 2 秒。

  • 合理性检查先于观测门槛:积压帧若落在观测门槛内会先被门槛放行,其 token 留在窗口里、由下一帧作为速率发布(60 tok/s 的流上实测到 1366 tok/s)。斜率检查现在先跑,并以 50 ms 最小跨度判定,普通开场分片不会被误判为积压。
  • 上限下调到 1500 tok/s:原上限 3000 tok/s 高于真实流能达到的范围。1500 仍高于实测会话的最大斜率(246 ms 内 265 token,约 1080 tok/s),同时能拒绝中段伪值。
  • 忽略不含新信息的帧:重复估算值的帧会把窗口远端前推,使每次节拍和无关重渲染都把读数拉向步骤均值。此类帧不再参与,一步中途静默时读数保持最后一次可测速率,而不是回落到会话平均值。
  • 1 秒时间常数的平滑:提供商发布不均(中位 9 token、p99 77),相邻读数曾在一帧之间跳动四分之一以上。跟随实测校正的重置保留当前读数,不再闪回会话均值。
  • 采样移出渲染路径:采样器只在 observe 改状态、ratePerSecond 只读,行组件在 layout effect 中调用并把结果发布为 state,被 React 丢弃的那次渲染不能再决定下一次提交显示什么。速度槽位即使无数字也渲染,居中行的布局与是否有读数无关。

验证

  • 本地:tsc --noEmit 通过;pnpm build(host ESM + 双 client CJS)成功;24 个测试文件 248 个用例全绿(相对 0.2.1 的 233 例,本次新增与改写集中在 tests/stats-line-core.spec.ts 与 tests/stats-line.spec.tsx)。
  • 关键用例:切换到已在流式的会话时开窗帧持有全部输出必须作为基线(否则 1 秒后读 18036 tok/s)、跨观测门槛的那一帧、吸附后的第一次读数、斜率先于门槛判定、静默步骤保持最后读数、平滑后的相邻读数不跳变,以及一条变异验证过的回归用例——把窗口改回累计商法后该用例读出的正是 2500 tok/s。
  • CI:push 到 main 与 tag 两次都通过 test 工作流,环境为 Node 22 + pnpm install --frozen-lockfile,说明锁文件与 package.json 一致、换机器可复现。
  • 本版本未做实例核验:以上结论来自逐项源码比对、类型检查、单元测试与 CI,没有在真实 0.1.6-alpha.1 宿主上跑过面板,读数重做也未做真机观测(0.2.1 的实机核验是在 0.1.5-rc.2 实例上做的)。未覆盖的运行时面包括:回扫分页读取、session/event 实时派发、/usage/api 的同源信任围栏、底部信息栏三个开关的实际表现。

已知事项

  • 上面那条实测缺口是本版本最需要留意的。宿主 0.1.6-alpha.1 自身是预发布版本,若遇到面板异常,回到 0.2.1 + 宿主 0.1.5-rc.2 是已知可用的组合。
  • 读数重做修复的是四条可达的误读路径并加了平滑,不等于"抖动已被证明消失":真机上的观感仍未核验。
  • ui-primitives 的发布物里 lib/index.js 带 sourceMappingURL 而包内没有 .map 文件,测试期会打印一条 ENOENT;这是 0.1.5-rc.1、0.1.5-rc.2、0.1.6-alpha.1 三版共有的上游发布瑕疵,不影响运行。
  • dsh.plugin.json 的 engines.dsh 保持 >=0.1.2-rc.1,与 peer 的能力下界一致。

升级须知

  • 所有宿主版本用户:usage_history 域版本仍为 1,无需 reset,历史数据与回扫游标均不受影响。
  • 没有新增或删除开关。行为变化只有读数:它现在被平滑、且在一步中途静默时保持读数而不是回落到会话平均值。
  • peer 语义变化:@deepseek-ai/* 现为 optional。这不影响安装,但若你的安装链路此前依赖 peer 硬校验,报错会变成提示。
  • 插件版本号升至 0.2.2。

English · v0.2.2 Release Notes

This release has two parts: adaptation to DeepSeek Harness 0.1.6-alpha.1, and a rework of the live throughput reading around the token growth actually observed inside the window (the unresolved jitter listed under 0.2.1's known items).

Adapting to 0.1.6-alpha.1 (item by item): rc.2 to 0.1.6-alpha.1 spans 3942 files, and no plugin logic changes are needed. Host side: host/webserver, session-persistence and storage-domain have zero src changes (webServer.register, list/open/paged read/close/inheritedEventCount, open/defineDomain/domainTable are all unchanged); core/session only adds registerMessageProjection and deprecates snapshotEvents/eventAt/ownEvents, none of which this plugin reads — it works from the event stream and requestContext(); SESSION_FORMAT_VERSION stays at 3, so the backfill is unaffected. Client side: the one breaking rename is AssistantProvenanceView → AssistantProviderMetadataView (AssistantMessageNode.provenance → providerMetadata), a field this plugin does not read; the conversation.composer.dock declaration it registers into, ui-chat's legacy.nodes/legacy.partial compatibility projection, the sessionStats/tokenUsage projections, the settings and sidebar slots, and the six ui-primitives value imports (Button/Input/two icons/two hooks) are all unchanged. The new image/offload event and its message-projection mechanism do not affect this plugin: the backfill reads raw events and never goes through foldSurface, so such an event is simply skipped. Loading path: vendor/loader's entry implementation was rewritten (197 lines), but insert semantics, the disabled getter and !!js evaluation (with(ctx) + ctx.loader.entries()) all survive, so this package's cordis.patch.yml double-mount guard still works. Dependencies: the 15 @deepseek-ai/dsh-* devDependencies move from 0.1.5-rc.2 to 0.1.6-alpha.1, the release-age exclude list admits 0.1.6-alpha.1, and the re-resolved lockfile leaves the 0.1.2-line dependencies untouched.

Peer declarations return to their "capability floor" meaning: the @deepseek-ai/* peer ranges (>=0.1.2-rc.1) still state the earliest interface surface this plugin uses, but are now all optional. The reason is semver's pre-release rule: >=0.1.2-rc.1 satisfies neither 0.1.5-rc.2 nor 0.1.6-alpha.1 (measured false with satisfies), because the range holds no pre-release comparator sharing the candidate's [major,minor,patch]. Such a declaration blocks no wrong version and could misfire under strict peer validation later, so the supported host versions are documented in the README's compatibility section instead.

Test infrastructure: ui-primitives@0.1.6-alpha.1's lib/index.js gained a runtime bare import of diff (DiffBlock's structuredPatch). This plugin's client component tests inline that package through vitest and must therefore resolve its bare imports (anser, shiki, katex, micromark-, mdast- were already mirrored), so diff joins the devDependencies. This is unrelated to the shipped artifact: ui-primitives is a platform external in the browser.

Live throughput rework: 0.2.1's figure divided the step's cumulative token estimate by a window that opened when the UI first observed the step and never stopped growing. When the UI lags — stream updates publish on animation frames and a backgrounded tab suspends them while the stream keeps running — a batched backlog is charged to a very short span: it read 2500 tok/s in the regression case and then decayed for the rest of the step as the denominator grew. The numerator is now the token growth observed inside the window, and the window spans at most 2 s.

  • The plausibility check runs before the observation floor: a backlog frame landing inside the floor was answered by the floor first, so its tokens stayed in the window and the next frame published them as a rate (1366 tok/s measured on a 60 tok/s stream). The slope check now runs first, judged against a 50 ms minimum span so an ordinary opening chunk is not mistaken for a backlog.
  • The ceiling drops to 1500 tok/s: the previous 3000 tok/s sat above anything a real stream produces. 1500 is still above the steepest slope a measured session produced (265 tokens in 246 ms, about 1080 tok/s) and low enough to reject a mid-range artifact.
  • Frames carrying nothing new are ignored: a frame repeating the estimate pushed the window's far end forward, so every beat and every unrelated re-render sagged the figure toward the step average. Such frames no longer participate, which is also what lets a quiet step hold the last rate it could measure instead of falling back to the session average.
  • Smoothing with a 1 s time constant: providers publish unevenly (median 9 tokens, p99 77), and adjacent readings could jump by a quarter or more between frames. A reset that follows the measured correction keeps the figure instead of flashing the session average.
  • Sampling moves off the render path: the sampler changes state only in observe, ratePerSecond only reads, and the row calls both from a layout effect and publishes the result as state, so a render React discards can no longer decide what the next committed one shows. The speed slot renders even with no figure at all, keeping the centred row's layout independent of whether a number is available.

Verification

  • Local: tsc --noEmit passes; pnpm build (host ESM + dual client CJS) succeeds; all 24 test files / 248 cases green (up from 233 in 0.2.1; the new and rewritten cases live in tests/stats-line-core.spec.ts and tests/stats-line.spec.tsx).
  • Key cases: a switch to an already-streaming session treating the mounting frame's output as its baseline (otherwise 18036 tok/s one second later), the frame that spans the observation floor, the first reading after the attach, the slope check preceding the floo...
Read more

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 13 Sep 07:07

v0.2.1 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.2.1 更新说明

本版本包含两部分:适配 DeepSeek Harness 0.1.5-rc.2,以及会话底部信息栏的流式吞吐速度读数。

适配 0.1.5-rc.2(逐项核验):rc.1→rc.2 之间只有 4 个提交,其中 release(dsh): 0.1.5-rc.2 是 312 个文件的纯版本号替换,唯一的实质改动是 feat(web): backport feedback and file refinements。落到本插件的依赖面上:packages/client/web/src/platform.ts 的 PLATFORM_MODULES 零变更(本包 CLIENT_EXTERNALS 仍是其子集);ui-primitives 唯一实质改动是把 CodeFileIcon 的内联字形拆成 artwork 文件,而该组件既未导出、本插件也未引用(本插件只用到 IconDatabaseOutline16 / IconGaugeOutline16 / Button / Input / useAnchoredPosition);ui-chat 只改了 TurnTailNodeView.module.css 与测试,影子替换对象 StatsPills 的药丸本体未变;ui-message-feedback 与 ui-deliverables 本插件未依赖;会话日志格式无新版本,回扫路径不受影响。这部分无逻辑改动:开发依赖由 0.1.5-rc.1 对齐到 0.1.5-rc.2(15 个包),release-age 豁免补 || 0.1.5-rc.2(21 条,与 lockfile 中升到该线的包一一对应),lockfile 重新解析后零 rc.1 残留、0.1.2 线依赖保持不动。

流式吞吐速度:设置页「使用统计」面板底部新增第三个开关(与既有两个同款样式,默认关闭)。开启后,速度读数在会话底部信息栏随每个流式增量实时刷新为估算值,某一步结束的瞬间交回会话累计的官方精确值。

  • 估算口径:先验采用 DeepSeek 公布的字符密度(1 个中文字符 ≈ 0.6 token、1 个英文字符 ≈ 0.3 token),并对思考内容、正文、工具调用参数一并计价——provider 上报的 outputTokens 包含这三者,只算正文会让工具密集的步骤读数偏低。刻意不沿用宿主自身的四字符/token 启发式:其 README 已注明该启发式会低估 CJK 文本。
  • 本会话校准:用本会话已结算步骤的实测「字符数 ÷ 上报 output token」比率作为修正因子(钳制在 0.5–2),使估算收敛到实际使用的分词器上;本会话尚无结算样本时按原始先验显示。
  • 窗口语义:解码窗口从该步首个可见输出开始(首 token 等待不计入分母,与官方 decodeMs 口径一致),只在步骤切换时重锚。块边界(block-start 清空该索引、block-end 整体替换)与重试都会让估算中途下降,这属于常态,不重置窗口——否则分母塌缩,思考阶段永远过不了观测门槛、正文一开始就窜高。
  • 读数时机:商值在渲染时用同一瞬间的 token 数与时钟计算,因此每个增量都能如实更新而不产生锯齿;1 秒节拍仅用于「模型中途停顿时没有新帧」的兜底。速度数字渲染进一个宽度预留槽位,位数变化不会让居中排列的整行发生重排。
  • 性能:订阅关在独立子组件内,仅在开关打开时挂载。开关关闭时整行完全不在逐帧增量路径上,与官方 StatsPills 的硬性验收("streaming chunk frames 渲染 0 次")保持一致,并有渲染计数测试守着这条性质。

验证

  • 本地:tsc --noEmit 通过;pnpm build(host ESM + 双 client CJS)成功;24 个测试文件 233 个用例全绿(本次新增 22 例:tests/stats-line-core.spec.ts +8、tests/stats-line.spec.tsx +12、tests/stats-line-state.spec.ts +1、tests/stats-line-options.spec.tsx +1)。
  • 关键用例:先验密度按字符类别计价、校准因子的聚合与钳制、观测门槛、首次发布时机、匀速流读数恒定、估算中途下降不重锚窗口、步骤切换重锚窗口、思考与工具调用参数计入、以及一条锯齿契约用例——把时钟换成陈旧的节拍时刻后该用例会读出 108 tok/s(54 tokens ÷ 500ms),经变异验证确实会失败。
  • 真机:在 0.1.5-rc.2 的独立实例(独立 profile、3090 端口,与日常实例同一 $DSH_HOME)上人工核验:/usage/api/status 返回真值、client bundle 含新代码、面板第四个开关出现并可切换、思考与正文阶段均出现读数、步骤结束后回到会话累计值。

已知事项

  • 流式读数在输出过程中仍有可见抖动,根因尚未定位。 已排除的假设:窗口重锚(已修,曾导致思考阶段不显示、正文阶段窜高回落)、陈旧分母(已修,曾导致每秒一次的锯齿)、居中重排(已加宽度预留槽位)、行内基线漂移(曾据此改动药丸内的对齐方式,实测无效后已回退)。剩余怀疑方向是 provider 分批输出导致的真实数值波动,若如此应当用平滑(EMA)处理,而不是继续调整时钟语义。
  • 估算值终究是估算:它与官方值的偏差取决于当前输出风格与已结算样本的接近程度。
  • dsh.plugin.json engines.dsh 保持 >=0.1.2-rc.1,与 peer 一致。

升级须知

  • 所有宿主版本用户:usage_history 域版本仍为 1,无需 reset,历史数据与回扫游标均不受影响。
  • 新开关默认关闭,不开启时底部信息栏行为与 0.2.0 完全一致。
  • peer 范围不变(>=0.1.2-rc.1);插件版本号升至 0.2.1。

English · v0.2.1 Release Notes

This release has two parts: adaptation to DeepSeek Harness 0.1.5-rc.2, and a streaming throughput reading in the conversation bottom bar.

Adapting to 0.1.5-rc.2 (item by item): only four commits separate rc.1 from rc.2. release(dsh): 0.1.5-rc.2 is a pure version bump across 312 files, and the single substantive change is feat(web): backport feedback and file refinements. On this plugin's dependency surface: platform.ts's PLATFORM_MODULES is unchanged (this bundle's CLIENT_EXTERNALS remains its subset); ui-primitives' only real change splits CodeFileIcon's inline artwork into its own module, and that component is neither exported nor used here (this plugin uses only IconDatabaseOutline16 / IconGaugeOutline16 / Button / Input / useAnchoredPosition); ui-chat touches only TurnTailNodeView.module.css and its tests, leaving the shadowed StatsPills body unchanged; ui-message-feedback and ui-deliverables are not dependencies here; the session-log format gains no new version and the backfill is unaffected. No logic changes: devDependencies move from 0.1.5-rc.1 to 0.1.5-rc.2 (15 packages), the release-age exclude list gains || 0.1.5-rc.2 (21 entries, matching the packages the lockfile moved to that line one for one), and the re-resolved lockfile carries no rc.1 leftovers while the 0.1.2-line dependencies stay put.

Streaming throughput: the Settings "Usage statistics" panel gains a third switch below the existing two (same framed style, off by default). With it on, the bottom bar's speed figure refreshes to an estimate on every stream delta and hands back to the session's exact cumulative figure the moment a step settles.

  • How it estimates: the prior is DeepSeek's published character density (≈0.6 token per Chinese character, ≈0.3 per English character), applied to reasoning, answer text and Tool-call arguments alike — the provider's outputTokens covers all three, and pricing only the visible answer would undershoot any tool-heavy step. The harness's own four-characters-per-token heuristic is deliberately not reused: its README documents that it underprices CJK text.
  • Per-session calibration: a correction factor measured from this session's own settled steps (characters per reported output token, clamped to 0.5–2) carries whatever the live tokenizer does differently; before any step has settled, the raw prior is shown.
  • Window semantics: the decode window opens at the step's first visible output (first-token latency stays out of the denominator, matching the official decodeMs) and is re-anchored only when the step changes. Block boundaries (block-start clears the index, block-end swaps the block wholesale) and retries legitimately shrink the estimate mid-step, and that must NOT restart the window — re-anchoring collapses the denominator, which leaves the reasoning phase under the observation floor and spikes the figure the moment the answer starts.
  • When it reads: the quotient is evaluated at render time with the token count and the clock taken from the same instant, so every delta updates it honestly without a sawtooth; a 1s beat only covers a step that has gone quiet mid-answer. The figure renders into a width-reserved slot, so a change in digit count cannot reflow the centred row.
  • Cost: the subscription lives in its own child component, mounted only while the switch is on. With it off the row stays entirely out of the per-frame delta path, preserving the official StatsPills acceptance criterion ("renders ZERO times during streaming chunk frames"), which a render-counting test guards.

Verification

  • Local: tsc --noEmit passes; pnpm build (host ESM + dual client CJS) succeeds; all 24 test files / 233 cases green (22 new: tests/stats-line-core.spec.ts +8, tests/stats-line.spec.tsx +12, tests/stats-line-state.spec.ts +1, tests/stats-line-options.spec.tsx +1).
  • Key cases: per-class density pricing, calibration pooling and clamping, the observation floor, when the first reading lands, a steady stream holding a steady reading, a mid-step dip not re-anchoring the window, a step change re-anchoring it, reasoning and Tool-call arguments counting, and one sawtooth contract case — swapping the clock for a stale beat timestamp makes it read 108 tok/s (54 tokens ÷ 500ms), which was mutation-verified to fail.
  • Real mount: verified by hand on a standalone 0.1.5-rc.2 instance (its own profile, port 3090, sharing the everyday $DSH_HOME): /usage/api/status returns real values, the served client bundle carries the new code, the fourth switch appears and toggles, readings appear during both reasoning and answer phases, and the session figure returns once a step settles.

Known items

  • The live reading still visibly jitters while a step streams, and the root cause is not yet located. Ruled out: window re-anchoring (fixed — it made the reasoning phase show nothing and the answer phase spike), a stale denominator (fixed — it produced a 1Hz sawtooth), centred-row reflow (a width-reserved slot now prevents it), and inline baseline drift (an alignment change was made on that hypothesis, proved ineffective by testing, and reverted). The remaining suspect is genuine numeric variance from providers delivering tokens in batches; if so it wants smoothing (EMA), not further changes to the clock semantics.
  • The estimate is still an estimate: its distance from the official figure depends on how close the current output style is to the settled samples.
  • dsh.plugin.json engines.dsh stays >=0.1.2-rc.1, matching peers.

Upgrade notes

  • All host-version users: the usage_history domain is still version 1 — no reset needed, and neither historical data nor the backfill cursor is affected.
  • The new switch is off by default; with it off the bottom bar behaves exactly as in 0.2.0.
  • Peer range unchanged (>=0.1.2-rc.1); the plugin version moves to 0.2.1.

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 13:55

v0.2.0 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.2.0 更新说明

本版本包含两部分:适配 DeepSeek Harness 0.1.5-rc.1,以及设置页用量面板的图表改版。

适配 0.1.5-rc.1(逐项核验):开发依赖由 0.1.5-alpha.1 对齐到 0.1.5-rc.1。dsh-client-ui-primitives 移除了 DocumentFileIcon(本插件未使用),其构建产物新增了运行时导入(anser / shiki / katex / micromark-* / mdast-*)而包自身把它们声明在 devDependencies,故本包补齐这 12 个包——只有测试图需要它们,发布产物把 ui-primitives 当作平台 external,不会解析。ui-slots、ui-settings(settings.section 槽)零变化;ui-sidebar 新增 sidebar.panellist 槽、sidebar 槽自身改为 slots.inject 注册,本插件注册的 sidebar.footer.action 子槽未变;ui-conversation 的父槽由 conversation 改名为 main.conversation,本插件注册的 conversation.composer.dock 的槽名 / kind / scope 均未变;core/session 新增 deliverables/presented 与 subagent/catalog 事件类型(本插件忽略未知事件);会话日志格式无新版本;官方 StatsPills 仅把弹窗内的缓存写入行改为按需渲染,药丸本体与 id='stats' 影子替换机制不变。回扫路径本就按能力探测(open 优先、inspect 兜底),rc.1 上走 open,签名与语义不变。这部分无逻辑改动。

图表改版:

  • 模型用量由环形图改为堆叠柱状图,首次滚入视野时自基部升起(prefers-reduced-motion 或无 IntersectionObserver 时直接落到终态)
  • 模型着色由前 5 名扩展到前 10 名,新增 5 个配色(含暗色变体)
  • 新增「各供应商用量」区块:按总用量取前 5 名分色(独立色板,供应商不会穿模型色),其余折叠为灰色 Other;悬停柱状图或列表任一侧都会联动高亮另一侧,柱状图悬停提示列出该供应商的全部模型用量
  • 两级展开:供应商行展开该供应商的模型;Other 展开被折叠的供应商(每行带该供应商的模型数),这些行再展开各自的模型。修复了此前 Other 误把被折叠供应商的模型摊平显示的问题
  • 展开不改变柱高:柱状图高度锁定为列表折叠态的行高之和,展开任意行(含二级)都不拉伸图形;列表元素本身可随后挂载 / 替换,高度测量随之重新绑定
  • 可访问性:柱状图是有名字的组、每段是有名字的图像(而不是空承诺的按钮),明细列表键盘可达,展开控件是真正的 button[aria-expanded]

验证

  • 本地:tsc --noEmit 通过;pnpm build(host ESM + 双 client CJS)成功;24 个测试文件 211 个用例全绿(新增 tests/model-section.spec.tsx 3 例、tests/provider-usage.spec.tsx 10 例、tests/bar.spec.tsx 16 例,含「列表后挂载」「列表被替换」两条回归用例,以及一条「观察者重算」阳性对照——后者经变异验证确实会失败)。
  • 真机:在 0.1.5-rc.1 实例上以 Playwright 核验(scripts/verify-models.mjs)。模型区 11 段颜色恰为 --dsw-chart-1..10 + 灰;供应商区 6 段恰为 --dsw-provider-1..5 + 灰;供应商区 13 个展开控件逐个点击后柱高恒定在 307px(模型区 552px 不变);Other 展开出 7 个供应商、供应商展开出它的模型、被折叠供应商再展开出各自的模型,且每一层子行的用量之和等于打开它的那一行。

已知事项

  • 柱高按折叠态计算:展开明细不会让柱状图跟着变高(刻意如此,避免展开把图形拉长)。展开内容很多时,列表会比柱状图长。
  • 展开明细中的行使用父级颜色(供应商行用该供应商的颜色、被折叠供应商及其模型用灰色),以便一眼看出归属。
  • dsh.plugin.json engines.dsh 保持 >=0.1.2-rc.1,与 peer 一致。

升级须知

  • 所有宿主版本用户:usage_history 域版本仍为 1,无需 reset,历史数据与回扫游标均不受影响。
  • 本次是界面改版 + 依赖对齐:底部信息栏增强与侧边栏快捷入口行为不变。
  • peer 范围不变(>=0.1.2-rc.1)。

English · v0.2.0 Release Notes

This release has two parts: adaptation to DeepSeek Harness 0.1.5-rc.1, and a chart rework in the Settings usage panel.

Adapting to 0.1.5-rc.1 (item by item): devDependencies move from 0.1.5-alpha.1 to 0.1.5-rc.1. dsh-client-ui-primitives drops DocumentFileIcon (unused here) and its build now carries runtime imports (anser / shiki / katex / micromark-* / mdast-*) that the package itself declares as devDependencies, so this package lists those twelve to satisfy the test graph only — the shipped bundle treats ui-primitives as a platform external and never resolves them. ui-slots and ui-settings (the settings.section slot) are unchanged; ui-sidebar adds a sidebar.panellist slot and registers its own slot through slots.inject, while the sidebar.footer.action child slot this plugin registers is unchanged; ui-conversation renames its parent slot from conversation to main.conversation, while the conversation.composer.dock slot this plugin registers keeps its name, kind and scope; core/session adds the deliverables/presented and subagent/catalog event types (this plugin ignores unknown events); the session-log format gains no new version; the official StatsPills only makes its cache-write dialog row conditional — the pills themselves and the id='stats' shadowing mechanism are unchanged. The backfill already probes capabilities (open first, inspect as fallback) and takes the open path on rc.1 with unchanged signatures and semantics. No logic changes in that part.

Chart rework:

  • Model usage becomes a stacked column instead of a donut, rising from its base the first time it scrolls into view (it jumps to the final state under prefers-reduced-motion or without IntersectionObserver).
  • Model colours extend from the top 5 to the top 10, with five new colours (light and dark variants).
  • New "Provider usage" section: the top five providers by total tokens get their own colour series (a separate palette — a provider never wears a model's hue) and the rest fold into a gray Other bucket. Hovering the bar or the list lights the other side, and the bar's hover tip lists every model that provider served.
  • Two-level expansion: a provider row opens the models it served; the Other bucket opens the providers it folded (each row carrying its own model count), and those rows open their models in turn. This fixes Other previously flattening those providers' models into one list.
  • Expanding never moves the column: the column's height is pinned to the COLLAPSED height of the list beside it, so opening any row — including one two levels in — cannot stretch the chart. The measurement re-binds when the list element itself appears or is replaced.
  • Accessibility: the column is a named group and every segment a named image (not a button with nothing to activate), the detail list is keyboard reachable, and each twisty is a real button with aria-expanded.

Verification

  • Local: tsc --noEmit passes; pnpm build (host ESM + dual client CJS) succeeds; all 24 test files / 211 cases green (new: 3 cases in tests/model-section.spec.tsx, 10 in tests/provider-usage.spec.tsx, 16 in tests/bar.spec.tsx, including regressions for a list that mounts later or is replaced, and a positive control for the observer recompute that was mutation-verified to fail).
  • Real mount: verified with Playwright against a host running 0.1.5-rc.1 (scripts/verify-models.mjs). The model section's eleven segments are exactly --dsw-chart-1..10 plus gray; the provider section's six are exactly --dsw-provider-1..5 plus gray; clicking all thirteen twisties in the provider section leaves the column at 307px (the model column holds at 552px); Other opens seven providers, a provider opens its models, and a folded provider opens its own — each level's rows adding up to the tokens of the row that opened it.

Known items

  • The column is sized to the COLLAPSED list, so opening a detail list does not make the chart taller (deliberate: expansion must not stretch the graphic). With many rows the list grows taller than the column.
  • Detail rows wear their parent's colour (a provider's models use that provider's hue; the folded providers and their models are gray) so ownership reads at a glance.
  • dsh.plugin.json engines.dsh stays >=0.1.2-rc.1, matching peers.

Upgrade notes

  • All host-version users: the usage_history domain is still version 1 — no reset needed, and neither historical data nor the backfill cursor is affected.
  • This is a UI rework plus a dependency alignment: the bottom-bar enhancements and the sidebar quick entry behave as before.
  • Peer range unchanged (>=0.1.2-rc.1).

Full Changelog: v0.1.12...v0.2.0

v0.1.12

Choose a tag to compare

@github-actions github-actions released this 09 Sep 06:47

v0.1.12 Release Notes

中文说明在前,English notes below / Chinese first, then English.

中文 · v0.1.12 更新说明

本版本适配 DeepSeek Harness 0.1.5-alpha.1(会话日志 V3,SESSION_FORMAT_VERSION 3)。逐项核验结论:宿主 loader/bundles/webServer/storageDomain 零变更;回扫走 open 路径的签名与语义不变(inspect 在新版宿主已彻底移除,本插件的回退分支仅对 0.1.2-rc.1 保留);assistant/message 的用量口径、request/context 路由、session/event、inheritedEventCount 均不变,V3 新增的 system/message / assistant/attempt / stream / surfaceOp / systemPromptUpdate 一律忽略;三个 client 槽位、locale、primitives、PLATFORM_MODULES(只新增 dockkit,本插件 externals 仍是其子集)均兼容;底部信息栏 id='stats' 影子替换机制(最低优先级渲染)与 useChat / useProjection 座子在新版官方 StatsPills 下原样成立。无逻辑改动,只有注释同步。peer 范围不变(>=0.1.2-rc.1),存储格式未变,无需 reset。

验证

  • 本地:tsc --noEmit 在 0.1.5-alpha.1 头文件下通过;21 个测试文件 180 个用例全绿(含新增 tests/collector-v3.spec.ts 3 例:V3 专有事件忽略、无 inspect 回扫、stream/surfaceOp/systemPromptUpdate 忽略);pnpm build(host ESM + 双 client CJS)成功。
  • 真机:未做(按需求跳过)。

已知事项

  • 官方底部条带已换成两颗图标药丸(StatsPills)+ 点击弹窗;本插件已跟随重做(双药丸 + 互斥弹窗,双开关 off 时与官方同构;cachePrecision on 时命中率两位小数,tokenDetail on 时用量弹窗多一行未命中缓存),见 tests/stats-line.spec.tsx 9 例。
  • dsh.plugin.json engines.dsh 保持 >=0.1.2-rc.1,与 peer 一致。

升级须知

  • 所有宿主版本用户:行为零变化,可跟随升级。

English · v0.1.12 Release Notes

This release adapts to DeepSeek Harness 0.1.5-alpha.1 (session-log V3, SESSION_FORMAT_VERSION 3). Item-by-item verdict: host loader/bundles/webServer/storageDomain unchanged; the open-path backfill signatures and semantics are unchanged (inspect is gone upstream; this plugin keeps the fallback for 0.1.2-rc.1 only); assistant/message usage accounting, request/context routing, session/event and inheritedEventCount are unchanged, and everything V3 adds (system/message, assistant/attempt, stream, surfaceOp, systemPromptUpdate) is ignored; the three client slots, locale, primitives and PLATFORM_MODULES (only additive dockkit) are compatible; the bottom-bar id='stats' shadowing (lowest priority renders) and the useChat/useProjection seats hold under the new official StatsPills. No logic changes, comments only. Peer range unchanged (>=0.1.2-rc.1); no storage change, no reset needed.

Verification

  • Local: tsc --noEmit passes against 0.1.5-alpha.1 headers; all 21 test files / 180 tests green (including the 3 new tests/collector-v3.spec.ts cases); pnpm build (host ESM + dual client CJS) succeeds.
  • Real mount: skipped per request.

Known items

  • The official bottom strip is now two icon pills (StatsPills) with click-open dialogs; this plugin follows the same pills (identical with both toggles off; cachePrecision renders two decimals, tokenDetail adds the miss row to the usage dialog), covered by 9 tests/stats-line.spec.tsx cases.
  • dsh.plugin.json engines.dsh stays >=0.1.2-rc.1, matching peers.

Upgrade notes

  • All host-version users: zero behavior change — safe to follow.

Full Changelog: v0.1.11...v0.1.12