From 184b54fc8f94e1428f180cbc138f68813bf2661f Mon Sep 17 00:00:00 2001 From: sharath <29162020+tnfssc@users.noreply.github.com> Date: Thu, 19 Jun 2025 14:19:48 +0000 Subject: [PATCH] fix(thread_manager): enhance content validation to include interactive elements --- backend/agentpress/thread_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/agentpress/thread_manager.py b/backend/agentpress/thread_manager.py index f3398d7d..ef87d436 100644 --- a/backend/agentpress/thread_manager.py +++ b/backend/agentpress/thread_manager.py @@ -68,10 +68,12 @@ class ThreadManager: content = msg['content'] if isinstance(content, str) and "ToolResult" in content: return True if isinstance(content, dict) and "tool_execution" in content: return True + if isinstance(content, dict) and "interactive_elements" in content: return True if isinstance(content, str): try: parsed_content = json.loads(content) if isinstance(parsed_content, dict) and "tool_execution" in parsed_content: return True + if isinstance(parsed_content, dict) and "interactive_elements" in content: return True except (json.JSONDecodeError, TypeError): pass return False