ToolPermissionGate
Inline consent UI for consequential tool calls — send email, charge a card, delete data. Deny is focused by default (safer), Escape denies, Enter approves only when the Allow button is focused. Trusted tools bypass the gate entirely. Severity (low / medium / high) drives the border and accent; high tints the whole card and reveals a destructive-action warning.
Source
src/components/ai/tool-permission-gate.tsxHigh severity (destructive)
severity='high' tints the card danger-red and adds the 'cannot be undone' line. Click the button to open — the gate auto-focuses Deny for safety, so it only mounts on demand.
Medium severity
The default severity — amber-tinted shield icon, no destructive warning line.
Low severity (read-only)
severity='low' uses the neutral lock icon and subtler border — appropriate for read-only calls that still deserve a confirmation step.