mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
feat: SDK integration and various improvements
- Refactor core modules for better SDK integration - Improve skill manager with better caching and loading - Update dashboard routes for plugin and tools management - Fix and enhance computer skill synchronization - Various bug fixes and test improvements
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import cast
|
||||
|
||||
from astrbot.core.computer import computer_client
|
||||
from astrbot.core.computer.booters.base import ComputerBooter
|
||||
from astrbot.core.skills.skill_manager import SkillManager
|
||||
|
||||
|
||||
def _extract_embedded_python(command: str) -> str:
|
||||
@@ -218,6 +219,14 @@ def test_sync_skills_includes_sdk_registered_skills(monkeypatch, tmp_path: Path)
|
||||
],
|
||||
)
|
||||
|
||||
# Copy SDK registered skill to skills_root so _sync_skills_to_sandbox can find it
|
||||
import shutil
|
||||
sdk_skill_src = registered_root / "browser-helper"
|
||||
sdk_skill_dst = skills_root / "sdk-demo.browser-helper"
|
||||
if sdk_skill_dst.exists():
|
||||
shutil.rmtree(sdk_skill_dst)
|
||||
shutil.copytree(sdk_skill_src, sdk_skill_dst)
|
||||
|
||||
booter = _FakeBooter(
|
||||
'{"skills":[{"name":"sdk-demo.browser-helper","description":"","path":"skills/sdk-demo.browser-helper/SKILL.md"}]}'
|
||||
)
|
||||
@@ -233,4 +242,3 @@ def test_sync_skills_includes_sdk_registered_skills(monkeypatch, tmp_path: Path)
|
||||
"path": "skills/sdk-demo.browser-helper/SKILL.md",
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user