From d082c5ab155c7a490dca7796a38fcb24de99cfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 24 Sep 2026 15:46:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E4=BA=BA=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E7=9A=84=20required=5Ftool=5Farguments=20=E7=BB=84?= =?UTF-8?q?=E5=90=88=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ui_editor/commands/utils.rs 去掉只做「找工具调用 + 解析参数」拼接的封装,识别与切分调用点都自带日志与错误映射,没有消费方 --- .../src-tauri/src/ui_editor/commands/utils.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/utils.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/utils.rs index f5d876e2f..990458054 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/utils.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/utils.rs @@ -95,17 +95,6 @@ pub(crate) fn parse_limited_llm_tool_arguments( serde_json::from_str(arguments).map_err(|error| format!("LLM 工具参数不是有效 JSON:{error}")) } -/// Stable structured-action adapter: locate the required tool call and parse its -/// bounded JSON arguments. Prompt, schema and materialization stay in each -/// operation-specific command. -pub(crate) fn required_tool_arguments( - response: &LlmRunResponse, - tool_name: &str, -) -> Result { - let arguments = required_tool_call_arguments(response, tool_name)?; - parse_limited_llm_tool_arguments(arguments) -} - pub(crate) fn required_tool_call_arguments<'a>( response: &'a LlmRunResponse, tool_name: &str,