pi-abort-recall
v1.0.0
Published
Recall your last prompt back to the editor after aborting (Esc)
Downloads
160
Readme
pi-abort-recall
Recall your last prompt back to the editor after aborting — so you can edit and retry without retyping.
Why
When you press Escape to abort an AI response, your original message disappears from the editor. If you wanted to tweak the wording and retry, you have to retype it from scratch.
This extension puts it back automatically.
Install
pi install npm:pi-abort-recallRequires Pi v0.37.0+.
How It Works
- Captures the text content of each user message as it's sent
- When an assistant response ends with
stopReason: "aborted", restores the last user message back to the editor viactx.ui.setEditorText
That's it. No config, no dependencies.
Limitations
- Only restores the most recent user message — earlier messages in a multi-turn conversation are not recoverable.
- Image or file attachments in the original message are not restored, only text content.
License
MIT
