omp packages

@diegopetrucci/pi-confirm-destructive0.1.14

A pi extension that confirms destructive session actions.

GitHub Actions Published 7 days ago MIT ~436 downloads/mo

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.

Did it work for you?

Result

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

Reports 0

No reports yet.

Readme

confirm-destructive

A small pi extension that asks for confirmation before destructive session actions.

This is adapted from the original confirm-destructive.ts example in earendil-works/pi and kept basically the same.

What it checks

  • clearing the current session
  • switching sessions when a user message is newer than the last assistant (or a user message with no assistant)
  • forking from an entry

Install

Standalone npm package

pi install npm:@diegopetrucci/pi-confirm-destructive

Collection package

pi install npm:@diegopetrucci/pi-extensions

GitHub package

pi install git:github.com/diegopetrucci/pi-extensions

Then reload pi:

/reload

Notes

  • Hooks session_before_switch and session_before_fork.
  • Cancels the action when the user declines.
  • Does nothing in non-interactive mode.