From d58726c89e81133303b9ae85690a7eb514d40a03 Mon Sep 17 00:00:00 2001 From: hexiaonan-800 Date: Thu, 22 Oct 2026 10:39:36 +0800 Subject: [PATCH] fix: Tool status error when AI node with tools cancel --- apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py b/apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py index d0ad602d21c..a18e9e69f95 100644 --- a/apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py +++ b/apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py @@ -704,6 +704,10 @@ def get_details(self, index: int = 0, position: dict = None, old_details: dict = for m in self.data.get("messages") or []: aggregation.aggregate(m) messages = aggregation.get_contents() + if self.status == Status.CANCELLED: + for m in messages: + if m.get("status") == Status.RUNNING.value: + m["status"] = Status.CANCELLED.value details.update( { "question": self.data.get("question"),