Releases: MasuRii/pi-tool-display
Releases · MasuRii/pi-tool-display
pi-tool-display v0.4.1
Added
- Reload-safe extension lifecycle:
src/disposable.tscleanup registry that disposes all tool overrides, prototype patches, timers, and event handlers onsession_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
shellPathandcommandPrefixfromsettings.jsonwhen present (#21). - Bash spinner timer reworked to use toolCallId-keyed Map instead of
__piToolDisplayBashSpinner, with interval reduced from 80ms to 200ms, defensiveinvalidate()check, and all timers registered in the cleanup registry (#19). - Bash override registration is now deferred (like read/grep/edit) and uses
before_agent_startto discover ownership viapi.getAllTools()before overriding, preventing conflicts with other extensions (#17). Thanks to @iwinux for reporting. pi.registerToolis now intercepted to decorate MCP tools as they register, eliminating a race condition wheresession_start/before_agent_startfire beforepi-mcp-adapterfinishes registering tools (#15, #18). Thanks to @dashanlkk for reporting and opening PR #18.isMcpToolCandidate()heuristics expanded to matchmcp,mcp_*,*_mcp, names containingserver:or starting withctx_, and parameter schemas containingmcpServer,serverUrl, orserver_name, catching many MCP servers that were previously false negatives.stripBackgroundSgrParams()now correctly preserves foreground RGB sequences like38;2;12;49;200minstead of misinterpreting color component49as a background reset (#8, #3). Thanks to @michaelrommel for the patch and @w-winter for reporting.patchUserMessageRenderPrototypenow restores stale patches from prior extension instances before re-patching, andregisterNativeUserMessageBoxhas a duplicate-prevention guard withsession_shutdownrestoration (#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 onsession_start(not justbefore_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
[0.4.0] - 2026-05-22
Added
- Added the
./tool-display-api-consumersubpath export so other extensions can decorate tool definitions through the runtime tool-display API or queue decorations untilpi-tool-displayis loaded. - Added hashline-anchor-aware diff rendering so read/edit anchor lines can display their
LINE#HASHlabels 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
Added
- Documented the
debugconfig flag for opt-in file diagnostics under the runtime-createddebug/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
v0.3.4
Added
- Added projected pending diff previews for partial
editandwritetool calls so the TUI can showpending edit,pending overwrite, andpending creatediffs 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-agentand@mariozechner/pi-tuipeer dependencies to^0.70.2 - Diff renderer write headers now support contextual action labels so pending previews can display
pending edit,pending overwrite, andpending create
Fixed
- Restored native user message box spacing on recent Pi releases by extracting markdown through the newer nested
Boxwrapper 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
Added
diffIndicatorModeconfig option with three styles:bars(persistent vertical indicators),classic(+/- markers on first row only), andnone(no indicator column)- Config modal dropdown for diff indicator style selection under "Diff indicators" setting
Changed
- Updated
@mariozechner/pi-coding-agentand@mariozechner/pi-tuipeer dependencies to^0.67.2 - Config path resolution now uses
getAgentDir()API to correctly respectPI_CODING_AGENT_DIRenvironment 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_switchlistener 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
49no longer break inline diff emphasis background rendering (thanks to @michaelrommel for reporting issue #8)
v0.3.1 — Metadata Update
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
Added
prepareArgumentsdelegate 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-agentand@mariozechner/pi-tuipeer 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
What's Changed
2026-03-24
Added
bashOutputModeconfig 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.tsmodule for bash call rendering with spinner state managementmodal-icons.tsmodule for Nerd Font detection and modal icon sets (PI_NERD_FONTSandPOWERLINE_NERD_FONTSenv vars)settings-inspector-modal.tsmodule with split-pane inspector UI (category list + setting details)- Search icon in settings inspector modal filter hint (Nerd Font
\uF002or 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)
showTruncationHintsconfig now defaults tofalseshowRtkCompactionHintsconfig now defaults tofalse- 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
bashOutputModeoption - Presets now include appropriate
bashOutputModevalues ("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
[0.1.12] - 2026-03-23
Added
tool-metadata.tsmodule with shared utilities:toRecord,getTextField,isMcpToolCandidate,extractPromptMetadatacloneToolParametersfunction 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
showTruncationHintsconfig (defaults tofalse) - Keywords for better npm discoverability:
hide,collapse,truncate,compact,diff,output-mode
Changed
- Updated
@mariozechner/pi-coding-agentand@mariozechner/pi-tuipeer dependencies to ^0.62.0 - Extracted shared utilities to dedicated
tool-metadata.tsmodule for reuse across capabilities and tool-overrides - Refactored tool-overrides to preserve
promptSnippetandpromptGuidelineson 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