pi-collapse-outputs
Collapse built-in tool output by default for Pi — shows a one-line summary, Ctrl+O to expand.
Package details
Install pi-collapse-outputs from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-collapse-outputs- Package
pi-collapse-outputs- Version
1.0.1- Published
- Jun 3, 2026
- Downloads
- not available
- Author
- huanghui-dev
- License
- MIT
- Types
- extension
- Size
- 15 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Collapse Outputs
An extension for Pi that collapses built-in core tool outputs into a one-line summary by default (Ctrl+O to expand).
Key Mechanics
Behavior Matrix
| Tool | Collapsed (Default) | Expanded (Ctrl+O) |
|---|---|---|
| bash | ✓ N lines (Success) or ✗ command failed (Error) |
Raw stdout / stderr |
| read | N lines (Success) or ✗ read failed (Error) |
Full text or image load status |
| edit | +A / -R (Success) or ✗ edit failed (Error) |
Unified diff output |
| write | (empty) (Success) or ✗ write failed (Error) |
Error details on failure |
Project Structure
pi-collapse-outputs/
├── index.ts # Pi extension entry point (re-exports src/collapse-tools.ts)
├── src/
│ └── collapse-tools.ts # Core overrides rendering logic
├── test/ # TypeScript unit tests
│ └── collapse-tools.test.ts # Core parsers and rendering logic tests
├── package.json # Extension manifest (peerDependencies & devDependencies)
├── .gitignore
├── README.md
└── biome.json
Installation
Supports both installation methods:
- Via NPM (Recommended):
pi install npm:pi-collapse-outputs - Via GitHub:
pi install https://github.com/huanghui-dev/pi-collapse-outputs
Testing
Run the native TypeScript unit test suite (Node.js native test runner):
npm run test
Development
We align with the code quality and security standards of the primary pi-main workspace:
- Linter & Formatter: Biome is configured to auto-format and check codebase. We use
tabindentation with a width of3characters. - Commands:
- Check format and Lint:
npm run check - Run tests:
npm test
- Check format and Lint:
License
MIT