@siuver/omp-confirm-interrupt
v0.1.0
Published
oh-my-pi extension that asks for confirmation before Esc interrupts a running agent response.
Maintainers
Readme
@siuver/omp-confirm-interrupt
An oh-my-pi extension that asks for confirmation before the Esc key interrupts a running agent response.
Install
omp plugin install @siuver/omp-confirm-interruptBehavior
- While a message is running, pressing Esc in the main editor shows a
confirmation dialog instead of interrupting immediately:
- Yes interrupts the running response.
- No cancels the interrupt and notifies you that the response is still active.
- If the running message already finished by the time you confirm, you get a notice instead of an abort.
Exceptions: when Esc is not intercepted
The guard only intercepts Esc when the plain main-session editor holds focus. In every other state, Esc falls through to the host untouched:
- Selectors / overlays / dialogs (e.g.
/extensions): Esc keeps its native behavior of closing the focused overlay instead of popping the interrupt confirmation. - Autocomplete: if the editor's autocomplete popup is open, Esc closes that first.
- Subagent view: while a subagent's live session is focused (dimmed editor), Esc returns to the main session.
- Side panels: while a
/btwor/omfgside-answer panel is active, Esc closes that panel first.
If the TUI focus state cannot be probed, the guard disables itself rather than risk swallowing Esc from an overlay.
Local Development
From the repository root:
omp plugin link ./plugins/confirm-interruptRestart omp after linking.
Changelog
See CHANGELOG.md for release notes included in the npm package.
License
MIT
