refactor: improve code formatting and structure across multiple files
This commit is contained in:
@@ -74,7 +74,7 @@ pub fn all_tools(
|
||||
browser_config: &crate::config::BrowserConfig,
|
||||
http_config: &crate::config::HttpRequestConfig,
|
||||
workspace_dir: &std::path::Path,
|
||||
agents: &HashMap<String, DelegateAgentConfig>,
|
||||
agents: &HashMap<String, DelegateAgentConfig, S>,
|
||||
fallback_api_key: Option<&str>,
|
||||
config: &crate::config::Config,
|
||||
) -> Vec<Box<dyn Tool>> {
|
||||
@@ -104,7 +104,7 @@ pub fn all_tools_with_runtime(
|
||||
browser_config: &crate::config::BrowserConfig,
|
||||
http_config: &crate::config::HttpRequestConfig,
|
||||
workspace_dir: &std::path::Path,
|
||||
agents: &HashMap<String, DelegateAgentConfig>,
|
||||
agents: &HashMap<String, DelegateAgentConfig, S>,
|
||||
fallback_api_key: Option<&str>,
|
||||
config: &crate::config::Config,
|
||||
) -> Vec<Box<dyn Tool>> {
|
||||
@@ -170,8 +170,12 @@ pub fn all_tools_with_runtime(
|
||||
|
||||
// Add delegation tool when agents are configured
|
||||
if !agents.is_empty() {
|
||||
let delegate_agents: HashMap<String, DelegateAgentConfig> = agents
|
||||
.iter()
|
||||
.map(|(name, cfg)| (name.clone(), cfg.clone()))
|
||||
.collect();
|
||||
tools.push(Box::new(DelegateTool::new(
|
||||
agents.clone(),
|
||||
delegate_agents,
|
||||
fallback_api_key.map(String::from),
|
||||
)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user