We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6170d commit bdecafdCopy full SHA for bdecafd
packages/core/src/agent/agent.ts
@@ -2001,8 +2001,8 @@ export class Agent {
2001
const stepToolResults = steps.flatMap((step) => step.toolResults ?? []);
2002
2003
return {
2004
- toolCalls: stepToolCalls.length > 0 ? stepToolCalls : result.toolCalls,
2005
- toolResults: stepToolResults.length > 0 ? stepToolResults : result.toolResults,
+ toolCalls: stepToolCalls.length > 0 ? stepToolCalls : (result.toolCalls ?? []),
+ toolResults: stepToolResults.length > 0 ? stepToolResults : (result.toolResults ?? []),
2006
};
2007
}
2008
0 commit comments