From c844f857efda0808b797fec9dd384f6607878ef4 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:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E9=98=B6=E6=AE=B5=E8=A1=A5?= =?UTF-8?q?=E4=B8=8A=20ui-design-doc.from-images=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=9B=BE=E8=B7=AF=E5=BE=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tool_plan_handoff/content_validation.rs 为 from-images 的 images[].path 逐项做绝对路径与逃逸判据,恢复退役工作流工具留出的早检位 --- .../src/tool_plan_handoff/content_validation.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/ai-game-creator-shell/src-tauri/src/tool_plan_handoff/content_validation.rs b/apps/ai-game-creator-shell/src-tauri/src/tool_plan_handoff/content_validation.rs index e394b920e..246a01bf6 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/tool_plan_handoff/content_validation.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/tool_plan_handoff/content_validation.rs @@ -423,6 +423,15 @@ fn collect_native_tool_absolute_path_findings( findings, ); } + "ui-design-doc.from-images" => { + // 设计图可以给项目内相对路径,交接阶段先按同一套判据拒绝绝对路径逃逸。 + if let Some(images) = input.get("images").and_then(serde_json::Value::as_array) { + for (index, image) in images.iter().enumerate() { + let pointer = format!("{input_pointer}/images/{index}/path"); + collect_native_string_field(root, image, "path", &pointer, findings); + } + } + } "task.create" => { collect_native_string_array_field( root,