From d27099f2daa61822a7e180f605fc5f45960a159b Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 29 Jan 2026 23:25:56 +0800 Subject: [PATCH] fix(skills): update SANDBOX_SKILLS_ROOT path to use relative directory --- .../process_stage/method/agent_sub_stages/internal.py | 9 +++++---- astrbot/core/skills/skill_manager.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py index 4c20b3025..b6603be9e 100644 --- a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py +++ b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py @@ -582,9 +582,7 @@ class InternalAgentSubStage(Stage): req.extra_user_content_parts.append( TextPart(text=f"[Image Attachment: path {image_path}]") ) - elif isinstance(comp, File) and self.sandbox_cfg.get( - "enable", False - ): + elif isinstance(comp, File): file_path = await comp.get_file() file_name = comp.name or os.path.basename(file_path) req.extra_user_content_parts.append( @@ -611,7 +609,10 @@ class InternalAgentSubStage(Stage): logger.error(f"Error occurred while applying file extract: {e}") if not req.prompt and not req.image_urls: - return + if not event.get_group_id() and req.extra_user_content_parts: + req.prompt = "" + else: + return # call event hook if await call_event_hook(event, EventType.OnLLMRequestEvent, req): diff --git a/astrbot/core/skills/skill_manager.py b/astrbot/core/skills/skill_manager.py index aed65ec1b..6e53e751e 100644 --- a/astrbot/core/skills/skill_manager.py +++ b/astrbot/core/skills/skill_manager.py @@ -17,7 +17,8 @@ from astrbot.core.utils.astrbot_path import ( SKILLS_CONFIG_FILENAME = "skills.json" DEFAULT_SKILLS_CONFIG: dict[str, dict] = {"skills": {}} -SANDBOX_SKILLS_ROOT = "/home/shared/skills" +# SANDBOX_SKILLS_ROOT = "/home/shared/skills" +SANDBOX_SKILLS_ROOT = "skills" _SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9._-]+$")