SQLRooms
@sqlrooms/ai / processAgentStream
Function: processAgentStream()
processAgentStream(
agentResult,store,parentToolCallId,abortSignal?):Promise<string>
Processes an agent stream result, consuming chunks and returning the final text.
Parameters
| Parameter | Type | Description |
|---|---|---|
agentResult | AgentStreamResult | The stream result from agent.stream() |
store | AgentStreamStore | The store (used to resolve the owning session) |
parentToolCallId | string | The tool call ID of the parent agent tool |
abortSignal? | AbortSignal | Optional abort signal for cancellation |
Returns
Promise<string>
The final text output from the agent