fix(affinity_flow_chatter): 修复私聊上下文构建时对目标信息的访问方式

在近期的重构中,`plan.target_info` 的数据结构已从对象变更为字典。此提交将对应的属性访问方式(`.`)更新为字典键访问(`.get()`),以防止在构建私聊上下文描述时出现 `AttributeError`。
This commit is contained in:
tt-P607
2025-09-23 23:20:18 +08:00
parent 5e6cc6ad96
commit 7a05312672

View File

@@ -236,7 +236,7 @@ class ChatterPlanFilter:
is_group_chat = plan.chat_type == ChatType.GROUP
chat_context_description = "你现在正在一个群聊中"
if not is_group_chat and plan.target_info:
chat_target_name = plan.target_info.person_name or plan.target_info.user_nickname or "对方"
chat_target_name = plan.target_info.get("person_name") or plan.target_info.get("user_nickname") or "对方"
chat_context_description = f"你正在和 {chat_target_name} 私聊"
action_options_block = await self._build_action_options(plan.available_actions)