新增: 多 ReAct 执行骨架(PlanExecutor 运行时门控+DAG 进度组件) - PLAN_EXECUTION_ENABLED 改为 AtomicBool 运行时开关 - 新增 set/get_plan_execution IPC 前后端通路 - 新增 PlanProgress.vue 层状执行进度展示组件 - feature flag 默认关, 翻 true 后 process_tool_calls 可并行执行同层工具
This commit is contained in:
@@ -125,3 +125,18 @@ pub async fn get_script_safety(
|
||||
let bl = state.settings.get("df-script-blacklist").await.map_err(err_str)?.unwrap_or_default();
|
||||
Ok((wl, bl))
|
||||
}
|
||||
|
||||
/// 设置多 ReAct Plan 执行开关(默认关)。
|
||||
/// 开启后 process_tool_calls 内以 JoinSet 并行执行同层工具。
|
||||
#[tauri::command]
|
||||
pub async fn set_plan_execution(enabled: bool) -> Result<(), String> {
|
||||
df_ai::plan_executor::set_plan_execution(enabled);
|
||||
tracing::info!(enabled, "[PLAN-EXEC] IPC 开关已更新");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// 读取多 ReAct Plan 执行开关状态。
|
||||
#[tauri::command]
|
||||
pub async fn get_plan_execution() -> Result<bool, String> {
|
||||
Ok(df_ai::plan_executor::plan_execution_enabled())
|
||||
}
|
||||
|
||||
@@ -433,6 +433,9 @@ pub fn run() {
|
||||
// ScriptNode 命令安全配置(白/黑名单,前端设置页写入)
|
||||
commands::settings::set_script_safety,
|
||||
commands::settings::get_script_safety,
|
||||
// Plan 执行开关
|
||||
commands::settings::set_plan_execution,
|
||||
commands::settings::get_plan_execution,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user