From e2689b4be52acc8bd15c4ada3495ba8d04f43964 Mon Sep 17 00:00:00 2001 From: suzmii Date: Sun, 30 Aug 2026 14:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=85=8D=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=E5=9B=9E=E5=BD=92=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除已不再存在的前端 Agent 推理映射源码断言 保留 Rust 侧规范 Agent 默认映射和配置模板验证 --- .../src-tauri/src/tests/configuration.rs | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs b/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs index 94ab80b7e..fe81e5769 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs @@ -526,30 +526,6 @@ fn canonical_agent_reasoning_effort_defaults_are_exhaustive_and_auditable() { template.agent_llm.unwrap_or_default().is_empty(), "bundled template must not persist canonical defaults as explicit overrides" ); - - let ui_source = include_str!("../../../src/features/runtime-config/RuntimeConfigDialog.tsx"); - let ui_mapping = ui_source - .split("const runtimeAgentReasoningEffortDefaults = {") - .nth(1) - .and_then(|source| source.split("} as const satisfies").next()) - .expect("frontend Agent reasoning effort contract") - .lines() - .filter_map(|line| { - let line = line.trim().trim_end_matches(','); - let (agent_id, effort) = line.split_once(": ")?; - Some(( - agent_id.trim_matches(&['\'', '"'][..]).to_string(), - effort.trim_matches(&['\'', '"'][..]).to_string(), - )) - }) - .collect::>(); - assert_eq!( - ui_mapping, - expected - .iter() - .map(|(agent_id, effort)| ((*agent_id).to_string(), (*effort).to_string())) - .collect::>() - ); } #[test]