fix(搜索工具): 添加错误日志记录以帮助调试

在搜索工具执行过程中发生错误时,现在会记录详细的错误信息(包括消息、堆栈、名称、时间戳和原始参数)到控制台,便于后续问题排查
This commit is contained in:
YAYOI27
2025-08-26 11:37:40 +08:00
committed by YAYOI27
parent 13d8537af0
commit 294b587471

View File

@@ -133,6 +133,13 @@ export async function executeSearchTool(args: unknown, httpClient: HttpClient):
}
if (error instanceof Error) {
console.error('搜索过程中发生错误:', {
message: error.message,
stack: error.stack,
name: error.name,
timestamp: new Date().toISOString(),
originalArgs: args
});
throw error;
}