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-hide-messages

v0.1.5

Published

Pi extension for hiding older TUI chat history while preserving full session context, with /hide-messages and /restore-messages controls.

Readme

pi-hide-messages

Hide older Pi TUI chat messages without shrinking the underlying session context.

pi-hide-messages lets you keep long conversations readable by hiding older entries from the Pi terminal UI while preserving the session data needed to continue the conversation. It adds simple slash commands for manual control and can auto-hide older messages whenever a session starts or switches.

[!NOTE] Hidden messages are not deleted. They are only hidden from the Pi TUI display layer, so the underlying session data stays intact, the active model/agent still keeps the full conversation context, and /restore-messages brings the hidden entries back into view.

Features

  • Branch-aware history hiding for the active session path
  • Manual commands for hiding or restoring visible chat history
  • Auto-hide on session start/switch using a configurable visible-count threshold
  • Preserved conversation continuity so recent assistant/tool/user context remains visible
  • No context loss for the model or agent because hiding only changes what the TUI renders, not what the session stores
  • Project-level overrides via .pi/extensions/pi-hide-messages/config.json

Installation

Local extension folder

Place this folder in one of Pi's auto-discovery locations:

# Global default (when PI_CODING_AGENT_DIR is unset)
~/.pi/agent/extensions/pi-hide-messages

# Project-specific
.pi/extensions/pi-hide-messages

npm package

pi install npm:pi-hide-messages

Git repository

pi install git:github.com/MasuRii/pi-hide-messages

Usage

Commands

| Command | Description | |---------|-------------| | /hide-messages | Hide older entries and keep the configured default visible count | | /hide-messages 20 | Hide older entries and keep the latest 20 visible chat items | | /restore-messages | Restore all entries hidden by this extension for the current session |

Behavior notes

  • defaultVisibleCount is used when /hide-messages is called without arguments.
  • autoHideOnSessionStart applies the same visibility rule whenever Pi opens or switches sessions.
  • After /restore-messages, auto-hide stays paused for the active branch until /hide-messages is used again.

Configuration

Runtime configuration is loaded from:

# Global config default (respects PI_CODING_AGENT_DIR)
~/.pi/agent/extensions/pi-hide-messages/config.json

# Optional project override
.pi/extensions/pi-hide-messages/config.json

A starter template is included at config/config.example.json.

Project config overrides the global extension config when both are present.

Configuration options

| Option | Type | Default | Description | |--------|------|---------|-------------| | debug | boolean | false | Reserved compatibility flag. Keep disabled unless a future release documents debug output. | | defaultVisibleCount | number | 10 | Positive integer count of visible chat items to keep when hiding older entries. | | autoHideOnSessionStart | boolean | true | Automatically apply the default visibility limit when a session starts or switches. |

Example

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

How it works

  • The extension updates older session entries with hidden: true in the active session file.
  • It patches Pi's interactive session rendering so hidden entries are omitted from the visible TUI history.
  • Session data remains restorable, which keeps the extension focused on UI readability rather than destructive cleanup.
  • Hidden entries still remain part of the session record, so the model and agent keep their full context even when those messages are not currently rendered in the TUI.

Related Pi Extensions