Confirmation
Markdown for agentsHuman-in-the-loop approval gate for agent actions. Pauses tool execution until the user approves or rejects — the standard pattern for destructive operations.
npx slipstream-ui@latest add confirmationApproval gate
Delete all files in /tmp?
PendingThis affects 14 files and cannot be undone.
delete_files
Decisions so far: none
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Summary of the action requiring approval. |
| description | string | — | Detail: affected resource or risk note. |
| toolName | string | — | Tool name shown as mono text. |
| status | 'pending' | 'approved' | 'rejected' | 'pending' | Controlled outcome; omit for uncontrolled. |
| onApprove | () => void | — | Called on approval. |
| onReject | () => void | — | Called on rejection. |
| labels | object | — | Label overrides for localization. |
Accessibility
- Pending state renders role=alertdialog labeled by the title.
- Outcome chip announces Approved/Rejected.
- Never auto-approve on timeout — keep waiting or fail explicitly.