diff --git a/src/plugin_system/core/component_registry.py b/src/plugin_system/core/component_registry.py index 863146a86..fba04e8d5 100644 --- a/src/plugin_system/core/component_registry.py +++ b/src/plugin_system/core/component_registry.py @@ -252,7 +252,16 @@ class ComponentRegistry: def get_registry_stats(self) -> Dict[str, Any]: """获取注册中心统计信息""" + action_components: int = 0 + command_components: int = 0 + for component in self._components.values(): + if component.component_type == ComponentType.ACTION: + action_components += 1 + elif component.component_type == ComponentType.COMMAND: + command_components += 1 return { + "action_components": action_components, + "command_components": command_components, "total_components": len(self._components), "total_plugins": len(self._plugins), "components_by_type": { diff --git a/src/plugin_system/core/plugin_manager.py b/src/plugin_system/core/plugin_manager.py index a27cd2e1f..311a2b4bd 100644 --- a/src/plugin_system/core/plugin_manager.py +++ b/src/plugin_system/core/plugin_manager.py @@ -136,7 +136,7 @@ class PluginManager: if plugin_info: # 插件基本信息 version_info = f"v{plugin_info.version}" if plugin_info.version else "" - author_info = f"by {plugin_info.author}" if plugin_info.author else "" + author_info = f"by {plugin_info.author}" if plugin_info.author else "unknown" info_parts = [part for part in [version_info, author_info] if part] extra_info = f" ({', '.join(info_parts)})" if info_parts else ""