feat(chat): 优化流处理逻辑与Normal模式性能

- 在StreamLoopManager中添加流能量更新机制,在处理消息前更新能量值用于间隔计算
- 为消息打断系统添加allow_reply_interruption配置选项,控制是否允许在回复时打断
- 重构AffinityFlowChatter规划器,为Normal模式添加简化流程,显著降低延迟
- 实现Normal模式与Focus模式间的智能切换机制,基于focus_energy概率退出Normal模式
- 移除冗余的兴趣度批量更新逻辑,优化数据库写入性能
- 更新配置模板版本至7.5.0

BREAKING CHANGE: 配置文件中新增allow_reply_interruption选项,需要更新配置
This commit is contained in:
Windpicker-owo
2025-10-28 19:13:18 +08:00
parent 033e1fecb4
commit 4e024656ff
5 changed files with 230 additions and 56 deletions

View File

@@ -1,5 +1,5 @@
[inner]
version = "7.4.9"
version = "7.5.0"
#----以下是给开发人员阅读的如果你只是部署了MoFox-Bot不需要阅读----
#如果你想要修改配置文件请递增version的值
@@ -126,6 +126,7 @@ thinking_timeout = 40 # MoFox-Bot一次回复最长思考规划时间超过
# 消息打断系统配置 - 反比例函数概率模型
interruption_enabled = true # 是否启用消息打断系统
allow_reply_interruption = false # 是否允许在正在生成回复时打断true=允许打断回复false=回复期间不允许打断)
interruption_max_limit = 5 # 每个聊天流的最大打断次数
interruption_min_probability = 0.05 # 最低打断概率(反比例函数趋近的下限值)