fix(coding-agent): 识别顶层工具错误标记

This commit is contained in:
jiwangyihao
2026-05-13 02:18:56 +02:00
committed by can1357
parent e043125e11
commit 0f73414d3b
2 changed files with 33 additions and 0 deletions
@@ -20,6 +20,9 @@ type ToolValue =
hasError?: boolean;
};
function toolResultHasError(result: AgentToolResult): boolean {
if ((result as { isError?: unknown }).isError === true) {
return true;
}
if (!(result.details && typeof result.details === "object")) {
return false;
}