@agnishc/edb-compact-tools0.21.5
Pi extension: compact outlined tool-call renderers with ctrl+o expansion
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
edb-compact-tools
Pi extension that replaces large built-in tool-call blocks with compact outlined rows.
Behavior
- Restyles tool rows at the component level. No built-in tool is re-registered, so every tool keeps Pi's own definition and executor.
- Patches
hasRendererDefinition,getRenderShell,getCallRenderer, andgetResultRendereronToolExecutionComponent, so built-in tools, extension tools, and tools with no custom renderer all take the same compact path. - Collapsed by default: one compact summary row.
- Expanded with Pi's normal tool expand keybinding, usually
ctrl+o. - Uses
renderShell: "self", so collapsed rows have no filled background; expanded output uses Pi's subtle tool-state background colors. - Collapsed tools render as two lines with no framing:
● Run npm test, then a└─ ✓ exit 0 · 2 linesstatus row. No horizontal rules, so a long transcript stays dense. Pi still inserts one blank line between tool components. - Expanding swaps the status row for a
├─body and keeps the same●call line and└─closing row. - Styles user messages as compact outlined cards with an accent border and a random red emoji marker.
- Styles assistant text messages as compact outlined cards with muted borders.
- Detects skill files (paths containing
.agents/skills/or.pi/agent/skills/) and renders them with a purple outline. - Strips terminal control sequences from tool output before anything is measured or painted, so colourised output or a
catof a binary cannot corrupt the screen or drive the terminal. - Pending rows request a repaint on a timer, so a silent call still shows a live indicator instead of a frozen first frame.
Coexistence
- Tools whose definition declares
renderShell: "self"bring their own framing and are left untouched, so other extensions keep their cards. - The patch chains to whatever was installed before it and only restores methods it still owns, so unloading cannot disable another extension's renderer.
- Because no tool is registered, this extension never appears as the owner of a tool name and cannot silently lose one to registry ordering.
Local development
Run Pi with the extension directly:
pi -e ./packages/edb-compact-tools/src/index.ts
Or install as a Pi package after publishing:
pi install npm:@agnishc/edb-compact-tools
Notes
edit expansion shows the unified diff from Pi's normal edit result, coloured by line (+ added, - removed, @@ hunk, dim file headers). write expansion shows the normal write result text, not a synthetic full-file diff. Rich per-file diffs are edb-diff-files' job.