@pi-unipi/btw 3.0.0-alpha.21 → 3.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +59 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,23 +1,69 @@
1
- # @pi-unipi/btw
1
+ # BTW
2
2
 
3
- `/unipi:btw [question]` opens an inline panel over the input area for a quick side question — the main agent keeps running and never sees any of it.
3
+ Ask a side question while the main agent works, without adding it to the main conversation.
4
4
 
5
- Each question runs in a fresh read-only pi session seeded from the main session's current branch (including in-progress tool calls). There is **no memory between btw questions** — earlier Q&As are not fed back. Page history lives only for the pi session and is cleared on new/resume/tree navigation. Nothing is written to the main session.
5
+ `@pi-unipi/btw` · part of [UniPi](../../README.md)
6
6
 
7
- ## Panel
7
+ ## What it does
8
8
 
9
+ - Opens a panel in place of the input box. The main agent continues to run.
10
+ - Answers each question in a new, read-only session. This session starts with a copy of the main conversation, with tool calls that are in progress.
11
+ - Gives the side session four tools only: `read`, `grep`, `find` and `ls`. It cannot run commands or change files.
12
+ - Uses the model and the thinking level of the main session.
13
+ - Writes nothing to the main session. The main agent never sees the question or the answer.
14
+ - Keeps no memory between questions. Each question starts again from the main conversation.
15
+
16
+ ## Quick start
17
+
18
+ UniPi installs this package:
19
+
20
+ ```bash
21
+ pi install npm:@pi-unipi/unipi
9
22
  ```
10
- ❭ <question> your question
11
- … / ✓ tool lines read-only tools only (read, grep, find, ls)
12
- Thinking.. while waiting
13
- answer rendered as markdown
14
- ❭ Ask a /btw… input (locked while streaming)
23
+
24
+ To install this package alone:
25
+
26
+ ```bash
27
+ pi install npm:@pi-unipi/btw
15
28
  ```
16
29
 
17
- - `Enter` ask · `↑`/`↓` (empty input) page earlier Q&As · `PgUp`/`PgDn` scroll long answers · `Ctrl+C` cancel the answer · `Esc` back to the chat (a streaming answer keeps running into history; reopen with `/unipi:btw`).
30
+ Then ask a question:
31
+
32
+ ```text
33
+ /unipi:btw what does the retry loop in client.ts do?
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | Command | What it does |
39
+ |---|---|
40
+ | `/unipi:btw [question]` | Opens the panel. If you give a question, the panel starts to answer it. |
41
+
42
+ In print mode (no UI), `/unipi:btw <question>` shows the answer as a notification. A question is necessary in this mode.
43
+
44
+ ## Panel keys
45
+
46
+ | Key | What it does |
47
+ |---|---|
48
+ | `Enter` | Asks the question in the input. It does nothing while an answer streams. |
49
+ | `↑` / `↓` | Shows an earlier or later question and answer. Works when the input is empty. |
50
+ | `PgUp` / `PgDn` | Scrolls a long answer. |
51
+ | `Ctrl+C` | Stops the answer that streams. If no answer streams, it closes the panel. |
52
+ | `Esc` | Closes the panel. An answer that streams continues and goes into the history. |
53
+
54
+ Run `/unipi:btw` again to open the history. Only one answer can stream at a time.
55
+
56
+ ## How it works
57
+
58
+ The panel shows each question, a line for each tool call, and the answer as markdown. The history stays in memory for the Pi session only. BTW clears it when a session starts or resumes, and when you move in the session tree.
59
+
60
+ If you want a change to your files, ask in the main conversation.
61
+
62
+ Older sessions can contain `btw-note` messages from an earlier BTW version. BTW still shows these messages and hides them from the model.
18
63
 
19
- Read-only: `read`, `grep`, `find`, `ls` only — no commands, no file changes. If you want something changed, ask in the main conversation.
64
+ BTW comes from [pi-btw](https://github.com/Neuron-Mr-White/pi-btw) by Dan Bachelder.
20
65
 
21
- Without a UI (print mode), `/unipi:btw <question>` prints the answer via notify.
66
+ ## See also
22
67
 
23
- Based on [pi-btw](https://github.com/Neuron-Mr-White/pi-btw) by Dan Bachelder.
68
+ - [Ask User](../ask-user/README.md)
69
+ - [Commands reference](../../docs/reference/commands.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/btw",
3
- "version": "3.0.0-alpha.21",
3
+ "version": "3.0.0-alpha.22",
4
4
  "description": "A pi extension for parallel side conversations with /unipi:btw — part of the Unipi suite",
5
5
  "type": "module",
6
6
  "main": "extensions/btw.ts",
@@ -37,7 +37,7 @@
37
37
  "@earendil-works/pi-tui": "^0.87.1"
38
38
  },
39
39
  "dependencies": {
40
- "@pi-unipi/core": "3.0.0-alpha.21"
40
+ "@pi-unipi/core": "3.0.0-alpha.22"
41
41
  },
42
42
  "pi": {
43
43
  "extensions": [