Skip to content

Commit 8585098

Browse files
committed
cleanup the tests
1 parent 6cae864 commit 8585098

File tree

2 files changed

+82
-424
lines changed

2 files changed

+82
-424
lines changed

packages/agents/src/ai-react.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,13 @@ export function useAgentChat<
11401140
}
11411141
return newMap;
11421142
});
1143+
1144+
// Also cleanup processedToolCalls to prevent issues in long conversations
1145+
for (const toolCallId of processedToolCalls.current) {
1146+
if (!currentToolCallIds.has(toolCallId)) {
1147+
processedToolCalls.current.delete(toolCallId);
1148+
}
1149+
}
11431150
// eslint-disable-next-line react-hooks/exhaustive-deps
11441151
}, [useChatHelpers.messages]);
11451152

0 commit comments

Comments
 (0)