diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx index 5cbc2d17b..0d783b36e 100644 --- a/src/frontend/src/modals/chatModal/index.tsx +++ b/src/frontend/src/modals/chatModal/index.tsx @@ -86,12 +86,15 @@ export default function ChatModal({ if (end) { newChat[newChat.length - 1].message = str; } else { - newChat[newChat.length - 1].message = - newChat[newChat.length - 1].message + str; + newChat[newChat.length - 1].message += str; } } if (thought) { - newChat[newChat.length - 1].thought = thought; + if (end) { + newChat[newChat.length - 1].thought = thought; + } else { + newChat[newChat.length - 1].thought += thought; + } } if (files) { newChat[newChat.length - 1].files = files;