Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
c9b20bb
1
Parent(s): 22c7ba4
Log 20-char output preview for sub-agent tool calls
Browse files
agent/tools/research_tool.py
CHANGED
|
@@ -295,6 +295,11 @@ async def research_handler(
|
|
| 295 |
output, _success = await session.tool_router.call_tool(
|
| 296 |
tool_name, tool_args, session=session
|
| 297 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
# Truncate tool output for the research context
|
| 299 |
if len(output) > 8000:
|
| 300 |
output = (
|
|
|
|
| 295 |
output, _success = await session.tool_router.call_tool(
|
| 296 |
tool_name, tool_args, session=session
|
| 297 |
)
|
| 298 |
+
# Log a short preview of the output
|
| 299 |
+
preview = output.replace("\n", " ").strip()[:20]
|
| 300 |
+
if len(output.strip()) > 20:
|
| 301 |
+
preview += "…"
|
| 302 |
+
await _log(f" → {preview}")
|
| 303 |
# Truncate tool output for the research context
|
| 304 |
if len(output) > 8000:
|
| 305 |
output = (
|