mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
fix: Enhance error handling in AutonomousAgentChainRunner for local search and readNote tool calls (#1956)
This commit is contained in:
parent
3a30b5bae6
commit
b4fd925111
1 changed files with 12 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue