Skip to main content

Interface: PendingApproval

Defined in: react/src/hooks/useChat.ts:15

Pending tool approval request (event-driven / resumable).

Derived from tool_call segments with status awaiting_approval. There is no held Promise — the turn has fully returned. Call respondToToolApprovals() with a decision for every pending id to resume.

Properties

approvalId

approvalId: string

Defined in: react/src/hooks/useChat.ts:17

AI SDK approval id — echoed back in the resume call to match the request.


toolCall

toolCall: object

Defined in: react/src/hooks/useChat.ts:19

The tool call that needs approval

arguments

arguments: unknown

id

id: string

name

name: string


toolDefinition?

optional toolDefinition?: ZodToolDefinition<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, unknown>

Defined in: react/src/hooks/useChat.ts:25

The tool definition, when resolvable from local tools.