From fabc64df6ca2b275bf0e6072ea809604f83c460d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 5 Sep 2026 13:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=A0=A1=E9=AA=8C=E9=87=8D=E5=A4=8D=E5=85=8B?= =?UTF-8?q?=E9=9A=86=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 直接复用联合结果写入后的 State 完成组件校验 --- .../src-tauri/src/ui_editor/workflow.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/workflow.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/workflow.rs index 7c4bb2352..62945c75a 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/workflow.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/workflow.rs @@ -949,17 +949,14 @@ async fn recognize_page_semantics( page.input.page_id )); } - if !state_has_renderable_component(&crate::ui_editor::state::State { - ui_trees: result.ui_trees.clone(), - ..snapshot.state.clone() - }) { + let mut state = snapshot.state; + state.ui_trees = result.ui_trees; + if !state_has_renderable_component(&state) { return Err(format!( "页面 {} UI 联合识别绑定未形成可渲染组件", page.input.page_id )); } - let mut state = snapshot.state; - state.ui_trees = result.ui_trees; match save_ui_design_state_at(SaveUiDesignStateInput { project_path: root.to_string_lossy().into_owned(), expected_project_id: project_id.to_string(),