edit_image 的派生失败转发内层前缀:补注释说明这是有意为之

- ResourceEdit 继续原样转发 CreateOrDeriveResourceError 的「生成或派生资源失败:…」,不改文案
- 注释写清理由:该路径与 agc_create_or_derive_resource 同源,内层文案指向真实失败环节;调用方身份由运行时错误事件的 code(工具名)承担,不靠前缀区分工具
This commit is contained in:
2026-10-01 17:13:44 +08:00
parent 5b59d50a8c
commit ede3457464
@@ -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(),
}
}