@karlis-vagalis/pi-draft-rescue0.3.1
Recover Ctrl+C-cleared drafts with Up, without losing pasted content.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
Draft Rescue
Recover a draft accidentally cleared with Ctrl+C.
- Press ↑ in an empty composer to restore the most recently cleared draft.
- Press ↓ at the end of an unchanged restored draft to dismiss it. ↑ brings it back.
- Edit the restored draft and ↓ returns to normal navigation.
- Other ↑/↓ presses keep Pi's normal cursor movement and history behavior. Custom bindings for those actions work too.
Large pasted blocks are restored as full text, not broken paste markers. Working messages and spinners stay in the composer's top border.
Install
Install the collection from the repository root, or, after the package's first release:
pi install npm:@karlis-vagalis/pi-draft-rescue
Run /reload after changing extensions.
Limits
Only the most recently cleared draft is kept, in memory for the current editor. It is not saved across restarts, reloads, or editor replacement. Restoring does not submit the draft or add it to prompt history.
This extension replaces the composer using Pi's CustomEditor API. Do not
combine it with another extension that replaces the composer; only one can win.
It does not recover clipboard images.