diff --git a/core/ui/api_server.py b/core/ui/api_server.py index 26f9dd1e..ac0621d7 100644 --- a/core/ui/api_server.py +++ b/core/ui/api_server.py @@ -346,7 +346,7 @@ class IPCServer: await self._add_to_chat_history(project_state_id, convo, message, str(response)) # Send final message - # await send_stream_chunk(writer, message_type, None, request_id) + await send_stream_chunk(writer, message_type, None, request_id) except (ConnectionResetError, BrokenPipeError) as err: log.error(f"Failed to send streaming response: {err}", exc_info=True) diff --git a/core/ui/ipc_client.py b/core/ui/ipc_client.py index 9e3dfc53..9f274c64 100644 --- a/core/ui/ipc_client.py +++ b/core/ui/ipc_client.py @@ -228,7 +228,7 @@ class IPCClientUI(UIBase): return if chunk is None: - chunk = "\n" # end of stream + chunk = "<__stream_end__>" # end of stream await self._send( MessageType.STREAM,