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-transcript-window

v0.3.1

Published

Pi extension: keep only the latest N TUI messages visible (old entries stay in the session file). Fork of pi-hide-messages adapted for pi 0.84+.

Downloads

132

Readme

pi-transcript-window

Keep only the latest N TUI chat messages visible in the Pi coding agent terminal UI, while preserving the full session context underneath.

Fork of pi-hide-messages by newCman1, adapted for pi 0.84+ (the upstream patch targeted the removed renderSessionContext API; this fork patches renderSessionEntries and filters hidden entries directly).

Why

As a session grows, the TUI renders every entry — hundreds of tool calls, each with output — and ctrl+o (expand tool output) rebuilds all of them, making the UI slow. This extension hides older entries from the display layer only: the session file (~/.pi/agent/sessions/*.jsonl) and the model/agent context are never touched, so nothing is lost and compaction behavior is unchanged.

Features

  • Auto-hide on session start/switch — keep only the latest N entries visible
  • Manual control — /hide-messages 20 keeps the latest 20; /restore-messages brings everything back
  • Branch-aware — hiding follows the active session path (works across /resume, /new, /fork)
  • Display-only — hidden entries are never deleted; the agent keeps full context
  • Configurable — global and project-level config.json

Install

pi install git:github.com/newCman1/pi-transcript-window

Or copy this folder into an auto-discovery location:

~/.pi/agent/extensions/pi-transcript-window
# or project-local
.pi/extensions/pi-transcript-window

Usage

| Command | Description | |---|---| | /hide-messages | Hide older entries, keeping the configured default count (resets a previously tuned count) | | /hide-messages 20 | Keep the latest 20 visible — permanent, written to the global config | | /restore-messages | Restore all entries hidden by this extension | | /window | Show the current ctrl+o expansion window | | /window 30 | ctrl+o expands only the latest 30 bash tool outputs | | /window off | ctrl+o expands all tool outputs (no limit) |

/window is independent of message hiding: it only controls how many recent bash tool outputs ctrl+o expands. Other tools (read/write/update) render as one-line summaries with cc-style and are not counted. Messages stay fully visible; only the expansion is limited to the newest N bash calls. /window off restores pi's default behavior (expand everything).

Configuration

Loaded from (project overrides global):

~/.pi/agent/extensions/pi-transcript-window/config.json
.pi/extensions/pi-transcript-window/config.json

| Option | Type | Default | Description | |---|---|---|---| | debug | boolean | false | Reserved compatibility flag | | defaultVisibleCount | number | 10 | Visible chat items to keep when hiding | | autoHideOnSessionStart | boolean | true | Apply the limit on session start/switch |

{
  "debug": false,
  "defaultVisibleCount": 10,
  "autoHideOnSessionStart": true
}

How it works

  • /hide-messages and /restore-messages record intent as append-only custom session entries (no historical JSONL rewriting).
  • The extension patches InteractiveMode.prototype.renderSessionEntries (pi 0.84+) to compute a hidden prefix over the active branch at render time and filter those entries before the original renderer runs.
  • Old entries remain in the session file and in the agent context — only the TUI display omits them.

Compatibility

  • pi 0.84+ (patches renderSessionEntries). Peer range is ^0.84.0.
  • Requires interactive (TUI) mode; degrades silently elsewhere.

License

MIT — see LICENSE. Upstream: MasuRii/pi-hide-messages.