feat(chat): 新增私聊强制回复功能
当在私聊场景下,如果大脑决策为“no_reply”,此功能会将其强制修改为“reply”,以确保机器人总能响应私聊消息。 该功能通过新的配置项 `force_reply_private` 控制,默认为关闭状态。同时,原配置项 `force_focus_private` 已被重命名为 `force_reply_private` 以更准确地反映其功能。
This commit is contained in:
committed by
Windpicker-owo
parent
d2a8d7e637
commit
e3350ede37
@@ -582,6 +582,12 @@ class ActionPlanner:
|
||||
action, reasoning = "no_reply", f"大脑处理错误: {e}"
|
||||
|
||||
# --- 4. 整合大脑和小脑的决策 ---
|
||||
# 如果是私聊且开启了强制回复,则将no_reply强制改为reply
|
||||
if not is_group_chat and global_config.chat.force_reply_private and action == "no_reply":
|
||||
action = "reply"
|
||||
reasoning = "私聊强制回复"
|
||||
logger.info(f"{self.log_prefix}私聊强制回复已触发,将动作从 'no_reply' 修改为 'reply'")
|
||||
|
||||
is_parallel = True
|
||||
for info in all_sub_planner_results:
|
||||
action_type = info.get("action_type")
|
||||
|
||||
Reference in New Issue
Block a user