Skip to content

@sqlrooms/ai / updateAgentToolCallData

Function: updateAgentToolCallData()

updateAgentToolCallData(toolEditState, chunk): void

Updates a tool call entry in the provided toolEditState map based on a stream chunk. Used by renderers to track per-tool-call progress.

Parameters

ParameterTypeDescription
toolEditStateMap<string, AgentToolCall>Mutable map of toolCallId to AgentToolCall
chunkUIMessageChunkA UIMessageChunk from the agent stream

Returns

void