注册统计修复

This commit is contained in:
UnCLAS-Prommer
2025-06-15 02:50:27 +08:00
parent da2ca0f59f
commit 3ac8eaca9e
2 changed files with 10 additions and 1 deletions

View File

@@ -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": {