From 7566f73757f7cdcae1291c2c89f0a014b62b637c Mon Sep 17 00:00:00 2001 From: Li Xin Date: Fri, 25 Apr 2025 14:48:08 +0800 Subject: [PATCH] feat: adjust animation speed --- web/src/core/api/chat.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/core/api/chat.ts b/web/src/core/api/chat.ts index ee600f8..6f500cd 100644 --- a/web/src/core/api/chat.ts +++ b/web/src/core/api/chat.ts @@ -90,17 +90,17 @@ async function* chatReplayStream( } as ChatEvent; if (chatEvent.type === "message_chunk") { if (!chatEvent.data.finish_reason) { - await sleepInReplay(100 + Math.random() * 250); + await sleepInReplay(100 + Math.random() * 175); } } else if (chatEvent.type === "tool_call_result") { - await sleepInReplay(1500); + await sleepInReplay(500); } yield chatEvent; if (chatEvent.type === "tool_call_result") { await sleepInReplay(800); } else if (chatEvent.type === "message_chunk") { if (chatEvent.data.role === "user") { - await sleepInReplay(1000); + await sleepInReplay(500); } } } catch (e) {