npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pi-kaush/pi-content-layout

v0.1.19

Published

Inset Pi's conversation surface and style active and submitted prompts as matching blocks.

Readme

pi-content-layout

A small Pi extension that insets the main conversation, leaves the active editor in Pi's native style, and gives submitted prompts a compact rail shell.

Install

pi install npm:@pi-kaush/pi-content-layout

Restart Pi or run /reload.

Assistant output
  Text wraps inside the inset width.

Active prompt (native Pi border and terminal background)
── ⠋ Working ───────────────────────────────────
 prompt text
────────────────────────────────────────────────

Submitted prompt
  ▎                                            darker background
  ▎ prompt text                                darker background
  ▎                                            darker background

Assistant and submitted-message content keep the two-column outer inset. The active prompt uses its editor's native border, terminal background, and padding. Pi embeds its status indicator in the top border when supported. The submitted prompt keeps Pi's message padding, with the thin rail outside its darker body.

Scope boundary

This package owns the transcript surface: the message inset, system-text and status-rule alignment, the editor surface, and the submitted-prompt shell for user messages. It deliberately never renders tool execution rows today: collapsed tool calls, grouping, subagent plans, thinking labels, and user-run ! bash blocks all live in @pi-kaush/pi-tool-call-markers (which also owns the rail shell those blocks use).

The one cross-package contract is spacing: ! blocks align with message text at this package's message inset, so pi-tool-call-markers mirrors contentInset for its bash blocks (see its src/bash-block.ts). Change indentation in both packages together.

Warning and error notices

Pi's bare Warning: … and Error: … rows, and native cache-miss notices, swap the label for a glyph on the message edge (the tool-rail column): ! for warnings, ✗ for errors.

  ! Cache miss: 32k tokens re-billed ($0.16)

Pi's model-switch and idle-gap labels, token counts, warning color, and notice thresholds remain unchanged. The cost is still Pi's estimate; only the ~ is hidden. No cache detection or billing logic is replaced.

Queued steering previews

Pi renders queued Steering: messages in the native dim color. This package uses the optional steeringMessage foreground token when the active theme defines it; otherwise, it preserves Pi's native dim color. Other queued rows and the dequeue hint stay native.

Add the token to a theme's colors map to choose the preview color:

{
  "colors": {
    "steeringMessage": "mauve"
  }
}

pi-intercom message surface

When pi-intercom is installed, this package restyles its inbound intercom_message box onto the shared transcript columns: the frame's left border sits on the tool-marker column (the outer inset), and the From: title and body text share the text column used by tool rows and Thought labels. The frame and the sender name ride customMessageLabel (Pi's label tone for extension messages), and every line inside the frame stays muted. The redundant Ctrl+O expands title hint is dropped (the meta line inside the box keeps Ctrl+O to expand). Content is unchanged, and expanded view keeps pi-intercom's full body, attachment, and reply sections.

Pi resolves a customType's renderer in extension load order (first registration wins), so pi-intercom would otherwise shadow this package's box. A chat-container hook swaps the restyled box in for whichever component Pi built, so the surface holds in either order; listing this package before pi-intercom in packages keeps the cheaper registration path. Without pi-intercom installed both paths are inert, and malformed message payloads fall back to Pi's default custom-message box.

Manual configuration

If you manage Pi package sources directly, add the package to settings.json:

{
  "packages": ["npm:@pi-kaush/pi-content-layout"]
}

Theme ownership

The active editor uses Pi's native terminal background (light with a light theme, dark with a dark theme). Submitted message bodies paint with the theme's userMessageBg token, and their rails use borderAccent.

Themes control colors; this extension controls transcript spacing and the submitted-prompt shape.

Composition and compatibility

The editor factory wraps the currently configured custom editor, or creates Pi's CustomEditor when none exists. It preserves the editor's native rendering and input behavior. The wrapper only prevents transcript-specific status indentation from affecting a status embedded in the editor border.

The default editor opts into Pi's embedWorkingStatus behavior when the host supports it, so status indicators interrupt the active prompt's top border. Older Pi versions keep the separate status row, which this package still aligns with the transcript.

Pi does not currently expose public renderers for native user and assistant messages or queued steering previews. Their layout and styling use guarded adapters around Pi's exported components. The adapters restore the original renderers on shutdown and fall back to native rendering when the expected component shape changes.

For the complete visual system, combine this package with:

  • @pi-kaush/pi-footer-minimal for matching footer inset and footer working state; and
  • @pi-kaush/pi-tool-call-markers for unboxed tool rows, subagent plans, thinking markers, and user-run ! bash blocks.

License

MIT