Hide pre-tool content from chat stream
This commit is contained in:
@@ -563,7 +563,11 @@ function writeRuntimeEvent(
|
||||
);
|
||||
}
|
||||
if (event.type === "content_delta" && event.delta) {
|
||||
writeTextDelta(writer, event.delta, streamState);
|
||||
// content_delta 是模型本轮原始 assistant 消息流。若本轮随后调用工具,
|
||||
// 这段文本会作为 tool_start.assistant_content 进入右侧活动阶段说明;
|
||||
// 若本轮不调用工具,后端也会用 final_text_delta 输出最终回复。
|
||||
// 因此这里不要直接写到对话正文,避免“工具调用前说明”占一条回复。
|
||||
return;
|
||||
}
|
||||
if (event.type === "tool_call_delta") {
|
||||
const key =
|
||||
|
||||
Reference in New Issue
Block a user