调整配置默认值回归断言

移除已不再存在的前端 Agent 推理映射源码断言

保留 Rust 侧规范 Agent 默认映射和配置模板验证
This commit is contained in:
2026-08-30 14:43:06 +08:00
parent ddb668710e
commit e2689b4be5
@@ -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::<BTreeMap<_, _>>();
assert_eq!(
ui_mapping,
expected
.iter()
.map(|(agent_id, effort)| ((*agent_id).to_string(), (*effort).to_string()))
.collect::<BTreeMap<_, _>>()
);
}
#[test]