From 75e3152412300eaea529282c7f3e3c9609c68c81 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:52:38 +0800 Subject: [PATCH] =?UTF-8?q?agc=5Fgenerate=5Fimage=20=E7=9A=84=20kind=20?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=B3=95=E6=97=B6=E5=9B=9E=E6=98=BE=E6=88=AA?= =?UTF-8?q?=E5=88=B0=20120=20=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - KindUnsupported 的 got 原来把整段 kind 原样带进文案与序列化错误;这条路径没有长度校验,与上方 KindNotText 的 not_text_repr 口径也不一致 - 改用 bounded_echo(kind),与其它不受信回显同一上限;仍保留开头的原值,模型能看出自己传了什么 验证:cargo fmt --check 通过 --- .../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 05c82125c..02dbd36fb 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 @@ -2925,7 +2925,7 @@ fn bridge_image_generation_kind( }; normalize_platform_art_asset_generation_kind(kind).ok_or_else(|| { GenerateImageError::KindUnsupported { - got: kind.to_string(), + got: bounded_echo(kind), } }) }