feat(affinity-flow): 优化提及检测逻辑和阈值配置
- 简化提及检测逻辑,移除冗余的私聊检查变量 - 使用配置项 mention_bot_adjustment_threshold 替换硬编码的50%阈值 - 在消息处理中清除开头可能存在的空行 - 增加首次认识用户的信息存储方法,避免未知用户处理逻辑 - 调整消息管理器检查间隔从2秒到5秒,减少系统负载 - 修复计划执行器中用户ID比较逻辑,防止自我回复死循环
This commit is contained in:
@@ -22,7 +22,7 @@ logger = get_logger("message_manager")
|
||||
class MessageManager:
|
||||
"""消息管理器"""
|
||||
|
||||
def __init__(self, check_interval: float = 2.0):
|
||||
def __init__(self, check_interval: float = 5.0):
|
||||
self.stream_contexts: Dict[str, StreamContext] = {}
|
||||
self.check_interval = check_interval # 检查间隔(秒)
|
||||
self.is_running = False
|
||||
|
||||
Reference in New Issue
Block a user