注册统计修复
This commit is contained in:
@@ -252,7 +252,16 @@ class ComponentRegistry:
|
|||||||
|
|
||||||
def get_registry_stats(self) -> Dict[str, Any]:
|
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 {
|
return {
|
||||||
|
"action_components": action_components,
|
||||||
|
"command_components": command_components,
|
||||||
"total_components": len(self._components),
|
"total_components": len(self._components),
|
||||||
"total_plugins": len(self._plugins),
|
"total_plugins": len(self._plugins),
|
||||||
"components_by_type": {
|
"components_by_type": {
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class PluginManager:
|
|||||||
if plugin_info:
|
if plugin_info:
|
||||||
# 插件基本信息
|
# 插件基本信息
|
||||||
version_info = f"v{plugin_info.version}" if plugin_info.version else ""
|
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]
|
info_parts = [part for part in [version_info, author_info] if part]
|
||||||
extra_info = f" ({', '.join(info_parts)})" if info_parts else ""
|
extra_info = f" ({', '.join(info_parts)})" if info_parts else ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user