fix: correct logger import in ACP client

This commit is contained in:
LIghtJUNction
2026-03-23 22:02:38 +08:00
parent 20b7f60330
commit 3485605312
3 changed files with 6 additions and 5 deletions

View File

@@ -11,8 +11,8 @@ import asyncio
import json
from typing import Any
from astrbot import logger
from astrbot._internal.abc.acp.base_astrbot_acp_client import BaseAstrbotAcpClient
from astrbot.core.utils.astrbot_path import logger
log = logger

View File

@@ -12,7 +12,7 @@ import json
from typing import Any
from astrbot._internal.abc.lsp.base_astrbot_lsp_client import BaseAstrbotLspClient
from astrbot.core.utils.astrbot_path import logger
from astrbot import logger
log = logger

View File

@@ -6,7 +6,7 @@ import os
import sys
from contextlib import AsyncExitStack
from datetime import timedelta
from typing import Any
from typing import Any, cast
from tenacity import (
before_sleep_log,
@@ -166,12 +166,12 @@ class McpClient(BaseAstrbotMcpClient):
"""True if MCP client has an active session."""
return self.session is not None
async def list_tools(self) -> list[dict[str, Any]]:
async def list_tools(self) -> list[McpToolInfo]:
"""List all tools from connected MCP servers."""
if not self.session:
return []
result = await self.list_tools_and_save()
return [
tools = [
{
"name": tool.name,
"description": tool.description or "",
@@ -179,6 +179,7 @@ class McpClient(BaseAstrbotMcpClient):
}
for tool in result.tools
]
return cast(list[McpToolInfo], tools)
async def call_tool(
self,