fix(teacher): 隔离子智能体流式消息与老师正文
This commit is contained in:
@@ -308,6 +308,7 @@ export function prepareCloudTeacher(
|
||||
typeof detail === 'string' ? detail : '老师回复已停止。'
|
||||
);
|
||||
}
|
||||
const threadId = identifier(view.thread_id);
|
||||
onProgress('老师正在思考…');
|
||||
try {
|
||||
await transport.events(
|
||||
@@ -318,6 +319,8 @@ export function prepareCloudTeacher(
|
||||
bounded,
|
||||
(_event, envelope, id) => {
|
||||
if (id) cursor = id;
|
||||
// Yuxi 的父 Run 也包含子线程事件,老师正文只接收云端主线程文本。
|
||||
if (envelope.thread_id !== threadId) return;
|
||||
const payload = envelope.payload ? object(envelope.payload) : {};
|
||||
for (const item of Array.isArray(payload.items)
|
||||
? payload.items
|
||||
|
||||
Reference in New Issue
Block a user