refactor: 移除兴趣计算器相关代码和配置,优化系统管理插件

This commit is contained in:
Windpicker-owo
2025-12-12 14:38:15 +08:00
parent e6a4f855a2
commit 0193913841
11 changed files with 5 additions and 249 deletions

View File

@@ -7,7 +7,6 @@ from src.plugin_system.base.component_types import (
CommandInfo,
ComponentType,
EventHandlerInfo,
InterestCalculatorInfo,
PlusCommandInfo,
PromptInfo,
ToolInfo,
@@ -17,7 +16,6 @@ from .base_action import BaseAction
from .base_adapter import BaseAdapter
from .base_command import BaseCommand
from .base_events_handler import BaseEventHandler
from .base_interest_calculator import BaseInterestCalculator
from .base_prompt import BasePrompt
from .base_tool import BaseTool
from .plugin_base import PluginBase
@@ -59,15 +57,6 @@ class BasePlugin(PluginBase):
logger.warning(f"Action组件 {component_class.__name__} 缺少 get_action_info 方法")
return None
elif component_type == ComponentType.INTEREST_CALCULATOR:
if hasattr(component_class, "get_interest_calculator_info"):
return component_class.get_interest_calculator_info()
else:
logger.warning(
f"InterestCalculator组件 {component_class.__name__} 缺少 get_interest_calculator_info 方法"
)
return None
elif component_type == ComponentType.PLUS_COMMAND:
# PlusCommand组件的get_info方法尚未实现
logger.warning("PlusCommand组件的get_info方法尚未实现")
@@ -123,7 +112,6 @@ class BasePlugin(PluginBase):
| tuple[PlusCommandInfo, type[PlusCommand]]
| tuple[EventHandlerInfo, type[BaseEventHandler]]
| tuple[ToolInfo, type[BaseTool]]
| tuple[InterestCalculatorInfo, type[BaseInterestCalculator]]
| tuple[PromptInfo, type[BasePrompt]]
]:
"""获取插件包含的组件列表