event重构暂时完成,待测试
This commit is contained in:
@@ -97,6 +97,13 @@ class CycleProcessor:
|
||||
if not skip_planner:
|
||||
plan_result, target_message = await self.action_planner.plan(mode=self.context.loop_mode)
|
||||
|
||||
from src.plugin_system.core.event_manager import event_manager
|
||||
from src.plugin_system.base.component_types import EventType
|
||||
# 触发 ON_PLAN 事件
|
||||
result = await event_manager.trigger_event(EventType.ON_PLAN, stream_id=self.chat_stream.stream_id)
|
||||
if result and not result.all_continue_process():
|
||||
return
|
||||
|
||||
action_result = plan_result.get("action_result", {}) if isinstance(plan_result, dict) else {}
|
||||
if not isinstance(action_result, dict):
|
||||
action_result = {}
|
||||
|
||||
Reference in New Issue
Block a user