@firstpick/pi-extension-btw

Ephemeral /btw side-question overlay command for Pi TUI and WebUI.

Packages

Package details

extension

Install @firstpick/pi-extension-btw from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@firstpick/pi-extension-btw
Package
@firstpick/pi-extension-btw
Version
0.1.0
Published
Jun 14, 2026
Downloads
not available
Author
firstpick
License
MIT
Types
extension
Size
22.1 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

@firstpick/pi-extension-btw

Ephemeral /btw side questions for Pi.

What it does

  • Adds /btw <question> as a Pi extension command.
  • Answers from the current session transcript without appending the question or answer to the main conversation.
  • Does not expose tools to the side request.
  • In the TUI, shows the answer in a centered overlay with scrolling and dismiss keys.
  • In Pi Web UI RPC mode, starts the side request in the background and streams into a non-blocking live output widget.

Install

pi install npm:@firstpick/pi-extension-btw

Usage

/btw what was the config file name again?

TUI keys while the overlay is open:

  • / — scroll
  • PageUp / PageDown — scroll faster
  • Home / End — jump to top/bottom
  • Enter, Space, Esc, Ctrl+C — close the overlay; if the side request is still running, it is aborted

Web UI integration

When loaded inside @firstpick/pi-package-webui, /btw publishes structured updates through extension UI widgets using the btw:output and btw:footer widget keys. The Web UI renders the answer as a release-style live output card, so the composer remains usable while the side answer streams.

The Web UI card includes Transfer Context, which calls /btw-transfer to append the selected side question and answer as a displayed custom message in the main session. Transferred context is included in later main-chat model context. If the main agent is actively running, the transfer is delivered as live steering and injected after the next agent action.

Notes

/btw makes a separate model request. It keeps the main transcript clean, but it is not free: provider token usage still applies. The request serializes the current branch transcript for context and appends the side question only to that ephemeral request.