Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
e296da8
1
Parent(s): eba82cc
Only show plan_tool output in CLI, hide all other tool outputs
Browse files- agent/main.py +5 -7
agent/main.py
CHANGED
|
@@ -291,11 +291,9 @@ async def event_listener(
|
|
| 291 |
elif event.event_type == "tool_output":
|
| 292 |
output = event.data.get("output", "") if event.data else ""
|
| 293 |
success = event.data.get("success", False) if event.data else False
|
| 294 |
-
#
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
should_truncate = last_tool_name[0] != "plan_tool"
|
| 298 |
-
print_tool_output(output, success, truncate=should_truncate)
|
| 299 |
shimmer.start()
|
| 300 |
elif event.event_type == "turn_complete":
|
| 301 |
shimmer.stop()
|
|
@@ -966,8 +964,8 @@ async def headless_main(prompt: str, model: str | None = None) -> None:
|
|
| 966 |
elif event.event_type == "tool_output":
|
| 967 |
output = event.data.get("output", "") if event.data else ""
|
| 968 |
success = event.data.get("success", False) if event.data else False
|
| 969 |
-
if _hl_last_tool[0]
|
| 970 |
-
print_tool_output(output, success, truncate=
|
| 971 |
shimmer.start()
|
| 972 |
elif event.event_type == "tool_log":
|
| 973 |
tool = event.data.get("tool", "") if event.data else ""
|
|
|
|
| 291 |
elif event.event_type == "tool_output":
|
| 292 |
output = event.data.get("output", "") if event.data else ""
|
| 293 |
success = event.data.get("success", False) if event.data else False
|
| 294 |
+
# Only show output for plan_tool — everything else is noise
|
| 295 |
+
if last_tool_name[0] == "plan_tool" and output:
|
| 296 |
+
print_tool_output(output, success, truncate=False)
|
|
|
|
|
|
|
| 297 |
shimmer.start()
|
| 298 |
elif event.event_type == "turn_complete":
|
| 299 |
shimmer.stop()
|
|
|
|
| 964 |
elif event.event_type == "tool_output":
|
| 965 |
output = event.data.get("output", "") if event.data else ""
|
| 966 |
success = event.data.get("success", False) if event.data else False
|
| 967 |
+
if _hl_last_tool[0] == "plan_tool" and output:
|
| 968 |
+
print_tool_output(output, success, truncate=False)
|
| 969 |
shimmer.start()
|
| 970 |
elif event.event_type == "tool_log":
|
| 971 |
tool = event.data.get("tool", "") if event.data else ""
|