diff --git a/crates/df-ai/src/planner.rs b/crates/df-ai/src/planner.rs index c987a21..6735eee 100644 --- a/crates/df-ai/src/planner.rs +++ b/crates/df-ai/src/planner.rs @@ -26,13 +26,15 @@ // ---- feature flag 占位 ------------------------------------------------------ -/// 规划能力总开关(Phase 1 接入用占位)。 +/// 规划能力总开关(主 loop 规划开关,门控 filter_tool_defs_planned 接入)。 /// -/// **当前恒 `false`** = 单链 ReAct 旧行为(主 loop 未走 Plan 规划)。 -/// Phase 1(plan_hint 接入主 loop)落地时翻为 `true` + 条件编译门控。 +/// **当前 `true`** = 主 loop 走 Plan 规划(agentic/mod.rs:633 调 filter_tool_defs_planned)。 +/// Phase 1(plan_hint 接入主 loop)已落地,翻 true 启用。 /// 注:`PLAN_HINT_ENABLED`(plan_hint 函数 flag,Phase0a 就绪 true)单一定义在 `plan_hint.rs`, /// 本模块仅 `PLANNING_ENABLED`(主 loop 规划开关),消除此前双定义矛盾。 -pub const PLANNING_ENABLED: bool = false; +/// 双层开关:即使 PLANNING_ENABLED=true,若 plan_hint 内部 PLAN_HINT_ENABLED 关闭, +/// filter_tool_defs_planned 仍退扁平(任一关闭退旧行为,可回退)。 +pub const PLANNING_ENABLED: bool = true; /// Plan 层级硬上限(防爆深,防规划 LLM 退化成超长链)。 /// @@ -632,10 +634,10 @@ mod tests { } #[test] - fn feature_flags_default_off() { - // PLANNING_ENABLED 当前关(主 loop 未走规划),Phase 1 接入时翻 true。 + fn feature_flags_default_on() { + // PLANNING_ENABLED 当前开(主 loop 走 filter_tool_defs_planned 规划),Phase 1 已落地。 // PLAN_HINT_ENABLED(plan_hint 函数 flag)在 plan_hint.rs 单一定义,此处不再断言。 - assert!(!PLANNING_ENABLED); + assert!(PLANNING_ENABLED); } #[test]