From d370648867de960a35bc9d13163f6ce71ede95f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 18 Sep 2026 16:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=90=88=E5=B9=B6=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=B0=83=E7=94=A8=E7=BC=BA=E5=A4=B1=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20=E6=81=A2=E5=A4=8D=E7=BC=BA=E5=A4=B1=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9A=84=E7=8B=AC=E7=AB=8B=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src-tauri/src/ui_editor/commands/merge.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/merge.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/merge.rs index 2e125ee21..1d44e6d93 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/merge.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/merge.rs @@ -1,7 +1,8 @@ use crate::config::build_game_creator_llm_client_from_llm_config; use crate::config::load_game_creator_app_config; use crate::ui_editor::commands::utils::{ - request_ui_editor_llm, required_tool_arguments, strict_json_schema, + parse_limited_llm_tool_arguments, request_ui_editor_llm, required_tool_call_arguments, + strict_json_schema, }; use crate::ui_editor::state::{State, UITree}; use platform_llm::{LlmFunctionTool, LlmMessage, LlmRunRequest, LlmToolChoice}; @@ -487,7 +488,11 @@ pub(crate) async fn merge_ui_impl_with_provider( app_log!("ui_merge.error stage=llm_request error={error}"); format!("UI 树合并失败:{error}") })?; - let arguments = required_tool_arguments(&response, MERGE_TOOL_NAME).map_err(|error| { + let arguments = required_tool_call_arguments(&response, MERGE_TOOL_NAME).map_err(|error| { + app_log!("ui_merge.error stage=parse_tool_call reason=missing_tool_call error={error}"); + format!("LLM 未返回 {MERGE_TOOL_NAME} 工具调用") + })?; + let arguments = parse_limited_llm_tool_arguments(arguments).map_err(|error| { app_log!("ui_merge.error stage=parse_arguments error={error}"); format!("UI 合并工具参数无效:{error}") })?;