omp packages

@siuver/omp-confirm-interrupt0.1.0

oh-my-pi extension that asks for confirmation before Esc interrupts a running agent response.

siuver Published 2 months ago MIT ~17 downloads/mo

Built for omp

The author tagged this package oh-my-pi.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

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-interrupt

Behavior

  • 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 /btw or /omfg side-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-interrupt

Restart omp after linking.

Changelog

See CHANGELOG.md for release notes included in the npm package.

License

MIT