fix: prevent empty Matrix messages when progress callback sends empty content

Agent-Logs-Url: https://github.com/halldorjanetzko/nanobot/sessions/df528c59-8214-41a0-9b79-9d1d41857107

Co-authored-by: halldorjanetzko <158819146+halldorjanetzko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andhalldorjanetzko authored and Xubin Ren committed 2026-05-01 19:31:04 +08:00
1 parent 15007afd4a
commit 0284174df9
2 files changed
+39 -1

No files matched your search

+1 -1
View File
@@ -524,7 +524,7 @@ class MatrixChannel(BaseChannel):
failures.append(fail)
if failures:
text = f"{text.rstrip()}\n{chr(10).join(failures)}" if text.strip() else "\n".join(failures)
if text or not candidates:
if text.strip():
content = _build_matrix_text_content(text)
if relates_to:
content["m.relates_to"] = relates_to