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"),