refactor: move MCP lifecycle out of AgentLoop (#5343)

This commit is contained in:
chengyongru authored and GitHub committed 2026-08-12 17:51:04 +08:00
1 parent 686dd0603e
commit 19997d20bb
39 files changed
+1192 -846

No files matched your search

+1 -2
View File
@@ -32,8 +32,7 @@ AUTH_HEADERS = {"Authorization": f"Bearer {API_KEY}"}
def _make_mock_agent(response_text: str = "mock response") -> MagicMock:
agent = MagicMock()
agent.process_direct = AsyncMock(return_value=response_text)
agent._connect_mcp = AsyncMock()
agent.close_mcp = AsyncMock()
agent.aclose = AsyncMock()
agent._last_usage = {}
return agent