pi-abort-recall
Recall your last prompt back to the editor after aborting (Esc)
Package details
Install pi-abort-recall from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-abort-recall- Package
pi-abort-recall- Version
1.0.0- Published
- Jun 11, 2026
- Downloads
- not available
- Author
- ouzhenkun
- License
- MIT
- Types
- extension
- Size
- 3.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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-recall
Requires 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