@narumitw/pi-btw 0.61.2 → 0.62.0
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 +14 -5
- package/dist/index.ts +1067 -560
- package/dist/index.ts.map +4 -4
- package/docs/core-alignment.md +277 -0
- package/docs/native-appearance.md +857 -0
- package/docs/workflows.md +34 -13
- package/package.json +4 -4
- package/src/btw.ts +152 -108
- package/src/conversation-chrome.ts +93 -0
- package/src/fullscreen-renderer.ts +329 -0
- package/src/fullscreen-ui.ts +109 -315
- package/src/keybindings.ts +100 -22
- package/src/menu.ts +42 -27
- package/src/session-lifetime.ts +66 -0
- package/src/transcript-pager.ts +366 -164
- package/src/workspace-layout.ts +96 -36
package/README.md
CHANGED
|
@@ -10,12 +10,13 @@ Only context you explicitly bring back is loaded into the main editor.
|
|
|
10
10
|
- Starts a side thread immediately with `/btw <question>` or opens the manager with `/btw`.
|
|
11
11
|
- Uses any persisted main-session branch as context without switching branches.
|
|
12
12
|
- Supports scrollable answers, transcript search, a clickable jump-to-latest control, follow-up questions, queued steering, and in-memory resume.
|
|
13
|
-
-
|
|
13
|
+
- Uses Pi's message components, a native-style working editor border, and a compact footer below the editor.
|
|
14
|
+
- Offers fullscreen, side-thread-left, and side-thread-right workspaces with Pi's live main-thread view, mouse or keyboard pane focus, and a draggable remembered divider.
|
|
14
15
|
- Renders supported Mermaid fences as width-safe, themed Unicode diagrams without a browser or network request.
|
|
15
16
|
- Keeps side questions and answers out of the main conversation by default.
|
|
16
17
|
- Brings back the latest answer, a question suffix, an exact range, or the complete thread only when requested.
|
|
17
18
|
- Uses Pi's current model and thinking level or saved pi-btw choices.
|
|
18
|
-
- Offers BTW-only exit, thinking-cycle,
|
|
19
|
+
- Offers BTW-only exit, thinking-cycle, bring-to-main, and pane-switch keybindings.
|
|
19
20
|
|
|
20
21
|
## 📦 Install
|
|
21
22
|
|
|
@@ -116,7 +117,9 @@ Pi-btw does not inherit Pi core's setting of the same name because Pi's public e
|
|
|
116
117
|
`layout` controls the dedicated workspace and defaults to `fullscreen` when omitted.
|
|
117
118
|
Accepted values are `fullscreen`, `left-pane`, and `right-pane`.
|
|
118
119
|
The pane names identify the side thread's position; the other pane reuses Pi's native main-thread rendering at pane width and stays current while BTW is open.
|
|
119
|
-
A single muted divider separates the panes; click either pane to move keyboard focus
|
|
120
|
+
A single muted divider separates the panes; click either pane or use the pane-switch shortcut to move keyboard focus.
|
|
121
|
+
The footer below the editor shows **BTW focus** or **Main focus** and the available switch key.
|
|
122
|
+
It also shows the selected side model and thinking level when space permits; narrow or short views omit optional fields and hints before the active input row.
|
|
120
123
|
Drag the divider with the primary mouse button to resize both panes.
|
|
121
124
|
The side-thread share is limited to 20–80% and saved as `sidePaneRatio` when the button is released, independent of whether the side thread is on the left or right.
|
|
122
125
|
If the save fails, the workspace restores the last saved ratio and reports the error.
|
|
@@ -138,6 +141,7 @@ The literal `/btw settings` remains a side question, not a settings subcommand.
|
|
|
138
141
|
| `exit` | `ctrl+c` | Cancel and leave the dedicated side-thread workspace, including its nested dialogs. |
|
|
139
142
|
| `cycleThinkingLevel` | Inherit Pi's `app.thinking.cycle` | Cycle supported levels while composing or generating. |
|
|
140
143
|
| `bringToMain` | `ctrl+r` | Open the bring-to-main chooser after a completed answer. |
|
|
144
|
+
| `switchPane` | First available `f6`, `f7`, or `f8` | Switch keyboard focus between panes in a split workspace. |
|
|
141
145
|
|
|
142
146
|
For example, merge these overrides into `pi-btw.json`:
|
|
143
147
|
|
|
@@ -159,6 +163,8 @@ Actual availability depends on the terminal; `super` and some modified combinati
|
|
|
159
163
|
New overrides cannot take ordinary typing keys or conflict with BTW actions, Pi editing, selection, search, scrolling, or enabled manual-copy bindings.
|
|
160
164
|
Pi's explicitly configured printable thinking shortcuts remain inherited for compatibility.
|
|
161
165
|
If a saved override becomes conflicting, BTW warns and uses an available default; if none is usable, that shortcut is unavailable and its activation hint is omitted.
|
|
166
|
+
The pane-switch action uses only the first available fallback and does not displace an existing BTW override or inherited Pi thinking shortcut.
|
|
167
|
+
It has no effect in fullscreen-only or collapsed layouts, and background pane switching is blocked while an overlay owns focus.
|
|
162
168
|
An explicitly unbound Pi thinking action stays unbound. Remove an override field to restore its default; neither saving nor resetting modifies Pi's global keybindings.
|
|
163
169
|
**Ctrl+C always remains available as hard cancel**, even after configuring another exit key. Shortcut handling does not interpret bracketed-paste payloads as commands.
|
|
164
170
|
|
|
@@ -176,10 +182,13 @@ The file is read for every `/btw` invocation, so edits apply without `/reload`.
|
|
|
176
182
|
## 🚧 Limitations
|
|
177
183
|
|
|
178
184
|
- `/btw` supports TUI mode only.
|
|
179
|
-
- Only the
|
|
185
|
+
- Only the active pane receives keyboard input; hovering or scrolling over the other pane does not move focus.
|
|
180
186
|
- Resume state is memory-only and lasts only for the current extension instance.
|
|
181
187
|
- A side thread retains the latest 40,000 characters of main-conversation context and adds a truncation notice when earlier content is omitted.
|
|
182
188
|
- Clipboard access depends on Pi's host helper, the operating system, and the terminal.
|
|
189
|
+
- The live workspace still uses a BTW-owned terminal handoff and private host-layout access because Pi has no public workspace-composition API; see the [core-alignment handoff](./docs/core-alignment.md) for tested safeguards, exact limits, and proposed APIs.
|
|
190
|
+
- Pi does not expose all effective renderer options or a public clipboard-read callback. BTW uses native automatic wheel behavior but does not inherit private host wheel overrides or right-click clipboard paste.
|
|
191
|
+
- Conversation appearance follows native defaults, not custom host editor/footer extensions or private padding settings. BTW uses one-cell message padding and zero-cell editor padding; see the [appearance reference and before/after frames](./docs/native-appearance.md).
|
|
183
192
|
- Malformed, unsupported, or oversized Mermaid diagrams remain readable as fenced source; partial parses also show a warning.
|
|
184
193
|
- Pi versions before 0.85 omit the clickable jump-to-latest control.
|
|
185
194
|
|
|
@@ -191,7 +200,7 @@ packages/pi-btw/
|
|
|
191
200
|
│ ├── index.ts # Thin Pi entrypoint
|
|
192
201
|
│ └── btw.ts # Side-thread lifecycle and command
|
|
193
202
|
├── dist/ # Generated Jiti runtime
|
|
194
|
-
├── docs/ #
|
|
203
|
+
├── docs/ # Workflows, appearance evidence, and core-alignment handoff
|
|
195
204
|
├── scripts/build-runtime.mjs # Runtime builder
|
|
196
205
|
└── test/ # Behavior and lifecycle coverage
|
|
197
206
|
```
|