@zenodinh/pi-render
v0.2.2
Published
Render-only presentation layer for pi: tool rows and content surfaces, zero tool registrations.
Readme
pi-render
A render-only presentation layer for pi: styled tool rows and a richer answer canvas, with zero tool-name registrations. pi-render draws; the host and its peers execute.
It registers one row renderer resolver and one markdown transformer — and no commands at all — draws eight built-in tool rows collapsed to a single line, and renders tables, code/JSON panels, diagram fences, and images inside assistant answers. It adds no tool schema, no prompt text, and no execution wrapper.
It is on by default: install it and styled output appears, with nothing to configure and nothing to invoke.
Replaces pi-pretty-tui, fixing #21 (expand freeze) and #22 (table frame now takes its color from the host theme, at 4.5:1 or better).
Requirements
pi 1.0.4 or later.
pi-render and pi-pretty-tui must never be active together: the two do not share a session. One leaves pi's installed-packages list as the other enters.
Install
Installing is one edit to pi's installed-packages list. Both commands write
~/.pi/agent/settings.json.
pi list # pi-pretty-tui's entry appears on its own line (a path)
pi remove <exactly what pi list printed for it> # a path, absolute or relative — not the npm: prefix
pi install npm:@zenodinh/pi-renderThen re-enable the built-in codemode tool, which the predecessor displaced —
delete this entry from ~/.pi/agent/settings.json if it is present:
"extensions": ["-builtin:codemode"]Start a new pi session. The packages list now holds the new entry and no
predecessor entry:
"packages": ["npm:@zenodinh/pi-render"]Usage
Every tool row renders collapsed to one line, with errors summarized on that line.
ctrl+o — or a click — expands the row; expanding a call again reuses the cached
render, so there is no re-parse and no freeze.
Nothing to invoke: pi-render registers no commands, so the /canvas status
command is gone. The artifact surfaces it reported on are unchanged — the engines
and the cache still warm at boot, and diagram fences still render as cards.
Turning a module off
Every module is on by default. A module can still be disabled through the one
settings document, ~/.pi/agent/pi-render/settings.json; only that module's
surface falls back to the host's own rendering, and the others are unaffected:
{ "version": 1, "modules": { "content.table": { "enabled": false } } }What you get, and what changes
| | pi-pretty-tui | pi-render |
|---|---|---|
| Tool rows | bash, ls, read, edit, write, codemode, find, grep | same eight, drawn through the resolver chain |
| Search execution | find/grep re-registered and routed to FFF via a library shim | the host's built-in find/grep; @ff-labs/pi-fff is an optional peer extension |
| Answer canvas | tables, panels, diagram fences, images | same, plus a host-theme-driven table frame |
| Chrome (user-message marker, prompt icon, working shimmer, thinking label) | drawn here | not drawn — install pi-zentui independently, or keep host defaults |
| Tool registrations | 8 | 0 |
| Diagnostics log file | yes | gone (removed with the slow-startup root cause) |
Themes
Two host theme definitions register additively through the package manifest: Dracula Soft and One Dark. Pick either in pi's theme picker; installing the package never changes your active theme.
The package also carries nine ported community palettes as documents under
themes/ — Catppuccin Mocha, Tokyo Night, Kanagawa Wave, Rosé Pine,
Gruvbox Dark Medium, GitHub Dark, Everforest Dark, Nord and Ayu
Mirage — each validated against the host's 56-token schema. They register in pi's
picker when the manifest declares them; until then, load one by naming its file in
your themes setting (see below), which is how the owner runs them.
Code blocks highlight with one of eleven shiki themes, dracula-soft (default),
one-dark-pro, and one per ported palette (catppuccin-mocha, tokyo-night,
kanagawa-wave, rose-pine, gruvbox-dark-medium, github-dark, everforest-dark,
nord, ayu-mirage).
Search
pi 1.0.4 already ships built-in find and grep, so search works after the
cutover with nothing else installed. @ff-labs/pi-fff is optional: it adds
FFF's frecency and fuzzy index on top.
pi install npm:@ff-labs/pi-fffpi-fff owns the names and the execution; pi-render only styles the rows it
registers (find/grep, or fffind/ffgrep in its non-override modes).
Rollback
Reinstall the predecessor — the same hard switch, in reverse:
git clone https://github.com/zenodinh/pi-pretty-tui ~/personal/pi-pretty-tui
cd ~/personal/pi-pretty-tui && npm install --omit=dev --omit=peer
pi remove npm:@zenodinh/pi-render
pi install ~/personal/pi-pretty-tuiThe predecessor loads pi-fff as a library and registers find/grep itself, so
also remove pi-fff as a separate extension if you installed it above:
pi remove npm:@ff-labs/pi-fffLicense
MIT — see LICENSE.
