@narumitw/pi-btw 0.57.1 → 0.58.1

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 CHANGED
@@ -13,6 +13,7 @@ Only context you explicitly bring back is loaded into the main editor.
13
13
  - Keeps side questions and answers out of the main conversation by default.
14
14
  - Brings back the latest answer, a question suffix, an exact range, or the complete thread only when requested.
15
15
  - Uses Pi's current model and thinking level or saved pi-btw choices.
16
+ - Offers BTW-only exit, thinking-cycle, and bring-to-main keybindings.
16
17
 
17
18
  ## 📦 Install
18
19
 
@@ -103,6 +104,44 @@ A failed Settings-screen save instead restores the previous displayed value.
103
104
  Turn **Copy selection automatically** off to retain highlighted selections and copy them with Pi's effective `app.message.copy` binding.
104
105
  Pi-btw does not inherit Pi core's setting of the same name because Pi's public extension API does not expose its effective value.
105
106
 
107
+ ### Keybindings
108
+
109
+ Open `/btw` → **Settings**, select a shortcut row, then choose **Edit key combination…** or **Restore default**.
110
+ Type a key name such as `ctrl+q` or `f6`; this is not a key-recording prompt.
111
+ Changes save immediately and apply when opening or resuming BTW, without `/reload`. Escape cancels an unfinished edit, not earlier saves.
112
+ The literal `/btw settings` remains a side question, not a settings subcommand.
113
+
114
+ | JSON field under `keybindings` | Default | Action |
115
+ | --- | --- | --- |
116
+ | `exit` | `ctrl+c` | Cancel and leave the dedicated side-thread workspace, including its nested dialogs. |
117
+ | `cycleThinkingLevel` | Inherit Pi's `app.thinking.cycle` | Cycle supported levels while composing or generating. |
118
+ | `bringToMain` | `ctrl+r` | Open the bring-to-main chooser after a completed answer. |
119
+
120
+ For example, merge these overrides into `pi-btw.json`:
121
+
122
+ ```json
123
+ {
124
+ "keybindings": {
125
+ "exit": "ctrl+q",
126
+ "cycleThinkingLevel": "f6",
127
+ "bringToMain": "f7"
128
+ }
129
+ }
130
+ ```
131
+
132
+ Each override accepts one Pi key name with optional `ctrl`, `shift`, `alt`, and `super` modifiers; modifier order and letter case do not matter.
133
+ Letters, digits, Pi special keys and symbols are recognized, except the literal `+`, which Pi's matcher cannot parse as a base key.
134
+ Function keys `f1`–`f12` and Escape accept no modifiers; Clear accepts only no modifier, Shift, or Ctrl.
135
+ Actual availability depends on the terminal; `super` and some modified combinations require extended keyboard reporting.
136
+
137
+ New overrides cannot take ordinary typing keys or conflict with BTW actions, Pi editing, selection, search, scrolling, or enabled manual-copy bindings.
138
+ Pi's explicitly configured printable thinking shortcuts remain inherited for compatibility.
139
+ 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.
140
+ 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.
141
+ **Ctrl+C always remains available as hard cancel**, even after configuring another exit key. Shortcut handling does not interpret bracketed-paste payloads as commands.
142
+
143
+ ### Persistence
144
+
106
145
  Reading a missing settings file has no side effects.
107
146
  Pi-btw creates it only after a Settings change or a remembered shortcut change.
108
147
  Within one Pi process, saves run in order and publish atomically through a same-directory temporary file and rename.