@pi-unipi/btw 3.0.0-alpha.2 → 3.0.0-alpha.21
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.
- package/README.md +13 -56
- package/extensions/btw.ts +403 -1796
- package/package.json +5 -2
- package/skills/btw/SKILL.md +7 -143
package/README.md
CHANGED
|
@@ -1,66 +1,23 @@
|
|
|
1
1
|
# @pi-unipi/btw
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
4
4
|
|
|
5
|
-
|
|
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.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Commands
|
|
10
|
-
|
|
11
|
-
| Command | Description |
|
|
12
|
-
|---------|-------------|
|
|
13
|
-
| `/unipi:btw [--save] <question>` | Ask a question in a side thread |
|
|
14
|
-
| `/unipi:btw-new [question]` | Start a fresh thread with main-session context |
|
|
15
|
-
| `/unipi:btw-tangent [--save] <question>` | Contextless tangent thread |
|
|
16
|
-
| `/unipi:btw-clear` | Dismiss modal and clear thread |
|
|
17
|
-
| `/unipi:btw-inject [instructions]` | Send full thread to main agent |
|
|
18
|
-
| `/unipi:btw-summarize [instructions]` | Summarize thread and inject into main agent |
|
|
19
|
-
|
|
20
|
-
### Keyboard Shortcuts
|
|
7
|
+
## Panel
|
|
21
8
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Examples
|
|
30
|
-
|
|
31
|
-
```text
|
|
32
|
-
/unipi:btw what file defines this route?
|
|
33
|
-
/unipi:btw how would you refactor this parser?
|
|
34
|
-
/unipi:btw --save summarize the last error in one sentence
|
|
35
|
-
/unipi:btw-new let's start a fresh thread about auth
|
|
36
|
-
/unipi:btw-tangent brainstorm from first principles without using the current chat context
|
|
37
|
-
/unipi:btw-inject implement the plan we just discussed
|
|
38
|
-
/unipi:btw-summarize turn that side thread into a short handoff
|
|
9
|
+
```
|
|
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)
|
|
39
15
|
```
|
|
40
16
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
BTW is a standalone package. It doesn't register with other packages or trigger coexists behavior.
|
|
44
|
-
|
|
45
|
-
The BTW overlay opens top-centered so the main session remains visible underneath. The modal uses Pi's TUI system for consistent styling.
|
|
46
|
-
|
|
47
|
-
## How It Works
|
|
48
|
-
|
|
49
|
-
1. `/unipi:btw` creates or reuses a BTW sub-session
|
|
50
|
-
2. Your question runs in a real Pi session with read/search tool access (`read`, `grep`, `find`, `ls`)
|
|
51
|
-
3. The read-only answer streams into the BTW modal overlay
|
|
52
|
-
4. The thread continues until you clear it or inject it back
|
|
53
|
-
|
|
54
|
-
`/unipi:btw-inject` sends the full thread to the main agent as a user message. If Pi is busy, it queues as a follow-up. `/unipi:btw-summarize` does the same but summarizes first.
|
|
55
|
-
|
|
56
|
-
`/unipi:btw-tangent` starts a separate thread that doesn't inherit the main session's conversation context. Use it for unrelated exploration.
|
|
57
|
-
|
|
58
|
-
The `--save` flag saves that single exchange as a visible session note.
|
|
59
|
-
|
|
60
|
-
## Configurables
|
|
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`).
|
|
61
18
|
|
|
62
|
-
|
|
19
|
+
Read-only: `read`, `grep`, `find`, `ls` only — no commands, no file changes. If you want something changed, ask in the main conversation.
|
|
63
20
|
|
|
64
|
-
|
|
21
|
+
Without a UI (print mode), `/unipi:btw <question>` prints the answer via notify.
|
|
65
22
|
|
|
66
|
-
|
|
23
|
+
Based on [pi-btw](https://github.com/Neuron-Mr-White/pi-btw) by Dan Bachelder.
|