pi-abort-recall

extensionmaintained

Recall your last prompt back to the editor after aborting (Esc)

by — · v1.0.2 · published 1w ago

$ pi install npm:pi-abort-recall
downloads/mo
0
stars
0
last push
1w ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

README

pi-abort-recall

Recall your last prompt back to the editor after aborting — so you can edit and retry without retyping.

npm version License: MIT

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

  1. Captures the text content of each user message as it's sent
  2. When an assistant response ends with stopReason: "aborted", restores the last user message back to the editor via ctx.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