Skip to content

Commit 88d1d8d

Browse files
View human added hints in xray agent_info.
1 parent 97f3904 commit 88d1d8d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/agentlab/analyze/agent_xray.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,18 @@ def update_agent_info_html():
818818
s1, action_str = get_screenshot(info, info.step, False)
819819
s2, action_str = get_screenshot(info, info.step + 1, False)
820820
agent_info = info.exp_result.steps_info[info.step].agent_info
821+
# Minimal: show step_hints if present
822+
hints = (
823+
agent_info.get("step_hints")
824+
or agent_info.get("hints")
825+
or agent_info.get("extra_info", {}).get("step_hints")
826+
)
827+
if hints:
828+
if not isinstance(hints, (list, tuple)):
829+
hints = [hints]
830+
items = "".join(f"<li>{html.escape(str(h))}</li>" for h in hints)
831+
hints_html = f"<html><body><h3>Step Hints</h3><ul>{items}</ul></body></html>"
832+
return _page_to_iframe(hints_html), s1, s2
821833
page = agent_info.get("html_page", ["No Agent Info"])
822834
if page is None:
823835
page = """Fill up html_page attribute in AgentInfo to display here."""

0 commit comments

Comments
 (0)