Skip to content

Your lightweight open-source personal agent.

fix(websocket): always send text in stream_end when stream had content

Syoc4dd5b62f11ca
diff --git a/nanobot/channels/websocket.py b/nanobot/channels/websocket.py
index 9527c0dd7..62eb04cc5 100644
--- a/nanobot/channels/websocket.py
+++ b/nanobot/channels/websocket.py
@@ -1063,7 +1063,7 @@ class WebSocketChannel(BaseChannel):
buffered.append(delta)
full_text = "".join(buffered)
rewritten = self._media.rewrite_local_markdown_images(full_text)
- if rewritten != full_text:
+ if full_text:
body["text"] = rewritten
else:
body = {