From ede3457464f9c1b0e3daed739206e09701e887d8 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:13:44 +0800 Subject: [PATCH] =?UTF-8?q?edit=5Fimage=20=E7=9A=84=E6=B4=BE=E7=94=9F?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E8=BD=AC=E5=8F=91=E5=86=85=E5=B1=82=E5=89=8D?= =?UTF-8?q?=E7=BC=80=EF=BC=9A=E8=A1=A5=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E8=BF=99=E6=98=AF=E6=9C=89=E6=84=8F=E4=B8=BA=E4=B9=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ResourceEdit 继续原样转发 CreateOrDeriveResourceError 的「生成或派生资源失败:…」,不改文案 - 注释写清理由:该路径与 agc_create_or_derive_resource 同源,内层文案指向真实失败环节;调用方身份由运行时错误事件的 code(工具名)承担,不靠前缀区分工具 --- .../src-tauri/src/agent/tool/edit_image/error.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/edit_image/error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/edit_image/error.rs index 1425dd0dc..03e09d0bb 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/edit_image/error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/edit_image/error.rs @@ -75,6 +75,10 @@ impl ToolFailure for EditImageError { Self::AssetNameNotText { got } => { format!("编辑图片失败:assetName 必须是字符串,当前是「{got}」。") } + // 派生/生成阶段的失败原样转发内层的「生成或派生资源失败:…」,有意不再叠一层 + // 「编辑图片失败:」:这段路径与 agc_create_or_derive_resource 同源,内层文案指向 + // 真实失败环节;调用方身份由运行时错误事件里的 code(工具名 agc_edit_image)承担, + // 不靠这句前缀区分工具。 Self::ResourceEdit(rejection) => rejection.to_user_msg(), } }