mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-19 15:18:03 +00:00
fix(delegate): flatten content blocks in live overlay tail + AUTHOR_MAP
Follow-up on the cherry-picked content-block fix. _extract_output_tail
(the live subagent overlay) still used crude str(content), which renders
a "[{'type': 'text'...}]" blob and — worse — mislabels a block-wrapped
"Error: ..." result as is_error=False. Route it through the same
_stringify_tool_content helper so error detection and previews work at
both consumer sites.
- delegate_tool.py: _extract_output_tail uses _stringify_tool_content
- tests: add _extract_output_tail content-block test (error detection +
clean preview)
- release.py: AUTHOR_MAP entry for randomsnowflake (CI gate)
This commit is contained in:
parent
f83918c31d
commit
f8a241e105
3 changed files with 41 additions and 3 deletions
|
|
@ -261,9 +261,11 @@ def _extract_output_tail(
|
|||
break
|
||||
if not isinstance(msg, dict) or msg.get("role") != "tool":
|
||||
continue
|
||||
content = msg.get("content") or ""
|
||||
if not isinstance(content, str):
|
||||
content = str(content)
|
||||
# Flatten content-block lists/dicts to text so the overlay shows real
|
||||
# output (not a "[{'type': 'text'...}]" blob) and error detection can
|
||||
# see markers buried inside content blocks. Crude str() here would
|
||||
# mislabel a block-wrapped "Error: ..." result as is_error=False.
|
||||
content = _stringify_tool_content(msg.get("content") or "")
|
||||
is_error = _looks_like_error_output(content)
|
||||
tool_name = pending_call_by_id.get(msg.get("tool_call_id") or "", "tool")
|
||||
# Preserve line structure so the overlay's wrapped scroll region can
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue