From 537a8d69a06b1e8d91a67cd7a92fbe28d4064667 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 24 Jun 2025 10:25:00 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/built_in/core_actions/no_reply.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/built_in/core_actions/no_reply.py b/src/plugins/built_in/core_actions/no_reply.py index fae99a8ba..1d8b0d164 100644 --- a/src/plugins/built_in/core_actions/no_reply.py +++ b/src/plugins/built_in/core_actions/no_reply.py @@ -106,7 +106,7 @@ class NoReplyAction(BaseAction): while True: current_time = time.time() elapsed_time = current_time - start_time - + if global_config.chat.chat_mode == "auto": # 检查是否超时 if elapsed_time >= self._max_timeout: @@ -121,14 +121,15 @@ class NoReplyAction(BaseAction): ) return True, exit_reason - # **新增**:检查回复频率,决定是否退出专注模式 should_exit_focus = await self._check_frequency_and_exit_focus(current_time) if should_exit_focus: logger.info(f"{self.log_prefix} 检测到回复频率过高,退出专注模式") # 标记退出专注模式 self.action_data["_system_command"] = "stop_focus_chat" - exit_reason = f"{global_config.bot.nickname}(你)发现自己回复太频繁了,决定退出专注模式,稍作休息" + exit_reason = ( + f"{global_config.bot.nickname}(你)发现自己回复太频繁了,决定退出专注模式,稍作休息" + ) await self.store_action_info( action_build_into_prompt=True, action_prompt_display=exit_reason,