Skip to content

v0.5.2

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 05 Jun 15:03
· 21 commits to main since this release

Changes

  • fix(termW): Use process.stdout.columns directly when available (no -4 margin). The Pi compositor already provides the exact content width, so the safety margin was double-shrinking the render area.
  • feat(tool metrics): New wrapExecuteWithMetrics wrapper measures elapsed time + output character count for every tool. renderToolMetrics displays a · 3.2s · 14.2k chars footer in all renderers.
  • feat(generic renderer): pi.registerTool wrapper injects renderResult/renderCall on tools without custom renderers — shows text content with preview truncation (80 lines), metrics, and error handling.
  • refactor: 6 tool execute functions refactored to wrapExecuteWithMetrics(() => ...) for transparent metrics.
  • fix: Stabilize render width in async callbacks — capture width at invocation time to prevent drift.
  • test: Align bash truncation test widths (80→84, 20→24) with new termW() logic.