@vimsucks/pi-user-message-box

Render Pi user messages in a bordered, theme-aware box without changing tools or model context.

Packages

Package details

extension

Install @vimsucks/pi-user-message-box from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@vimsucks/pi-user-message-box
Package
@vimsucks/pi-user-message-box
Version
0.1.0
Published
Oct 12, 2026
Downloads
156/mo · 9/wk
Author
vimsucks
License
MIT
Types
extension
Size
29 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@vimsucks/pi-user-message-box

A focused Pi extension that renders every user message in a bordered, theme-aware box.

╭ user ─────────────────────────────────────╮
│                                           │
│ Explain why this test is flaky.           │
│                                           │
╰───────────────────────────────────────────╯

I will inspect the test and its shared state.

Scope

This extension changes only the interactive rendering of normal user messages. It:

  • does not register or override tools;
  • does not change messages stored in the session;
  • does not change messages sent to the model;
  • preserves Markdown styling and terminal prompt markers;
  • restores Pi's original renderer during reload and shutdown;
  • falls back to Pi's renderer when the terminal is narrower than eight columns.

Installation

Install from npm:

pi install npm:@vimsucks/pi-user-message-box

Or install from GitHub:

pi install git:github.com/vimsucks/pi-user-message-box

Run /reload or restart Pi after installation.

Removal

Remove the package source you installed:

pi remove npm:@vimsucks/pi-user-message-box

For a GitHub installation, remove git:github.com/vimsucks/pi-user-message-box instead. Then run /reload or restart Pi.

Compatibility

Pi does not currently expose a public hook for replacing ordinary user-message rendering. This extension patches UserMessageComponent.prototype.render, so a future Pi release can require an update. Do not load it together with another extension that replaces the normal user-message renderer.

Development

Use pnpm 12.12.0, pinned in package.json:

pnpm install --frozen-lockfile --ignore-scripts
pnpm check
pi --no-extensions -e ./src/index.ts

The repository commits pnpm-lock.yaml for reproducible development installs. .npmrc and publishConfig use the public npm registry; do not add credentials to either file. Pi supplies the host packages at runtime, so they remain peer dependencies rather than bundled runtime dependencies. Development copies are used for checks and tests.

Publishing

After the checks pass, publish from a clean working tree on main:

pnpm publish

The package is configured for public access on https://registry.npmjs.org/. If npm requests additional authentication, complete it in an interactive terminal. Verify the published version with npm view @vimsucks/pi-user-message-box version --registry=https://registry.npmjs.org/.

Attribution and license

The user-message rendering implementation was extracted from MasuRii/pi-tool-display and simplified to remove all tool-rendering behavior. The original project is MIT licensed. See NOTICE and LICENSE.