From 47b6454696379a04d1755e0cb4d2fd1367065933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 1 Oct 2026 17:54:51 +0800 Subject: [PATCH] =?UTF-8?q?web=5Fsearch=20=E7=9A=84=20maxResults=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E5=9B=9E=E6=98=BE=E6=94=B9=E7=94=A8?= =?UTF-8?q?=20not=5Ftext=5Frepr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - direct_tool_bridge 里 MaxResultsNotInteger.got 由 value.to_string() 换成 not_text_repr(value) - 与 query 的 QueryNotText 一致:不受信回显按 120 字符截断,不再把整段值带进错误消息与序列化 typed error --- .../src-tauri/src/agent/direct_tool_bridge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs index 02dbd36fb..45552b483 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs @@ -3490,7 +3490,7 @@ pub(in crate::agent) fn web_search_input( Some(value) => value .as_u64() .ok_or_else(|| WebSearchError::MaxResultsNotInteger { - got: value.to_string(), + got: not_text_repr(value), max: DIRECT_TOOL_BRIDGE_MAX_SEARCH_RESULTS as u64, })?, };