Skip to content

Commit b074ab2

Browse files
committed
fix: add finally block for consistent action tracking
1 parent 3519384 commit b074ab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ async function executeSearchQueries(
377377
});
378378
} catch (error) {
379379
logWarning('serpCluster failed:', { error });
380+
} finally {
380381
newKnowledge.push({
381382
question: `What do Internet say about "${oldQuery}"?`,
382383
answer: removeHTMLtags(minResults.map(r => r.description).join('; ')),
383384
type: 'side-info',
384385
updated: query.tbs ? formatDateRange(query) : undefined
385386
});
386-
} finally {
387387
context.actionTracker.trackAction({
388388
thisStep: {
389389
action: 'search',

0 commit comments

Comments
 (0)