ApprovalAction
Defined in: react/components/agent/approval-prompt.tsx:29
One action in an approval prompt — a button, an inline dropdown (menu), or a
free-text entry (input). Generic by design: id is whatever string you want
reported back, so prompts aren’t limited to allow/deny.
Properties
Section titled “Properties”
optionalicon?:string
Defined in: react/components/agent/approval-prompt.tsx:35
Leading glyph (e.g. "✓", "✗"). Part of the label.
id:
string
Defined in: react/components/agent/approval-prompt.tsx:31
Reported to onAction when chosen.
input?
Section titled “input?”
optionalinput?:boolean| {placeholder?:string; }
Defined in: react/components/agent/approval-prompt.tsx:49
When set, choosing this action opens an inline text field instead of firing
immediately — for “let me type my own pattern”. On submit, the typed value
is delivered (single mode: onAction(id, value); batch “custom match”: the
value is treated as a glob and onMatch(value) fires). Pass an object to set
the field’s placeholder.
optionalkey?:string
Defined in: react/components/agent/approval-prompt.tsx:37
Single-character keyboard shortcut (case-insensitive).
label:
string
Defined in: react/components/agent/approval-prompt.tsx:33
Button / menu-row text.
optionalmenu?:ApprovalAction[]
Defined in: react/components/agent/approval-prompt.tsx:41
Sub-actions; when present this action renders as a dropdown (▾).
optionaltone?:ApprovalTone
Defined in: react/components/agent/approval-prompt.tsx:39
Colour emphasis. Defaults to "default".