@tifan/pi-stash
v0.2.0
Published
Stash one pi draft and restore it after the next message.
Maintainers
Readme
@tifan/pi-stash
Stash one draft, send another message, and return to the draft while pi works.
Install
pi install npm:@tifan/pi-stashKeybinding
pi-stash overrides Pi's built-in Ctrl+S shortcuts. Remap them in $PI_CODING_AGENT_DIR/keybindings.json (default: ~/.pi/agent/keybindings.json), then run /reload:
{
"app.models.save": ["ctrl+shift+s"],
"app.session.toggleSort": ["ctrl+shift+s"]
}Usage
Press Ctrl+S with text in the editor to stash it. Pi clears the editor so you can send another message, then restores the draft as soon as that message is submitted.
Press Ctrl+S again while the editor is empty to restore the draft manually. If the editor contains new text, pi-stash keeps both drafts unchanged and refuses to overwrite either one.
The stash belongs to the current session and survives reloads and restarts. Slash commands and ! shell commands do not consume it.
Release notes
See CHANGELOG.md
