fix(streaming): preserve recovered segments across channels
This commit is contained in:
1 parent
e6baecafcd
commit
b55b76d755
12 files changed
+208
No files matched your search
@@ -1257,6 +1257,10 @@ class WeixinChannel(BaseChannel):
|
||||
return
|
||||
is_end = stream_end or bool(meta.get("_stream_end"))
|
||||
buffer_key = stream_id or chat_id
|
||||
if is_end and merge_next:
|
||||
if delta:
|
||||
self._stream_buffers.setdefault(buffer_key, []).append(delta)
|
||||
return
|
||||
# Accumulate intermediate deltas. The stream_end message's own content
|
||||
# (present when the manager coalesces deltas into the end message) is
|
||||
# folded into `full` below instead of appended here, so a send retry
|
||||
|
||||
Reference in new issue
Block a user