fix: 添加对 metadata 中 description 字段的支持,确保元数据完整性

fixes: #2245
This commit is contained in:
Soulter
2025-08-02 16:01:10 +08:00
parent eb0325e627
commit fd7811402b
+3
View File
@@ -117,6 +117,9 @@ def build_plug_list(plugins_dir: Path) -> list:
# 从 metadata.yaml 加载元数据
metadata = load_yaml_metadata(plugin_dir)
if "desc" not in metadata and "description" in metadata:
metadata["desc"] = metadata["description"]
# 如果成功加载元数据,添加到结果列表
if metadata and all(
k in metadata for k in ["name", "desc", "version", "author", "repo"]