fix: address PR review comments - remove inline comments, add stripInternalReasoning

- Remove remaining inline comments per style guidelines
- Add stripInternalReasoning to error case in formatToolResponse
This commit is contained in:
Zamil Majdy
2026-01-30 07:23:08 -06:00
parent 16ae8ddbe0
commit f83366d08d
2 changed files with 1 additions and 4 deletions

View File

@@ -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(

View File

@@ -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[]) || [];