@pi-unipi/btw 0.1.8 → 0.1.10
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 +32 -61
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
# @pi-unipi/btw
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Side conversations that run in parallel. Ask a question using `/btw` while the main agent keeps working — the answer streams into a modal overlay without interrupting the current task.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
BTW opens a real Pi sub-session with coding-tool access. Use it to clarify something, explore an idea, or think through next steps without derailing the main turn. When you're ready, inject the thread back or summarize it.
|
|
6
6
|
|
|
7
7
|
Based on [pi-btw](https://github.com/Neuron-Mr-White/pi-btw) by Dan Bachelder.
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
As part of the full Unipi suite:
|
|
9
|
+
## Commands
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
| Command | Description |
|
|
12
|
+
|---------|-------------|
|
|
13
|
+
| `/btw [--save] <question>` | Ask a question in a side thread |
|
|
14
|
+
| `/btw:new [question]` | Start a fresh thread with main-session context |
|
|
15
|
+
| `/btw:tangent [--save] <question>` | Contextless tangent thread |
|
|
16
|
+
| `/btw:clear` | Dismiss modal and clear thread |
|
|
17
|
+
| `/btw:inject [instructions]` | Send full thread to main agent |
|
|
18
|
+
| `/btw:summarize [instructions]` | Summarize thread and inject into main agent |
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
### Keyboard Shortcuts
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
| Key | Action |
|
|
23
|
+
|-----|--------|
|
|
24
|
+
| `Alt+/` | Toggle focus between BTW and main editor |
|
|
25
|
+
| `Ctrl+Alt+W` | Fallback focus toggle |
|
|
26
|
+
| `Esc` | Dismiss BTW overlay |
|
|
27
|
+
| `PgUp`/`PgDn` | Scroll transcript |
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
### Examples
|
|
24
30
|
|
|
25
31
|
```text
|
|
26
32
|
/btw what file defines this route?
|
|
@@ -30,65 +36,30 @@ pi install npm:@pi-unipi/btw
|
|
|
30
36
|
/btw:tangent brainstorm from first principles without using the current chat context
|
|
31
37
|
/btw:inject implement the plan we just discussed
|
|
32
38
|
/btw:summarize turn that side thread into a short handoff
|
|
33
|
-
/btw:clear
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
### /btw [--save] <question>
|
|
39
|
-
|
|
40
|
-
- runs right away, works while pi is busy
|
|
41
|
-
- creates or reuses a real BTW sub-session
|
|
42
|
-
- continues the current BTW thread
|
|
43
|
-
- opens a focused BTW modal shell
|
|
44
|
-
- streams into the BTW modal transcript/status surface
|
|
45
|
-
- persists the BTW exchange as hidden thread state
|
|
46
|
-
- with `--save`, also saves that single exchange as a visible session note
|
|
47
|
-
|
|
48
|
-
### /btw:new [question]
|
|
49
|
-
|
|
50
|
-
- clears the current BTW thread
|
|
51
|
-
- starts a fresh thread that still inherits the current main-session context
|
|
52
|
-
- optionally asks the first question in the new thread immediately
|
|
53
|
-
|
|
54
|
-
### /btw:tangent [--save] <question>
|
|
55
|
-
|
|
56
|
-
- starts or continues a contextless tangent thread
|
|
57
|
-
- does not inherit the current main-session conversation
|
|
58
|
-
- with `--save`, also saves that single exchange as a visible session note
|
|
59
|
-
|
|
60
|
-
### /btw:clear
|
|
61
|
-
|
|
62
|
-
- dismisses the BTW modal/widget
|
|
63
|
-
- clears the current BTW thread
|
|
41
|
+
## Special Triggers
|
|
64
42
|
|
|
65
|
-
|
|
43
|
+
BTW is a standalone package. It doesn't register with other packages or trigger coexists behavior.
|
|
66
44
|
|
|
67
|
-
-
|
|
68
|
-
- if pi is busy, queues it as a follow-up
|
|
69
|
-
- clears the BTW thread after sending
|
|
45
|
+
The BTW overlay opens top-centered so the main session remains visible underneath. The modal uses Pi's TUI system for consistent styling.
|
|
70
46
|
|
|
71
|
-
|
|
47
|
+
## How It Works
|
|
72
48
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
49
|
+
1. `/btw` creates or reuses a BTW sub-session
|
|
50
|
+
2. Your question runs in a real Pi session with tool access
|
|
51
|
+
3. The answer streams into the BTW modal overlay
|
|
52
|
+
4. The thread continues until you clear it or inject it back
|
|
76
53
|
|
|
77
|
-
|
|
54
|
+
`/btw:inject` sends the full thread to the main agent as a user message. If Pi is busy, it queues as a follow-up. `/btw:summarize` does the same but summarizes first.
|
|
78
55
|
|
|
79
|
-
|
|
80
|
-
- `Ctrl+Alt+W` is a fallback focus toggle for terminals that do not deliver `Alt+/` as a usable shortcut
|
|
81
|
-
- `Esc` still dismisses BTW immediately while the overlay is focused
|
|
82
|
-
- `PgUp`/`PgDn` scrolls the transcript
|
|
83
|
-
- BTW opens top-centered so the main session remains visible underneath
|
|
56
|
+
`/btw:tangent` starts a separate thread that doesn't inherit the main session's conversation context. Use it for unrelated exploration.
|
|
84
57
|
|
|
85
|
-
|
|
58
|
+
The `--save` flag saves that single exchange as a visible session note.
|
|
86
59
|
|
|
87
|
-
|
|
60
|
+
## Configurables
|
|
88
61
|
|
|
89
|
-
|
|
90
|
-
- think through next steps without derailing the current turn
|
|
91
|
-
- explore an idea, then inject it back once it's ready
|
|
62
|
+
BTW has no configuration. Thread state is session-scoped and clears when you dismiss it.
|
|
92
63
|
|
|
93
64
|
## License
|
|
94
65
|
|