From 3ac8eaca9e8a1be9e097b93f32eee79e99e92ea1 Mon Sep 17 00:00:00 2001 From: UnCLAS-Prommer Date: Sun, 15 Jun 2025 02:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BB=9F=E8=AE=A1=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin_system/core/component_registry.py | 9 +++++++++ src/plugin_system/core/plugin_manager.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 ""