refactor: move computer tools to builtin tools registry

This commit is contained in:
Soulter
2026-04-08 15:29:00 +08:00
parent 006aedbd24
commit 56a099bf90
18 changed files with 285 additions and 206 deletions

View File

@@ -1,5 +1,7 @@
import platform
from astrbot.core.computer.tools.python import PythonTool, LocalPythonTool
from astrbot.core.tools.computer_tools.python import LocalPythonTool, PythonTool
def test_python_tool_description_contains_os():
"""测试 PythonTool 的描述中是否包含当前操作系统信息"""
@@ -8,6 +10,7 @@ def test_python_tool_description_contains_os():
assert current_os in tool.description
assert "IPython" in tool.description
def test_local_python_tool_description_contains_os():
"""测试 LocalPythonTool 的描述中是否包含当前操作系统信息和兼容性提示"""
tool = LocalPythonTool()