chore(scripts): 移除过时的一次性脚本
移除了两个用于项目重构的一次性脚本: - `convert_sqlalchemy_models.py`:用于将 SQLAlchemy 模型从旧版 `Column` 语法转换为 `Mapped` 语法。 - `update_prompt_imports.py`:用于批量更新 `Prompt` 类的导入路径。 这些脚本已完成其历史使命,不再需要维护。 同时,对插件加载日志和 manifest 转换脚本进行了小幅改进: - 插件加载日志现在会显示组件的简短描述,方便快速了解其功能。 - manifest 转换脚本增加了对更多元数据字段(如仓库地址、关键字、分类等)的支持。
This commit is contained in:
@@ -382,6 +382,13 @@ class PluginManager:
|
||||
|
||||
# 组件列表
|
||||
if plugin_info.components:
|
||||
|
||||
def format_component(c):
|
||||
desc = c.description
|
||||
if len(desc) > 15:
|
||||
desc = desc[:15] + "..."
|
||||
return f"{c.name} ({desc})" if desc else c.name
|
||||
|
||||
action_components = [
|
||||
c for c in plugin_info.components if c.component_type == ComponentType.ACTION
|
||||
]
|
||||
@@ -397,27 +404,27 @@ class PluginManager:
|
||||
]
|
||||
|
||||
if action_components:
|
||||
action_names = [c.name for c in action_components]
|
||||
logger.info(f" 🎯 Action组件: {', '.join(action_names)}")
|
||||
action_details = [format_component(c) for c in action_components]
|
||||
logger.info(f" 🎯 Action组件: {', '.join(action_details)}")
|
||||
|
||||
if command_components:
|
||||
command_names = [c.name for c in command_components]
|
||||
logger.info(f" ⚡ Command组件: {', '.join(command_names)}")
|
||||
command_details = [format_component(c) for c in command_components]
|
||||
logger.info(f" ⚡ Command组件: {', '.join(command_details)}")
|
||||
if tool_components:
|
||||
tool_names = [c.name for c in tool_components]
|
||||
logger.info(f" 🛠️ Tool组件: {', '.join(tool_names)}")
|
||||
tool_details = [format_component(c) for c in tool_components]
|
||||
logger.info(f" 🛠️ Tool组件: {', '.join(tool_details)}")
|
||||
if plus_command_components:
|
||||
plus_command_names = [c.name for c in plus_command_components]
|
||||
logger.info(f" ⚡ PlusCommand组件: {', '.join(plus_command_names)}")
|
||||
plus_command_details = [format_component(c) for c in plus_command_components]
|
||||
logger.info(f" ⚡ PlusCommand组件: {', '.join(plus_command_details)}")
|
||||
chatter_components = [
|
||||
c for c in plugin_info.components if c.component_type == ComponentType.CHATTER
|
||||
]
|
||||
if chatter_components:
|
||||
chatter_names = [c.name for c in chatter_components]
|
||||
logger.info(f" 🗣️ Chatter组件: {', '.join(chatter_names)}")
|
||||
chatter_details = [format_component(c) for c in chatter_components]
|
||||
logger.info(f" 🗣️ Chatter组件: {', '.join(chatter_details)}")
|
||||
if event_handler_components:
|
||||
event_handler_names = [c.name for c in event_handler_components]
|
||||
logger.info(f" 📢 EventHandler组件: {', '.join(event_handler_names)}")
|
||||
event_handler_details = [format_component(c) for c in event_handler_components]
|
||||
logger.info(f" 📢 EventHandler组件: {', '.join(event_handler_details)}")
|
||||
|
||||
# 权限节点信息
|
||||
if plugin_instance := self.loaded_plugins.get(plugin_name):
|
||||
|
||||
Reference in New Issue
Block a user