Confirmation
<Confirmation />An agent stopping to ask before it does something it should not do alone.
Run a shell commandNeeds your go-ahead
Install
bash
npx shadcn@latest add https://orbeez-kit.vercel.app/r/confirmation.jsonUsage
tsx
<Confirmation
title="Run a shell command"
scopes={['once', 'session', 'always']}
onApprove={(scope) => run(scope)}
onDeny={skip}
>
rm -rf .next && npm run build
</Confirmation>Good to know
- Moods. Surprised while waiting; sad if denied.
- scopes picks the ways to say yes: 'once', 'session' and 'always'. Left out, there is one Allow button.
- onApprove is told which one was picked. Remembering it, and not asking next time, is up to the app.
- The narrowest yes is always the ink button, so the quickest click is the safest one.