trim chat content

This commit is contained in:
josc146 2023-05-21 23:44:56 +08:00
parent 74ceffb32c
commit b2960052d9

View File

@ -170,6 +170,7 @@ const ChatPanel: FC = observer(() => {
scrollToBottom(); scrollToBottom();
if (e.data === '[DONE]') { if (e.data === '[DONE]') {
commonStore.conversations[answerId].done = true; commonStore.conversations[answerId].done = true;
commonStore.conversations[answerId].content = commonStore.conversations[answerId].content.trim();
commonStore.setConversations(commonStore.conversations); commonStore.setConversations(commonStore.conversations);
commonStore.setConversationsOrder([...commonStore.conversationsOrder]); commonStore.setConversationsOrder([...commonStore.conversationsOrder]);
return; return;