btw-pi
v0.4.0
Published
Ask a context-free side question while Pi keeps working.
Downloads
276
Maintainers
Readme
btw-pi
A lightweight Pi extension for asking an isolated side question while the main agent keeps working.
/btw what does SIGPIPE mean?The answer appears as a compact card in the chat transcript. The card is a custom session entry, so neither the question nor the answer is added to the main model context. There is no centered modal: input stays in Pi's normal editor and an animated activity row remains visible above it.
UX
/btw <question>starts an independent completion with the currently selected model.- An animated
/btw <question>activity row stays visible above the editor until the answer arrives. - If Pi is still streaming, the completed side answer is shown immediately in that row instead of waiting for the main transcript to settle.
- Focus immediately returns to Pi's normal editor, so you can keep using the main conversation while
/btwruns. - Side questions use minimal reasoning and a concise output budget for lower latency.
- Pi's active inference continues; the side question is not queued as steer/follow-up.
/btw cancelcancels the active side question without aborting Pi's main inference.- One side request may run at a time.
Ctrl+Oexpands a result card to show model and timestamp.
Install
Install from npm:
pi install npm:btw-piOr try it for one run without installing:
pi -e npm:btw-piYou can also install a local checkout while developing:
pi install /absolute/path/to/btw-piAfter changing a local extension, run /reload in Pi.
Design
- Uses
pi.registerCommand()rather than adding an LLM tool or system-prompt overhead. - Calls Pi's compatibility
completeSimple()API with minimal reasoning and no shared conversation state. - Reuses Pi's selected model and credential registry.
- Uses
pi.appendEntry()plusregisterEntryRenderer()for durable, display-only results. - Uses the injected theme and built-in TUI components.
- Aborts in-flight work on session shutdown/reload.
Development
npm install
npm test
npm run pack:dryRequires Node.js 20 or newer.
Release history is maintained in CHANGELOG.md.
