fix(webui): preserve answer checkpoints and stream order (#6368)

* fix(webui): preserve answer checkpoints and stream order

* fix(stream): close hosted-tool answer segments at the producer
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-21 18:30:52 +08:00
1 parent d2ab462b42
commit 76da55994b
19 files changed
+745 -195

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ class AgentProgressHook(AgentHook):
"embeds": [],
}
if phase == "start":
await self.emit_reasoning_end()
await self.on_stream_end(context, resuming=True)
tool_call = ToolCallRequest(id=str(call_id), name=name, arguments=arguments)
tool_hint = self._strip_think(self._tool_hint([tool_call])) or name
await self._publish(ProgressEvent(
+3
View File
@@ -1378,6 +1378,9 @@ def _client_projection_event(
if event in {"delta", "stream_end", "reasoning_delta", "reasoning_end"}:
projected = {"event": event, **common}
stream_id = record.get("stream_id")
if isinstance(stream_id, str) and stream_id:
projected["stream_id"] = stream_id
text = record.get("text")
if isinstance(text, str):
if event == "stream_end" and augment_assistant_text is not None: