Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions humux/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4325,10 +4325,19 @@ async def gen(prompt: str, max_tokens: int) -> tuple[str, int]:
target = Path(ws).expanduser() / ARTIFACTS_SUBDIR / slug / "index.html"
target.parent.mkdir(parents=True, exist_ok=True)
target.write_text(page, encoding="utf-8")
result["artifact_url"] = f"{self._base_url()}/artifacts/{slug}/"
url = f"{self._base_url()}/artifacts/{slug}/"
result["artifact_url"] = url
# Deliver the link deterministically, like the progress updates
# β€” the user must get it even if the model's reply drops it.
try:
await progress(f"πŸ“„ Full report: {url}")
except Exception:
log.exception("Failed to deliver deep-research artifact link")
result["note"] = (
"Report published as a web artifact. Reply briefly: the key "
"takeaways plus the artifact_url link β€” do not paste the report."
"Report published as a web artifact; its link was already "
"posted to the chat. Reply briefly: the key takeaways, plus "
"the artifact_url repeated verbatim as a plain URL β€” do not "
"paste the report."
)
except OSError:
log.exception("Failed to write deep-research artifact %s", slug)
Expand Down
Loading