pi-fast-resume 1.0.0 → 1.0.2

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 (3) hide show
  1. package/README.md +15 -3
  2. package/fast-resume.ts +11 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -72,6 +72,12 @@ Tested with **1,771 sessions, 1.46 GB** of JSONL data on disk.
72
72
  pi install https://github.com/monotykamary/pi-fast-resume
73
73
  ```
74
74
 
75
+ **With npm**:
76
+
77
+ ```bash
78
+ npm install pi-fast-resume
79
+ ```
80
+
75
81
  **Manual** — add to `~/.pi/agent/settings.json`:
76
82
 
77
83
  ```json
@@ -101,9 +107,15 @@ Reload with `/reload` after any install method.
101
107
 
102
108
  ### Keyboard shortcut
103
109
 
104
- | Shortcut | Action |
105
- | -------------- | --------------------------- |
106
- | `Ctrl+Shift+F` | Open the fast resume picker |
110
+ In hijack mode (default), the fast picker replaces `/resume` — so bind `app.session.resume` in `~/.pi/agent/keybindings.json`:
111
+
112
+ ```json
113
+ {
114
+ "app.session.resume": "alt+u"
115
+ }
116
+ ```
117
+
118
+ See [keybindings.md](https://github.com/earendil-works/pi-coding-agent/blob/main/docs/keybindings.md) for the key format and all available actions.
107
119
 
108
120
  ### Picker controls
109
121
 
package/fast-resume.ts CHANGED
@@ -9,9 +9,11 @@
9
9
  *
10
10
  * Usage:
11
11
  * /fast-resume [query] Open fast session picker (current project scope)
12
- * Ctrl+Shift+F Open fast session picker via shortcut
13
12
  *
14
- * Hijack mode (on by default, opt-out via ~/.pi/agent/extensions/pi-fast-resume.json):
13
+ * Config (~/.pi/agent/extensions/pi-fast-resume.json):
14
+ * { "hijackResume": false }
15
+ *
16
+ * Hijack mode (on by default, opt-out via config):
15
17
  * { "hijackResume": false }
16
18
  *
17
19
  * When enabled, /resume and Ctrl+Shift+R open the fast picker instead.
@@ -54,7 +56,6 @@ import {
54
56
  type Component,
55
57
  getKeybindings,
56
58
  Input,
57
- Key,
58
59
  Spacer,
59
60
  Text,
60
61
  truncateToWidth,
@@ -92,7 +93,7 @@ import type { PickerScope } from "./src/picker-state.js";
92
93
  const HOME = homedir();
93
94
 
94
95
  // Config — read from ~/.pi/agent/extensions/pi-fast-resume.json
95
- // Example: { "hijackResume": false } to disable hijack
96
+ // Example: { "hijackResume": false }
96
97
  // By default hijackResume is true — /resume opens the fast picker
97
98
  interface FastResumeConfig {
98
99
  hijackResume?: boolean;
@@ -1056,12 +1057,12 @@ export default function (pi: ExtensionAPI) {
1056
1057
  });
1057
1058
  }
1058
1059
 
1059
- pi.registerShortcut(Key.ctrlShift("f"), {
1060
- description: hijackResume ? "Open fast session resume (also /resume)" : "Open fast session resume picker",
1061
- handler: async (ctx) => {
1062
- await showFastResumePicker(ctx as unknown as ExtensionCommandContext);
1063
- },
1064
- });
1060
+ // No extension shortcut — pi's registerShortcut only provides
1061
+ // ExtensionContext (no switchSession), so the handler can't switch
1062
+ // sessions. Instead, rebind app.session.resume in keybindings.json:
1063
+ // { "app.session.resume": "alt+u" }
1064
+ // In hijack mode (default), that key opens the fast picker.
1065
+ // In non-hijack mode, type /fast-resume.
1065
1066
 
1066
1067
  // Clean up the prototype patch on session shutdown (reload, quit, session switch)
1067
1068
  pi.on("session_shutdown", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-fast-resume",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Fast session picker for pi — reads headers + first messages from 16KB partial reads instead of full-file parsing",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",