@yusukeshib/pi-stash 0.3.0 → 0.3.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 +2 -2
- package/extensions/index.ts +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,9 +56,9 @@ pi install npm:@yusukeshib/pi-stash
|
|
|
56
56
|
|
|
57
57
|
| Key | Action |
|
|
58
58
|
|-----|--------|
|
|
59
|
-
| `
|
|
59
|
+
| `Alt+S` | If the editor has text, **push** it onto the stash and clear the editor. If the editor is empty, **pop** a saved entry into it. |
|
|
60
60
|
|
|
61
|
-
`
|
|
61
|
+
`Alt+S` is the one-key way to do what `/stash` does: park the prompt you're
|
|
62
62
|
halfway through typing, or pull one back — without typing the command. Rebind it
|
|
63
63
|
in `~/.pi/agent/keybindings.json` if it clashes with another shortcut.
|
|
64
64
|
|
package/extensions/index.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* /stash-clear Delete every entry (with confirm).
|
|
14
14
|
*
|
|
15
15
|
* Shortcut:
|
|
16
|
-
*
|
|
16
|
+
* Alt+S If the editor holds text, push it onto the stash (and clear
|
|
17
17
|
* the editor); otherwise pop a saved entry into the editor.
|
|
18
18
|
* A one-key way to park the prompt you're typing, or pull one
|
|
19
19
|
* back, without typing `/stash`.
|
|
@@ -80,7 +80,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* Core stash behaviour shared by the `/stash` command and the
|
|
83
|
+
* Core stash behaviour shared by the `/stash` command and the Alt+S
|
|
84
84
|
* shortcut. With text → push; without text → pop into the editor.
|
|
85
85
|
*/
|
|
86
86
|
async function runStash(rawText: string, ctx: ExtensionContext): Promise<void> {
|
|
@@ -128,9 +128,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
128
128
|
},
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
//
|
|
131
|
+
// Alt+S → same as bare `/stash`: pop an entry into the editor. If the
|
|
132
132
|
// editor already holds text, push it onto the stash instead.
|
|
133
|
-
pi.registerShortcut("
|
|
133
|
+
pi.registerShortcut("alt+s", {
|
|
134
134
|
description: "Stash: push editor text, or pop a saved prompt",
|
|
135
135
|
handler: async (ctx) => {
|
|
136
136
|
const editorText = (ctx.ui.getEditorText() ?? "").trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yusukeshib/pi-stash",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A personal stash of reusable prompt fragments for the Pi coding agent. Push prompts you think of mid-task, then pop them into the editor when you need them.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|