避免工作流渲染校验重复克隆状态
直接复用联合结果写入后的 State 完成组件校验
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user