修复了**AI写出来的虫子
This commit is contained in:
@@ -360,7 +360,7 @@ class CycleProcessor:
|
||||
self.context.chat_instance.cycle_tracker.end_cycle(loop_info, cycle_timers)
|
||||
self.context.chat_instance.cycle_tracker.print_cycle_info(cycle_timers)
|
||||
|
||||
action_type = actions["action_type"] if actions else "no_action"
|
||||
action_type = actions[0]["action_type"] if actions else "no_action"
|
||||
return action_type
|
||||
|
||||
async def _handle_action(
|
||||
@@ -411,7 +411,7 @@ class CycleProcessor:
|
||||
if "reply" in available_actions:
|
||||
fallback_action = "reply"
|
||||
elif available_actions:
|
||||
fallback_action = list(available_actions.keys())
|
||||
fallback_action = list(available_actions.keys())[0]
|
||||
|
||||
if fallback_action and fallback_action != action:
|
||||
logger.info(f"{self.context.log_prefix} 使用回退动作: {fallback_action}")
|
||||
|
||||
Reference in New Issue
Block a user