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._-]+$")