Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -127,6 +127,7 @@ class ActionManager:
|
||||
try:
|
||||
# 从组件注册中心获取所有已注册的action
|
||||
from src.plugin_system.core.component_registry import component_registry
|
||||
|
||||
action_registry = component_registry.get_action_registry()
|
||||
|
||||
# 从action_registry获取所有已注册动作
|
||||
@@ -320,6 +321,7 @@ class ActionManager:
|
||||
|
||||
# 旧系统的动作创建逻辑
|
||||
from src.plugin_system.core.component_registry import component_registry
|
||||
|
||||
action_registry = component_registry.get_action_registry()
|
||||
handler_class = action_registry.get(action_name)
|
||||
if not handler_class:
|
||||
@@ -586,5 +588,6 @@ class ActionManager:
|
||||
Optional[Type[BaseAction]]: 动作处理器类,如果不存在则返回None
|
||||
"""
|
||||
from src.plugin_system.core.component_registry import component_registry
|
||||
|
||||
action_registry = component_registry.get_action_registry()
|
||||
return action_registry.get(action_name)
|
||||
|
||||
@@ -7,12 +7,14 @@ logger = get_logger("hearflow_api")
|
||||
def _get_heartflow():
|
||||
"""获取heartflow实例的延迟导入函数"""
|
||||
from src.chat.heart_flow.heartflow import heartflow
|
||||
|
||||
return heartflow
|
||||
|
||||
|
||||
def _get_subheartflow_types():
|
||||
"""获取SubHeartflow和ChatState类型的延迟导入函数"""
|
||||
from src.chat.heart_flow.sub_heartflow import SubHeartflow, ChatState
|
||||
|
||||
return SubHeartflow, ChatState
|
||||
|
||||
|
||||
@@ -130,7 +132,9 @@ class HearflowAPI:
|
||||
|
||||
# 检查子心流是否处于FOCUSED状态且有HeartFC实例
|
||||
if subflow.chat_state.chat_status != ChatState.FOCUSED:
|
||||
logger.debug(f"{self.log_prefix} 子心流 {chat_id} 未处于FOCUSED状态,当前状态: {subflow.chat_state.chat_status.value}")
|
||||
logger.debug(
|
||||
f"{self.log_prefix} 子心流 {chat_id} 未处于FOCUSED状态,当前状态: {subflow.chat_state.chat_status.value}"
|
||||
)
|
||||
return None, None
|
||||
|
||||
if not subflow.heart_fc_instance:
|
||||
|
||||
Reference in New Issue
Block a user