ApprovalPrompt
ApprovalPrompt(
__namedParameters):ReactElement
Defined in: react/components/agent/approval-prompt.tsx:163
An approval gate for agent tool calls. Single mode shows a prompt, an optional
detail body, and a row of action buttons (each with an icon + hotkey; an
action with sub-actions becomes an inline ▾ dropdown, and an input action
opens a field so the user can type their own pattern). Batch mode — pass
calls — lists every requested call with a clickable allow/deny toggle, plus
Allow-all / Deny-all / Allow-matching (incl. a custom glob) / Apply.
Buttons are click- and Tab-focusable (Enter/Space activates); single-key
shortcuts and Esc fire while focus is anywhere in the prompt (a modal gate:
it captures keys so they don’t leak to the app behind it). Layout is tight —
no blank rows — so it stays cheap on terminal real estate.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”ReactElement