From ff66b815a58f46b2879f5821e6b2494e65fd5e31 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 23 Apr 2026 10:17:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E6=A8=A1=E5=9E=8B=E5=92=8C?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E8=B0=83=E7=94=A8=E6=9C=9F=E9=97=B4=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=89=93=E6=96=AD=E5=90=8E=E8=AF=B4=E5=AE=8C=E8=AF=9D?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=80=80=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/handle/abortHandle.py | 1 + .../plugins_func/functions/handle_exit_intent.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/handle/abortHandle.py b/main/xiaozhi-server/core/handle/abortHandle.py index b7bf1611..c4a2fa88 100644 --- a/main/xiaozhi-server/core/handle/abortHandle.py +++ b/main/xiaozhi-server/core/handle/abortHandle.py @@ -9,6 +9,7 @@ TAG = __name__ async def handleAbortMessage(conn: "ConnectionHandler"): conn.logger.bind(tag=TAG).info("Abort message received") # 设置成打断状态,会自动打断llm、tts任务 + conn.close_after_chat = False conn.client_abort = True conn.clear_queues() # 打断客户端说话状态 diff --git a/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py b/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py index bd24f372..79347659 100644 --- a/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py +++ b/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py @@ -35,7 +35,8 @@ def handle_exit_intent(conn: "ConnectionHandler", say_goodbye: str | None = None try: if say_goodbye is None: say_goodbye = "再见,祝您生活愉快!" - conn.close_after_chat = True + if not conn.close_after_chat: + conn.close_after_chat = True logger.bind(tag=TAG).info(f"退出意图已处理:{say_goodbye}") return ActionResponse( action=Action.RESPONSE, result="退出意图已处理", response=say_goodbye