From 5c91d5b4addfeb25481fe92a89971ced0f9b0b60 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Sat, 22 Feb 2025 19:39:41 +0800 Subject: [PATCH] fix: add all urls as the last event --- src/agent.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/agent.ts b/src/agent.ts index 64c946f..517a315 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -799,7 +799,11 @@ But unfortunately, you failed to solve the issue. You need to think out of the b console.log(thisStep) await storeContext(system, schema, [allContext, allKeywords, allQuestions, allKnowledge], totalStep); - return {result: thisStep, context, visitedURLs: [...visitedURLs, ...Object.keys(allURLs)]}; + return { + result: thisStep, + context, + visitedURLs: [...new Set([...visitedURLs, ...Object.keys(allURLs)])] + }; }