Documentation
Framework
Version
Class References
Function References
Interface References
Type Alias References
Variable References

StreamProcessorEvents

Interface: StreamProcessorEvents

Defined in: stream/processor.ts:51

Events emitted by the StreamProcessor

Properties

onApprovalRequest()?

ts
optional onApprovalRequest: (args) => void;
optional onApprovalRequest: (args) => void;

Defined in: stream/processor.ts:66

Parameters

args
approvalId

string

input

any

toolCallId

string

toolName

string

Returns

void


onError()?

ts
optional onError: (error) => void;
optional onError: (error) => void;

Defined in: stream/processor.ts:58

Parameters

error

Error

Returns

void


onMessagesChange()?

ts
optional onMessagesChange: (messages) => void;
optional onMessagesChange: (messages) => void;

Defined in: stream/processor.ts:53

Parameters

messages

UIMessage[]

Returns

void


onStreamEnd()?

ts
optional onStreamEnd: (message) => void;
optional onStreamEnd: (message) => void;

Defined in: stream/processor.ts:57

Parameters

message

UIMessage

Returns

void


onStreamStart()?

ts
optional onStreamStart: () => void;
optional onStreamStart: () => void;

Defined in: stream/processor.ts:56

Returns

void


onTextUpdate()?

ts
optional onTextUpdate: (messageId, content) => void;
optional onTextUpdate: (messageId, content) => void;

Defined in: stream/processor.ts:74

Parameters

messageId

string

content

string

Returns

void


onThinkingUpdate()?

ts
optional onThinkingUpdate: (messageId, content) => void;
optional onThinkingUpdate: (messageId, content) => void;

Defined in: stream/processor.ts:81

Parameters

messageId

string

content

string

Returns

void


onToolCall()?

ts
optional onToolCall: (args) => void;
optional onToolCall: (args) => void;

Defined in: stream/processor.ts:61

Parameters

args
input

any

toolCallId

string

toolName

string

Returns

void


onToolCallStateChange()?

ts
optional onToolCallStateChange: (messageId, toolCallId, state, args) => void;
optional onToolCallStateChange: (messageId, toolCallId, state, args) => void;

Defined in: stream/processor.ts:75

Parameters

messageId

string

toolCallId

string

state

ToolCallState

args

string

Returns

void