fix(agent): use output parameter when invoking onToolResult instead of toolCall.result
This commit is contained in:
@@ -142,8 +142,8 @@ export async function runAgent(options: IAgentRunOptions): Promise<IAgentRunResu
|
||||
: undefined,
|
||||
|
||||
experimental_onToolCallFinish: options.onToolResult
|
||||
? ({ toolCall }) => {
|
||||
options.onToolResult!(toolCall.toolName, (toolCall as any).result);
|
||||
? ({ toolCall, output }) => {
|
||||
options.onToolResult!(toolCall.toolName, output);
|
||||
}
|
||||
: undefined,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user