fix: Enhance error handling in AutonomousAgentChainRunner for local search and readNote tool calls (#1956)

This commit is contained in:
Logan Yang 2025-10-23 17:08:04 -07:00 committed by GitHub
parent 3a30b5bae6
commit b4fd925111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -599,15 +599,19 @@ ${params}
}
if (toolCall.name === "localSearch") {
const processed = loopDeps.processLocalSearchResult(result);
collectedSources.push(...processed.sources);
result.result = loopDeps.applyCiCOrderingToLocalSearchResult(
processed.formattedForLLM,
originalUserPrompt || ""
);
result.displayResult = processed.formattedForDisplay;
if (result.success) {
const processed = loopDeps.processLocalSearchResult(result);
collectedSources.push(...processed.sources);
result.result = loopDeps.applyCiCOrderingToLocalSearchResult(
processed.formattedForLLM,
originalUserPrompt || ""
);
result.displayResult = processed.formattedForDisplay;
}
} else if (toolCall.name === "readNote") {
result.displayResult = ToolResultFormatter.format("readNote", result.result);
if (result.success) {
result.displayResult = ToolResultFormatter.format("readNote", result.result);
}
}
toolResults.push(result);