diff --git a/src/config/agent.rs b/src/config/agent.rs index 5f4ffcb..845276f 100644 --- a/src/config/agent.rs +++ b/src/config/agent.rs @@ -140,7 +140,6 @@ impl Agent { } config.write().mcp_registry = Some(new_mcp_registry); - agent_config.replace_tools_placeholder(&functions); agent_config.load_envs(&config.read()); @@ -212,6 +211,8 @@ impl Agent { functions.append_supervisor_functions(); } + agent_config.replace_tools_placeholder(&functions); + Ok(Self { name: name.to_string(), config: agent_config, diff --git a/src/config/mod.rs b/src/config/mod.rs index e99d77b..aadf9b1 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -29,6 +29,7 @@ use crate::mcp::{ MCP_SEARCH_META_FUNCTION_NAME_PREFIX, McpRegistry, }; use crate::supervisor::Supervisor; +use crate::supervisor::mailbox::Inbox; use crate::vault::{GlobalVault, Vault, create_vault_password_file, interpolate_secrets}; use anyhow::{Context, Result, anyhow, bail}; use fancy_regex::Regex; @@ -55,7 +56,6 @@ use std::{ use syntect::highlighting::ThemeSet; use terminal_colorsaurus::{ColorScheme, QueryOptions, color_scheme}; use tokio::runtime::Handle; -use crate::supervisor::mailbox::Inbox; pub const TEMP_ROLE_NAME: &str = "temp"; pub const TEMP_RAG_NAME: &str = "temp";