Skip to content

[Bug] skill导入界面前后端脱节 #7067

@jmt059

Description

@jmt059

What happened / 发生了什么

问题文件:astrbot/core/skills
/skill_manager.py

Image

代码里强制校验了 if len(archive_root) != 1:
导致压缩包根目录下必须只能有 1 个顶层文件夹,直接并列塞入多个 skill 文件夹会报错:“Zip archive must contain a single top-level folder.”

Image

如果在外面套一层总文件夹,代码会把这个总文件夹当成唯一的技能包,只去它的第一层目录寻找清单,而不会去遍历子目录,于是报错:“SKILL.md not found in the skill folder.”

在这个文件里没有发现处理多技能(也就是遍历子目录)的逻辑,这似乎与导入界面的提示“支持压缩包内含多个 skills 文件夹。”相悖

Image

Reproduce / 如何复现?

呃,其实拿一个多skill文件夹的压缩包试试就知道了

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

Astrbot linux本地部署 v4.22.1

OS

Linux

Logs / 报错日志

如图
Image

Image

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions