feat(chat): 私聊专注模式下强制回复

在私聊的专注模式下,即使用户的发言没有触发任何功能,机器人也会进行回复,而不是选择“no_reply”。
此举旨在提升私聊场景下的用户体验,避免机器人因未匹配到关键词而沉默,让对话感觉更自然。
This commit is contained in:
minecraft1024a
2025-08-17 16:48:42 +08:00
parent 848f16346b
commit ba5563abc5
2 changed files with 7 additions and 2 deletions

View File

@@ -615,7 +615,13 @@ class HeartFChatting:
)
action_data["loop_start_time"] = loop_start_time
# 在私聊的专注模式下如果规划动作为no_reply则强制改为reply
is_private_chat = self.chat_stream.group_info is None
if self.loop_mode == ChatMode.FOCUS and is_private_chat and action_type == "no_reply":
action_type = "reply"
logger.info(f"{self.log_prefix} 私聊专注模式下强制回复")
if action_type == "reply":
logger.info(f"{self.log_prefix}{global_config.bot.nickname} 决定进行回复")
elif is_parallel:

View File

@@ -18,7 +18,6 @@ class NoReplyAction(BaseAction):
focus_activation_type = ActionActivationType.NEVER
normal_activation_type = ActionActivationType.NEVER
mode_enable = ChatMode.FOCUS
chat_type_allow = ChatType.GROUP
parallel_action = False
# 动作基本信息