diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools/ui_design_doc.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools/ui_design_doc.rs index 646de29d8..423d63859 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools/ui_design_doc.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools/ui_design_doc.rs @@ -103,7 +103,14 @@ pub(in crate::agent) async fn observe_agent_runtime_ui_design_doc_run_workflow( .await { Ok(result) => { - if revision_before.is_none_or(|before| result.revision > before) { + // result.revision 是文档自己的 revision(随文档重置),和项目 revision 不是同一个计数器; + // 重新读一次项目 revision,才能判断本次工作流是否真的推进了清单。 + let revision_after = read_game_creator_agent_runtime_project_revision(root) + .ok() + .map(|snapshot| snapshot.revision); + if revision_before + .is_none_or(|before| revision_after.is_none_or(|after| after > before)) + { emit_game_creator_manifest_invalidated(root, tool); } let pending = result.backfill_errors.len();