make agent manager singleton (#4880)

This commit is contained in:
Yingjie He
2025-09-29 13:09:55 -07:00
committed by GitHub
parent 41d32c04b1
commit 1c424303c2
3 changed files with 95 additions and 62 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ pub struct AppState {
impl AppState {
pub async fn new() -> anyhow::Result<Arc<AppState>> {
let agent_manager = Arc::new(AgentManager::new(None).await?);
let agent_manager = AgentManager::instance().await?;
Ok(Arc::new(Self {
agent_manager,
recipe_file_hash_map: Arc::new(Mutex::new(HashMap::new())),