Skip to content

v0.1.3 — Live-refreshing sidebar metrics

Choose a tag to compare

@youngxhui youngxhui released this 22 Sep 15:07
· 1 commit to main since this release

Fixed

  • Sidebar metrics no longer freeze at their first snapshot. The plugin was compiled with tsc, whose React-style JSX transform evaluates expressions once at component creation, so the sidebar showed - and never updated. The build now precompiles with babel-preset-solid — the same transform the OpenCode host applies to its own TUI — so JSX compiles into reactive insert accessors and Speed / Cache / TTFT update live as the session runs.
  • New windows now load the metrics block immediately instead of requiring a plugin panel reload (explicit sync on mount + refresh on 19 session events).

Changed

  • tsc is now typecheck-only (noEmit); npm run build uses the babel pipeline (build.mjs, moduleName: @opentui/solid, generate: universal).
  • Removed diagnostic logging and debug rows.

修复

  • 侧边栏指标不再冻结在首次快照:此前用 tsc 编译,其 React 风格 JSX 转换会在组件创建时一次性求值表达式,导致三行指标永远显示 - 且不刷新。现改用与 OpenCode 宿主完全相同的 babel-preset-solid 预编译,JSX 编译为响应式 insert accessor,Speed / Cache / TTFT 随会话实时更新。
  • 新窗口打开即加载指标块,不再需要重开 plugin 面板。

变更

  • tsc 仅做类型检查(noEmit);npm run build 使用 babel 管道(build.mjs)。
  • 移除诊断日志与调试行。

Install / 安装

opencode plugin add opencode-sidebar-token-metrics