@runminton/pi-parallel-batch
v0.1.1
Published
Pi extension: visualize parallel tool call batches in the TUI
Downloads
318
Readme
@runminton/pi-parallel-batch
Pi extension: visualize parallel tool call batches in the TUI.
When the model issues multiple tool calls in a single response (a parallel batch), the extension shows the batch in real time — so you can see at a glance how many tools were fired together, which ones are still running, and when the batch finishes.
Install
pi install npm:@runminton/pi-parallel-batchOr try without installing (temporary, current run only):
pi -e npm:@runminton/pi-parallel-batchOr load from a local checkout:
pi -e /path/to/pi-parallel-batchUsage
No setup needed. The extension is active as soon as it loads; whenever the model fires a parallel batch of tool calls, the batch appears automatically.
| Command | Description |
|---|---|
| /pb-mode notify | Switch to notify mode (one-line message in the transcript; batch start/done only) |
| /pb-mode widget | Switch back to widget mode (card above the editor; per-tool ✓/⟳ status, stays visible for at least 1s, then disappears when the batch finishes) — default |
| /pb-demo | Simulate two parallel tool batches (self-test only; don't run while real tools are executing) |
The mode is persisted in ~/.pi/agent/parallel-batch.json and restored on the next launch. Default is widget.
To adjust the widget's minimum display time, change MIN_WIDGET_VISIBLE_MS near the top of parallel-batch.ts.
Mode semantics
- widget: a card in the editor-adjacent area. Shows per-tool running/done status. It remains visible for at least 1 second, including for fast tool calls, then disappears when the batch finishes. It leaves no trace.
- notify: a stream message appended to the transcript (batch start / batch done). It is an event record: stays in the transcript history after switching modes.
Known behavior
- Notify-mode messages remain in the transcript (including after switching back to widget).
- A batch = one assistant response's tool calls. Serial single-tool calls display as
×1.
Notes
- Zero dependencies. Only uses Node built-ins.
- Source:
parallel-batch.ts— review before installing, it runs with full system permissions.
