feat: MCP Roots support (#7790)

This commit is contained in:
Alex Hancock
2026-03-11 14:35:49 -04:00
committed by GitHub
parent d04b761a9c
commit f2de8b5ccc
9 changed files with 126 additions and 54 deletions
+11 -1
View File
@@ -1172,10 +1172,20 @@ impl GooseAcpAgent {
}
self.session_manager
.update(&req.session_id)
.working_dir(path)
.working_dir(path.clone())
.apply()
.await
.map_err(|e| sacp::Error::internal_error().data(e.to_string()))?;
// Notify MCP servers so roots stay in sync with the new working directory.
if let Some(session) = self.sessions.lock().await.get(&req.session_id) {
session
.agent
.extension_manager
.update_working_dir(&path)
.await;
}
Ok(EmptyResponse {})
}