chore(scripts): 移除过时的一次性脚本
移除了两个用于项目重构的一次性脚本: - `convert_sqlalchemy_models.py`:用于将 SQLAlchemy 模型从旧版 `Column` 语法转换为 `Mapped` 语法。 - `update_prompt_imports.py`:用于批量更新 `Prompt` 类的导入路径。 这些脚本已完成其历史使命,不再需要维护。 同时,对插件加载日志和 manifest 转换脚本进行了小幅改进: - 插件加载日志现在会显示组件的简短描述,方便快速了解其功能。 - manifest 转换脚本增加了对更多元数据字段(如仓库地址、关键字、分类等)的支持。
This commit is contained in:
@@ -34,9 +34,14 @@ def convert_and_copy_plugin(plugin_dir: Path, output_dir: Path):
|
||||
|
||||
plugin_name = manifest.get("name", "Unknown Plugin")
|
||||
description = manifest.get("description", "No description provided.")
|
||||
version = manifest.get("version", "0.0.0")
|
||||
version = manifest.get("version", "1.0.0")
|
||||
author = manifest.get("author", {}).get("name", "Unknown Author")
|
||||
license_type = manifest.get("license", "N/A")
|
||||
license_type = manifest.get("license")
|
||||
repository_url = manifest.get("repository_url")
|
||||
keywords = manifest.get("keywords", [])
|
||||
categories = manifest.get("categories", [])
|
||||
plugin_type = manifest.get("plugin_info", {}).get("plugin_type")
|
||||
|
||||
|
||||
meta_template = f"""from src.plugin_system.base.plugin_metadata import PluginMetadata
|
||||
|
||||
@@ -44,9 +49,13 @@ __plugin_meta__ = PluginMetadata(
|
||||
name="{plugin_name}",
|
||||
description="{description}",
|
||||
usage="暂无说明",
|
||||
type={repr(plugin_type)},
|
||||
version="{version}",
|
||||
author="{author}",
|
||||
license="{license_type}",
|
||||
license={repr(license_type)},
|
||||
repository_url={repr(repository_url)},
|
||||
keywords={keywords},
|
||||
categories={categories},
|
||||
)
|
||||
"""
|
||||
# 3. 在复制后的目录中创建或覆盖 __init__.py
|
||||
|
||||
Reference in New Issue
Block a user