feat(affinity-flow): 优化提及检测逻辑和阈值配置
- 简化提及检测逻辑,移除冗余的私聊检查变量 - 使用配置项 mention_bot_adjustment_threshold 替换硬编码的50%阈值 - 在消息处理中清除开头可能存在的空行 - 增加首次认识用户的信息存储方法,避免未知用户处理逻辑 - 调整消息管理器检查间隔从2秒到5秒,减少系统负载 - 修复计划执行器中用户ID比较逻辑,防止自我回复死循环
This commit is contained in:
@@ -126,7 +126,7 @@ class PlanExecutor:
|
||||
try:
|
||||
logger.info(f"执行回复动作: {action_info.action_type}, 原因: {action_info.reasoning}")
|
||||
|
||||
if action_info.action_message.user_info.user_id == str(global_config.bot.qq_account):
|
||||
if action_info.action_message.get("user_id", "") == str(global_config.bot.qq_account):
|
||||
logger.warning("尝试回复自己,跳过此动作以防止死循环。")
|
||||
return {
|
||||
"action_type": action_info.action_type,
|
||||
|
||||
Reference in New Issue
Block a user