From 940d7b57936424f6c1855126d154edd89d432009 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:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20run-workflow=20=E8=A7=82?= =?UTF-8?q?=E5=AF=9F=E9=87=8C=E8=AF=AF=E7=94=A8=E6=96=87=E6=A1=A3=20revisi?= =?UTF-8?q?on=20=E5=88=A4=E6=96=AD=E6=B8=85=E5=8D=95=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agent/runtime_tools/ui_design_doc.rs 改为在工作流结束后重读项目 revision,与开始前的项目 revision 比较;原先比较的 result.revision 是随文档重置的文档 revision,项目 revision 一超过它就永远判不出清单变化,前端会一直看到旧清单 --- .../src-tauri/src/agent/runtime_tools/ui_design_doc.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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();