fix(coding-agent): 识别顶层工具错误标记
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user