pi-collapse-outputs
v1.0.2
Published
Collapse built-in tool output by default for Pi — shows a one-line summary, Ctrl+O to expand.
Downloads
270
Maintainers
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.jsonInstallation
pi install npm:pi-collapse-outputsTesting
Run the native TypeScript unit test suite (Node.js native test runner):
npm run testDevelopment
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
