(agent: &Agent)
| 14 | use std::sync::{Arc, Weak}; |
| 15 | |
| 16 | pub(super) async fn refresh_mcp_tools(agent: &Agent) -> Result<()> { |
| 17 | if let Some(mcp) = &agent.global_mcp { |
| 18 | let fresh = mcp.get_all_tools().await; |
| 19 | *agent |
| 20 | .global_mcp_tools |
| 21 | .lock() |
| 22 | .expect("global_mcp_tools lock poisoned") = fresh; |
| 23 | } |
| 24 | Ok(()) |
| 25 | } |
| 26 | |
| 27 | pub(super) fn create_session( |
| 28 | agent: &Agent, |
no test coverage detected