event重构暂时完成,待测试

This commit is contained in:
Windpicker-owo
2025-08-25 17:46:23 +08:00
parent faf13e39b6
commit cbf9a21c1f
10 changed files with 77 additions and 298 deletions

View File

@@ -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 = {}