mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-26 07:14:47 +08:00
feat: adjust animation speed
This commit is contained in:
@@ -90,17 +90,17 @@ async function* chatReplayStream(
|
|||||||
} as ChatEvent;
|
} as ChatEvent;
|
||||||
if (chatEvent.type === "message_chunk") {
|
if (chatEvent.type === "message_chunk") {
|
||||||
if (!chatEvent.data.finish_reason) {
|
if (!chatEvent.data.finish_reason) {
|
||||||
await sleepInReplay(100 + Math.random() * 250);
|
await sleepInReplay(100 + Math.random() * 175);
|
||||||
}
|
}
|
||||||
} else if (chatEvent.type === "tool_call_result") {
|
} else if (chatEvent.type === "tool_call_result") {
|
||||||
await sleepInReplay(1500);
|
await sleepInReplay(500);
|
||||||
}
|
}
|
||||||
yield chatEvent;
|
yield chatEvent;
|
||||||
if (chatEvent.type === "tool_call_result") {
|
if (chatEvent.type === "tool_call_result") {
|
||||||
await sleepInReplay(800);
|
await sleepInReplay(800);
|
||||||
} else if (chatEvent.type === "message_chunk") {
|
} else if (chatEvent.type === "message_chunk") {
|
||||||
if (chatEvent.data.role === "user") {
|
if (chatEvent.data.role === "user") {
|
||||||
await sleepInReplay(1000);
|
await sleepInReplay(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user