From 6d97918ff920a48005708cb54a3e8739a9df3943 Mon Sep 17 00:00:00 2001 From: Chengxun Lee <24319042+bclswl0827@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:37:45 +0800 Subject: [PATCH] Show typewrite effect only on last response --- src/views/Chat.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Chat.tsx b/src/views/Chat.tsx index 4cf2d5e..4b325c9 100644 --- a/src/views/Chat.tsx +++ b/src/views/Chat.tsx @@ -237,7 +237,11 @@ const Chat = () => { `; - if (ai.busy && role === SessionRole.Model) { + if ( + !ai.busy && + role === SessionRole.Model && + index === chat.length - 1 + ) { parts += `
`; } return (