refactor(chat): 移除亲和力流模块并将其重构为插件架构

BREAKING CHANGE: 原有的亲和力流相关模块(src/chat/affinity_flow/)已被完全移除,相关功能已重构为插件形式。需要更新配置文件和相关依赖。

- 删除 src/chat/affinity_flow/ 目录下的所有文件
- 将 AFC 管理器功能移至 chatter 插件中实现
- 更新相关导入路径和引用
- 重构关系追踪器和兴趣评分系统的初始化逻辑
- 调整聊天管理器和消息管理器以适应新的插件架构
This commit is contained in:
Windpicker-owo
2025-09-23 13:14:38 +08:00
parent db29ebfeae
commit c9b20aa61a
27 changed files with 511 additions and 761 deletions

View File

@@ -18,7 +18,7 @@ from src.plugin_system.apis import generator_api, database_api, send_api, messag
logger = get_logger("action_manager")
class ActionManager:
class ChatterActionManager:
"""
动作管理器,用于管理各种类型的动作
@@ -34,7 +34,7 @@ class ActionManager:
# 初始化时将默认动作加载到使用中的动作
self._using_actions = component_registry.get_default_actions()
self.log_prefix: str = "ActionManager"
self.log_prefix: str = "ChatterActionManager"
# === 执行Action方法 ===
@@ -449,7 +449,7 @@ class ActionManager:
data = "".join(map(str, data))
reply_text += data
# 如果是主动思考且内容为沉默,则不发送
# 如果是主动思考且内容为"沉默",则不发送
if is_proactive_thinking and data.strip() == "沉默":
logger.info(f"{self.log_prefix} 主动思考决定保持沉默,不发送消息")
continue
@@ -474,4 +474,4 @@ class ActionManager:
typing=True,
)
return reply_text
return reply_text