Skip to content

Fatih0234/btw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

/btw — Ephemeral Side Questions for Pi Coding Agent

Ask quick questions about your current Pi session without interrupting the main agent, polluting the conversation history, or waiting for the current task to finish.

/btw what were those errors again?
/btw why did it choose that file?
/btw tell me how this skill works

Answers stream into a dismissible overlay. Press Space, Enter, or Escape to dismiss.

For a video introduction to this extension, see: YouTube Introduction

What It Does

/btw creates a shadow agent for one side question. It reuses the same provider-message prefix as the main session so the provider prompt cache can stay warm, but it does not write the question or answer into your main chat history.

Key behavior:

  • Ephemeral: side questions do not pollute the session transcript.
  • No tools: the shadow agent cannot run shell commands, edit files, or call tools.
  • Cache-friendly: uses the same session id and preserved provider-message prefix where possible.
  • Configurable: choose a dedicated /btw model, reasoning level, and max output tokens with /btw-settings.
  • Persistent settings: settings are saved globally and restored in future sessions.

Installation

As a Pi package

From this repository:

pi install git:github.com/Fatih0234/btw

Then run /reload in Pi, or restart Pi.

Manual install

Copy btw.ts into your extensions directory:

Project-local (per project):

mkdir -p .pi/extensions
cp btw.ts .pi/extensions/btw.ts

Global (all projects):

mkdir -p ~/.pi/agent/extensions
cp btw.ts ~/.pi/agent/extensions/btw.ts

Then run /reload in Pi, or restart Pi.

No separate npm install is needed when running inside Pi; the extension uses packages bundled with Pi.

Usage

Ask a side question:

/btw <your question>

Examples:

/btw summarize the current plan
/btw what file did the agent just edit?
/btw explain the error in simpler terms

Configure /btw:

/btw-settings

The settings panel lets you choose:

  • Model
    • Same as main session, or
    • any authenticated/available model from Pi's model registry
  • Reasoning
    • shown only when the selected model advertises reasoning support
  • Max tokens
    • output budget for /btw answers

Settings are saved to:

~/.pi/agent/btw-settings.json

They are also mirrored into the current session as extension state so resumed/forked sessions can restore their saved settings.

Notes

  • If the selected /btw model is unavailable, unauthenticated, rate-limited, or blocked, the overlay shows a friendly provider error with next steps.
  • /btw is designed for quick side answers. It intentionally keeps cache retention internal and fixed to a short-lived cache policy.
  • If the main session is in the middle of an unsafe tool-call state, /btw asks you to wait for the main agent to finish.

Requirements

  • Pi Coding Agent
  • An authenticated model provider for whichever model you select in /btw-settings

About

Ephemeral side questions for Pi Coding Agent — ask /btw without interrupting the main session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors