mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: add finally block for consistent action tracking
This commit is contained in:
parent
3519384f3f
commit
b074ab28a8
@ -377,13 +377,13 @@ async function executeSearchQueries(
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logWarning('serpCluster failed:', { error });
|
logWarning('serpCluster failed:', { error });
|
||||||
|
} finally {
|
||||||
newKnowledge.push({
|
newKnowledge.push({
|
||||||
question: `What do Internet say about "${oldQuery}"?`,
|
question: `What do Internet say about "${oldQuery}"?`,
|
||||||
answer: removeHTMLtags(minResults.map(r => r.description).join('; ')),
|
answer: removeHTMLtags(minResults.map(r => r.description).join('; ')),
|
||||||
type: 'side-info',
|
type: 'side-info',
|
||||||
updated: query.tbs ? formatDateRange(query) : undefined
|
updated: query.tbs ? formatDateRange(query) : undefined
|
||||||
});
|
});
|
||||||
} finally {
|
|
||||||
context.actionTracker.trackAction({
|
context.actionTracker.trackAction({
|
||||||
thisStep: {
|
thisStep: {
|
||||||
action: 'search',
|
action: 'search',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user