Eagerly initialize MCP tools at startup so loading is logged to console

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 13:22:31 +02:00
parent 3932e44495
commit 6ffb769b95
2 changed files with 6 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ class AIService:
self._mcp_tool_schemas: list[dict] | None = None self._mcp_tool_schemas: list[dict] | None = None
self._mcp_tools_fetched: bool = False self._mcp_tools_fetched: bool = False
async def initialize(self) -> None:
await self._fetch_mcp_tool_schemas()
@property @property
def enabled(self) -> bool: def enabled(self) -> bool:
return True return True

View File

@@ -147,6 +147,9 @@ class AccountManager:
await self.stop_all() await self.stop_all()
raise RuntimeError("No accounts were started successfully") raise RuntimeError("No accounts were started successfully")
if self.ai_service is not None:
await self.ai_service.initialize()
try: try:
await idle() await idle()
finally: finally: