@dihak/pix-display
v0.1.12
Published
Pi core extension — paste chips, thinking blocks, and framed code rendering
Downloads
370
Maintainers
Readme
pix-display
Pi core extension — paste chips, autocomplete Tab cycle, thinking blocks, and polished code snippets.
What it does
Four features, always on when installed:
Autocomplete Tab cycle. With the suggestion list open, Tab moves to the next item and Shift+Tab to the previous. Enter accepts (Pi default). Tab with the menu closed still opens completion. Composes with paste chips via editor-factory wrap.
Paste chips. Replaces Pi's paste markers ([paste #1 2232 chars]) with styled icon chips: image #1 for image pastes (blue), text +N lines / text Nk chars for text pastes (green). Collapses pasted image paths into markers in the buffer while showing human-readable labels on screen. The display rewrite is purely visual — the buffer keeps the real path for the model. Expansion wraps each paste in <paste>…</paste> so adjacent pastes don't merge into one wall in the model-facing text.
Thinking blocks. Converts leaked reasoning tags (<think>/<thinking>) from some providers into native Pi thinking content blocks, which render dim + italic via the thinkingText theme token. No ANSI injection, no markdown blockquote shim. Applies during streaming (message_update) and finalization (message_end).
Code snippets. Renders every fenced code block in assistant responses inside a themed, language-labeled frame—including Python, TypeScript, JSON, YAML, Rust, Go, SQL, shell, and arbitrary custom language tags. Untagged fences use a code label. Pi's native syntax highlighting remains intact for recognized languages, while long lines are safely clipped to the terminal width.
The features are registered at session start. TUI-only display changes are no-ops in JSON/RPC/print modes. In-process non-TUI child sessions (such as background subagents) do not clear the parent TUI's renderer state.
Install
pi install npm:@dihak/pix-displayAlso included in
@dihak/pix-core:pi install npm:@dihak/pix-core
Full distro
Source: github.com/dihak/pix-mono
To install the complete pix suite (all packages + Pi itself):
curl -fsSL https://raw.githubusercontent.com/dihak/pix-mono/main/scripts/install.sh | shLicense
MIT
