From 7d76a337901239835014ad55c1174fbef8c9738e Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 9 May 2025 22:15:55 +0100 Subject: [PATCH 1/2] fix:(style) update layout for agent list and card components --- frontend/src/agents/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/agents/index.tsx b/frontend/src/agents/index.tsx index d0052111..4634dc76 100644 --- a/frontend/src/agents/index.tsx +++ b/frontend/src/agents/index.tsx @@ -127,7 +127,7 @@ function AgentsList() { New Agent -
+
{loading ? (
@@ -231,7 +231,7 @@ function AgentCard({ }; return (
{ e.stopPropagation(); handleClick(); From 32803c89a393406926658d8a52f7f7195df46712 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 9 May 2025 22:52:17 +0100 Subject: [PATCH 2/2] fix: truncate tool call results to 50 characters for cleaner output --- application/agents/classic_agent.py | 4 ++++ application/agents/react_agent.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/application/agents/classic_agent.py b/application/agents/classic_agent.py index b96a77fc..b371123b 100644 --- a/application/agents/classic_agent.py +++ b/application/agents/classic_agent.py @@ -57,4 +57,8 @@ class ClassicAgent(BaseAgent): ) yield {"sources": retrieved_data} + # clean tool_call_data only send first 50 characters of tool_call['result'] + for tool_call in self.tool_calls: + if len(str(tool_call["result"])) > 50: + tool_call["result"] = str(tool_call["result"])[:50] + "..." yield {"tool_calls": self.tool_calls.copy()} diff --git a/application/agents/react_agent.py b/application/agents/react_agent.py index a5d47850..5fce00b3 100644 --- a/application/agents/react_agent.py +++ b/application/agents/react_agent.py @@ -87,6 +87,10 @@ class ReActAgent(BaseAgent): ) yield {"sources": retrieved_data} + # clean tool_call_data only send first 50 characters of tool_call['result'] + for tool_call in self.tool_calls: + if len(str(tool_call["result"])) > 50: + tool_call["result"] = str(tool_call["result"])[:50] + "..." yield {"tool_calls": self.tool_calls.copy()} final_answer = self._create_final_answer(query, self.observations, log_context)