Skip to content

Commit bdecafd

Browse files
committed
fix: unit test
1 parent 9e6170d commit bdecafd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/agent/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,8 +2001,8 @@ export class Agent {
20012001
const stepToolResults = steps.flatMap((step) => step.toolResults ?? []);
20022002

20032003
return {
2004-
toolCalls: stepToolCalls.length > 0 ? stepToolCalls : result.toolCalls,
2005-
toolResults: stepToolResults.length > 0 ? stepToolResults : result.toolResults,
2004+
toolCalls: stepToolCalls.length > 0 ? stepToolCalls : (result.toolCalls ?? []),
2005+
toolResults: stepToolResults.length > 0 ? stepToolResults : (result.toolResults ?? []),
20062006
};
20072007
}
20082008

0 commit comments

Comments
 (0)