From f83366d08d8d8cae2108dfa3059ef2ce05d24155 Mon Sep 17 00:00:00 2001 From: Zamil Majdy Date: Fri, 30 Jan 2026 07:23:08 -0600 Subject: [PATCH] fix: address PR review comments - remove inline comments, add stripInternalReasoning - Remove remaining inline comments per style guidelines - Add stripInternalReasoning to error case in formatToolResponse --- .../backend/api/features/chat/tools/agent_generator/core.py | 3 --- .../contextual/Chat/components/ToolResponseMessage/helpers.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py b/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py index ff5b0b86a9..056179b938 100644 --- a/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py +++ b/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py @@ -208,7 +208,6 @@ async def get_library_agents_for_generation( results: list[LibraryAgentSummary] = [] for agent in response.agents: - # Exclude the agent being generated/edited to prevent circular references if exclude_graph_id is not None and agent.graph_id == exclude_graph_id: continue @@ -401,7 +400,6 @@ async def enrich_library_agents_from_steps( Returns: Combined list of library agents (existing + newly discovered) """ - # Extract search terms from steps search_terms = extract_search_terms_from_steps(decomposition_result) if not search_terms: @@ -666,7 +664,6 @@ async def get_agent_as_json( if not graph: return None - # Convert to JSON format nodes = [] for node in graph.nodes: nodes.append( diff --git a/autogpt_platform/frontend/src/components/contextual/Chat/components/ToolResponseMessage/helpers.ts b/autogpt_platform/frontend/src/components/contextual/Chat/components/ToolResponseMessage/helpers.ts index 33df39cd86..2397176603 100644 --- a/autogpt_platform/frontend/src/components/contextual/Chat/components/ToolResponseMessage/helpers.ts +++ b/autogpt_platform/frontend/src/components/contextual/Chat/components/ToolResponseMessage/helpers.ts @@ -364,7 +364,7 @@ export function formatToolResponse(result: unknown, toolName: string): string { case "error": const errorMsg = (response.message as string) || response.error || "An error occurred"; - return String(errorMsg); + return stripInternalReasoning(String(errorMsg)); case "no_results": const suggestions = (response.suggestions as string[]) || [];