refactor(affinity_flow): 重构规划器架构并简化日志输出

- 移除ChatterManager中不必要的ActionPlanner实例化
- 在MessageManager中设置默认聊天模式为FOCUS
- 重构BaseChatter构造函数,移除planner依赖
- 统一ChatMode枚举定义,移除GROUP/PRIVATE模式
- 重构AffinityChatter内部planner初始化逻辑
- 大幅简化兴趣评分系统的日志输出
- 修复plan_filter中的动作解析逻辑,支持新格式
- 更新planner_prompts提示词模板,移除私聊限制
- 优化关系追踪器的错误处理和日志输出
This commit is contained in:
Windpicker-owo
2025-09-23 22:18:03 +08:00
parent 68bf0972df
commit ebc4feebd9
16 changed files with 151 additions and 139 deletions

View File

@@ -15,17 +15,15 @@ class BaseChatter(ABC):
"""Chatter组件的描述"""
chat_types: List[ChatType] = [ChatType.PRIVATE, ChatType.GROUP]
def __init__(self, stream_id: str, planner: 'ActionPlanner', action_manager: 'ChatterActionManager'):
def __init__(self, stream_id: str, action_manager: 'ChatterActionManager'):
"""
初始化聊天处理器
Args:
stream_id: 聊天流ID
planner: 动作规划器
action_manager: 动作管理器
"""
self.stream_id = stream_id
self.planner = planner
self.action_manager = action_manager
@abstractmethod