Install
Install with PiG
pig install npm:@diegopetrucci/pi-confirm-destructiveInstall with Pi
pi install npm:@diegopetrucci/pi-confirm-destructiveReview before installing
Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.15 (README.md). PiG does not review it.
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_switchandsession_before_fork. - Cancels the action when the user declines.
- Does nothing in non-interactive mode.