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:
1 parent
d2ab462b42
commit
76da55994b
19 files changed
+745
-195
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user