Skip to content

Releases: MasuRii/pi-tool-display

pi-tool-display v0.4.1

27 May 00:34

Choose a tag to compare

Added

  • Reload-safe extension lifecycle: src/disposable.ts cleanup registry that disposes all tool overrides, prototype patches, timers, and event handlers on session_shutdown(reason: "reload"), preventing orphaned pi-mono default rendering after /reload.
  • Comprehensive test suite with 15 new test files covering reload behavior, bash display, MCP overrides, ANSI utilities, diff renderer edge cases, user message boxes, thinking labels, render utilities, and integration tests (696 total tests, up from 68).

Fixed

  • Bash display now respects shellPath and commandPrefix from settings.json when present (#21).
  • Bash spinner timer reworked to use toolCallId-keyed Map instead of __piToolDisplayBashSpinner, with interval reduced from 80ms to 200ms, defensive invalidate() check, and all timers registered in the cleanup registry (#19).
  • Bash override registration is now deferred (like read/grep/edit) and uses before_agent_start to discover ownership via pi.getAllTools() before overriding, preventing conflicts with other extensions (#17). Thanks to @iwinux for reporting.
  • pi.registerTool is now intercepted to decorate MCP tools as they register, eliminating a race condition where session_start/before_agent_start fire before pi-mcp-adapter finishes registering tools (#15, #18). Thanks to @dashanlkk for reporting and opening PR #18.
  • isMcpToolCandidate() heuristics expanded to match mcp, mcp_*, *_mcp, names containing server: or starting with ctx_, and parameter schemas containing mcpServer, serverUrl, or server_name, catching many MCP servers that were previously false negatives.
  • stripBackgroundSgrParams() now correctly preserves foreground RGB sequences like 38;2;12;49;200m instead of misinterpreting color component 49 as a background reset (#8, #3). Thanks to @michaelrommel for the patch and @w-winter for reporting.
  • patchUserMessageRenderPrototype now restores stale patches from prior extension instances before re-patching, and registerNativeUserMessageBox has a duplicate-prevention guard with session_shutdown restoration (#10). OSC 133 stripping is now scoped to prompt-control sequences only; OSC 8 hyperlinks are preserved. Thanks to @w-winter for reporting.
  • Thinking label duplicate-prevention guard prevents re-registering event handlers across reloads; session_shutdown(reason: "reload") resets the guard so re-registration works after reload; recursive nested-array handling added for malformed thinking content (#2). Thanks to @agustif for PR #2.
  • registerDeferredBuiltInToolOverrides() is now also called on session_start (not just before_agent_start), fixing a reload bug where read/grep/edit/bash tools fell back to default pi-mono rendering.

pi-tool-display v0.4.0

22 May 15:05

Choose a tag to compare

[0.4.0] - 2026-05-22

Added

  • Added the ./tool-display-api-consumer subpath export so other extensions can decorate tool definitions through the runtime tool-display API or queue decorations until pi-tool-display is loaded.
  • Added hashline-anchor-aware diff rendering so read/edit anchor lines can display their LINE#HASH labels in the diff gutter.

Changed

  • Deferred built-in tool override registration until the built-in owner is available and refreshed cached built-in tools on session lifecycle changes.
  • Redacted secret-like debug payload values and switched debug writes to asynchronous buffered file logging.

v0.3.6

04 May 01:56

Choose a tag to compare

Added

  • Documented the debug config flag for opt-in file diagnostics under the runtime-created debug/ directory with terminal debug output kept disabled.
  • Added regression coverage for config store isolation, pending diff preview safety, tool override registration, presets, and thinking label rendering.

Changed

  • Scoped projected pending edit and write previews to the active workspace before reading files, with clear fallback notices when previews cannot be resolved safely.
  • Shared ANSI sanitization and width-safety helpers across diff and user message rendering for more consistent narrow-pane output.

Fixed

  • Hardened pending write metadata tracking so preview and execution state do not leak across tool call lifecycles.
  • Improved tool override preview reads and write state handling for safer partial-render updates.

v0.3.5

27 Apr 13:28

Choose a tag to compare

[0.3.5] - 2026-04-27

Changed

  • Removed the deleted bundled screenshot asset from published package contents and removed the corresponding README project-structure reference to assets/pi-tool-display.png.

v0.3.4

24 Apr 15:40

Choose a tag to compare

Added

  • Added projected pending diff previews for partial edit and write tool calls so the TUI can show pending edit, pending overwrite, and pending create diffs before execution finishes
  • Added preview fallback notices when projected edit previews cannot be resolved deterministically from the current file contents

Changed

  • Updated @mariozechner/pi-coding-agent and @mariozechner/pi-tui peer dependencies to ^0.70.2
  • Diff renderer write headers now support contextual action labels so pending previews can display pending edit, pending overwrite, and pending create

Fixed

  • Restored native user message box spacing on recent Pi releases by extracting markdown through the newer nested Box wrapper and stripping OSC 133 prompt markers from fallback content normalization
  • Limited fallback OSC stripping to OSC 133 prompt markers so OSC 8 hyperlinks and other non-prompt OSC sequences remain intact in user message rendering

v0.3.2

15 Apr 22:34
72b2ffd

Choose a tag to compare

Added

  • diffIndicatorMode config option with three styles: bars (persistent vertical indicators), classic (+/- markers on first row only), and none (no indicator column)
  • Config modal dropdown for diff indicator style selection under "Diff indicators" setting

Changed

  • Updated @mariozechner/pi-coding-agent and @mariozechner/pi-tui peer dependencies to ^0.67.2
  • Config path resolution now uses getAgentDir() API to correctly respect PI_CODING_AGENT_DIR environment variable (thanks to @tynanbe for PR #6)
  • Diff renderer now supports mode-aware indicator glyph resolution (bars, classic, none)
  • Line prefix width calculations adjusted per indicator mode for accurate diff column alignment
  • Removed unused session_switch listener from native user message box registration
  • Added top margin line to native user message box rendering (thanks to @w-winter for the suggestion)
  • Rebalanced diff row and inline emphasis background mixing for more consistent added/removed line readability

Fixed

  • Diff indicator markers now render correctly across all indicator modes with proper continuation handling
  • Classic mode now shows +/- only on first visual row, with spacing on wrapped continuation lines
  • Corrected ANSI background reset detection so RGB color sequences containing component value 49 no longer break inline diff emphasis background rendering (thanks to @michaelrommel for reporting issue #8)

v0.3.1 — Metadata Update

01 Apr 06:16

Choose a tag to compare

0.3.1 — Metadata Update

pi-tool-display provides OpenCode-style compact tool rendering, adaptive diff layouts, and enhanced chat UI details for the Pi coding agent.

This patch release updates npm package metadata for improved search discoverability. No code or runtime changes.

Changes:

  • Updated npm keywords and package metadata for better discoverability
  • No behavioral changes — existing functionality unchanged

Install:
npm install pi-tool-display@0.3.1

v0.3.0

01 Apr 03:20

Choose a tag to compare

Added

  • prepareArguments delegate support for built-in tool overrides (read, grep, find, ls, edit, write, bash)
  • buildPromptSnippetFromDescription() helper to derive prompt snippets from MCP tool descriptions
  • MCP proxy prompt metadata (MCP_PROXY_PROMPT_SNIPPET, MCP_PROXY_PROMPT_GUIDELINES) for tool registration
  • Write execution metadata tracking via tool call ID for accurate diff rendering across execution lifecycle
  • applyLineBackgroundToWidth() helper for consistent line background handling in diff renderer

Changed

  • Updated @mariozechner/pi-coding-agent and @mariozechner/pi-tui peer dependencies to ^0.64.0
  • Refactored tool-overrides to use context-based argument extraction instead of closure state
  • Improved diff renderer width handling with cleaner background reset logic
  • Simplified continuation prefix rendering by removing unnecessary row background parameters
  • Enhanced MCP proxy tool registration with proper prompt metadata propagation

Fixed

  • Write diff rendering now correctly tracks previous content and file existence state across render phases
  • Tool call rendering now uses context-based state instead of global mutable state

v0.2.0

23 Mar 22:37

Choose a tag to compare

What's Changed

2026-03-24

Added

  • bashOutputMode config option with three modes: opencode (classic collapse), summary (line count only), preview (show lines)
  • Live bash preview with spinner animation and elapsed time during command execution
  • bash-display.ts module for bash call rendering with spinner state management
  • modal-icons.ts module for Nerd Font detection and modal icon sets (PI_NERD_FONTS and POWERLINE_NERD_FONTS env vars)
  • settings-inspector-modal.ts module with split-pane inspector UI (category list + setting details)
  • Search icon in settings inspector modal filter hint (Nerd Font \uF002 or emoji 🔍)

Changed

  • Settings modal now uses split-pane inspector with setting descriptions, summaries, and advanced notes
  • Modal width increased to accommodate split-pane layout (wider terminals get more space)
  • showTruncationHints config now defaults to false
  • showRtkCompactionHints config now defaults to false
  • Bash output now supports different rendering modes controlled by bashOutputMode
  • Refactored config modal to use new inspector modal component instead of legacy settings modal

Config

  • Added bashOutputMode: "opencode" | "summary" | "preview" to config schema
  • Updated example config to demonstrate new bashOutputMode option
  • Presets now include appropriate bashOutputMode values ("summary" for compact, "preview" for verbose)

Tests

  • Added comprehensive tests for bash output modes (opencode, summary, preview)
  • Added test coverage for spinner state management and elapsed time formatting
  • Added tests for modal icon detection with various terminal environments

v0.1.12

23 Mar 11:35

Choose a tag to compare

[0.1.12] - 2026-03-23

Added

  • tool-metadata.ts module with shared utilities: toRecord, getTextField, isMcpToolCandidate, extractPromptMetadata
  • cloneToolParameters function to deep-copy built-in tool parameter schemas for extension renderers
  • Comprehensive tests for MCP detection, config guards, output modes, and metadata cloning
  • Plural label support in search summaries
  • Conditional truncation hints via showTruncationHints config (defaults to false)
  • Keywords for better npm discoverability: hide, collapse, truncate, compact, diff, output-mode

Changed

  • Updated @mariozechner/pi-coding-agent and @mariozechner/pi-tui peer dependencies to ^0.62.0
  • Extracted shared utilities to dedicated tool-metadata.ts module for reuse across capabilities and tool-overrides
  • Refactored tool-overrides to preserve promptSnippet and promptGuidelines on overridden read, edit, and write tools
  • Improved diff renderer with accurate line number tracking and line number delta calculation for proper hunk tracking
  • Removed Windows path normalization from system prompt sanitizer working-directory handling
  • Simplified system prompt sanitizer to only handle documentation removal
  • Enhanced package description to highlight hide/collapse/truncate capabilities for better npm discovery

Tests

  • Added test suites for diff renderer numbering and wrap handling
  • Added tests for tool-overrides config and registration behavior
  • Added tests for capabilities module with MCP detection scenarios