$ cat ~/map/pi-mindfold.md
pi-mindfold
Collapses reasoning streams and stacked tool output into one active focus, with model-written intent and one-click lossless expansion.
extensions✓ Oct 19
Facts
- GitHub Stars
- ★ 2
- Forks
- 1
- license
- NOASSERTION
- npm / mo
- —
- last push
- Oct 19, 2026
install
pi install npm:pi-mindfold## TL;DR
A pi TUI plugin that collapses reasoning streams and stacked tool output into a single active focus annotated with model-written intent, then restores the complete chronological timeline through a one-click lossless expansion.
## Key points
- $Collapsed mode shows one active focus: thinking folds into an italic placeholder that the active tool card replaces with a human-readable intent line, and the placeholder is removed cleanly when the reply completes.
- $Intents come from the current model inside its normal tool-call payload, adapting pi-tool-explain's displaySummary convention — no secondary model calls, no separate API keys, no added latency — and are stripped before parameters reach the real tools.
- $Ctrl+Alt+T, the pinned toggle button, or the /mindfold command expands to the complete chronological timeline: all raw reasoning blocks, every tool invocation, full tool outputs, and child codemode executions.
- $Parallel tool calls track execution order by actual start time, so late-finishing siblings never revert or scramble the active display.
- $Session /reload, /resume, and /fork restore intents and nested tool hierarchies; outputs over 64 KB are saved to a content-addressed .mindfold/ sidecar with SHA-256 integrity verification.
- $PI_MINDFOLD_LANG=en switches the default zh-CN intents and command descriptions to English, read once at extension load; both // 意图: and // Intent: codemode comments are recognized in either mode.
- $Registered as /mindfold (with /compact-thinking kept as an alias) to avoid colliding with pi's built-in /compact; tested against pi 1.0.0 and 1.3.0 on Windows and POSIX using the real host modules.
## FAQ
Q Does pi-mindfold call another model to write the intent lines?
No. The current model writes intent inside its normal tool-call payload, adapting the displaySummary convention from pi-tool-explain, and the extension strips intent fields before forwarding parameters — no secondary model calls, no separate API keys, no added latency.
Q Which tools get intent decorations?
Tools defining standard object parameter schemas: built-ins such as read, bash, powershell, edit, and grep; nushell and codemode; common web-search tools; todo and image tools; and all registered MCP servers and SDK-defined tools. Tools that already define their own displaySummary or use non-object schemas keep their exact original contracts.
## References
## Related entries
$ pi-conversation-outline
Read-only outline rail for fullscreen: one tick per prompt, hover to preview, click to jump.
$ Pringled's pi extensions
Claude Code-style tool rows, a context-and-cost footer, a model picker, background jobs with checkpoints, and next-prompt helpers.
$ pi-messages
Turns pi's markdown code blocks into rounded terminal cards with language icons, soft wrap, and keyboard-driven copy and insert.
Last updated: Oct 19, 2026