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"); }