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:
@@ -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
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user