From 21dbbb4c3caba5b8295bac6b84206dc0cffbe1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 16 Sep 2026 16:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E8=B5=84=E6=BA=90=E6=A1=A5?= =?UTF-8?q?=E6=8E=A5=E6=B5=8B=E8=AF=95=E7=9A=84=E6=97=A7=20kind=20fixture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将有效分类投影用例的资源 kind 改为 UiDesign 枚举与 ui-design 断言。 移除遗留 ui 字符串 fixture,使 AGC 壳测试恢复编译。 --- .../src-tauri/src/agent/direct_tool_bridge.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs index cc253b332..e05fe4e28 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/direct_tool_bridge.rs @@ -3332,13 +3332,13 @@ mod tests { /// /// UI 栏目走 TS 的 `gameCreationAppAssetCategory`(落盘值 + 按 kind 派生 + 读时自愈), /// Agent 走 Rust 的同构实现 `game_creation_app_asset_effective_category`。直接透传落盘 - /// `category` 会让 `kind:"ui"` 的资产在 UI 显示「UI 交互」、在 Agent 侧读到 - /// `unclassified`——真机 122 条资产里有 55 条这样分叉。 + /// `category` 会让 `ui-design` 的资产在 UI 显示「UI 交互」、在 Agent 侧读到 + /// `unclassified`,两侧分类口径必须一致。 #[test] fn bridge_registered_resource_projects_effective_category_not_raw_persisted_value() { let asset = GameCreationAppAssetManifestEntry { - id: "ui-1".to_string(), - kind: "ui".to_string(), + id: "ui-design-1".to_string(), + kind: GameCreationAppAssetKind::UiDesign, media_type: "application/json".to_string(), local_path: "assets/UI 设计 1.json".to_string(), image_sequence_frames: None, @@ -3361,7 +3361,7 @@ mod tests { }; let projection = bridge_registered_resource(&asset, false); - assert_eq!(projection["kind"], "ui"); + assert_eq!(projection["kind"], "ui-design"); assert_eq!(projection["category"], "ui-interaction"); }