mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-29 10:13:14 +08:00
feat: update chat view response style
This commit is contained in:
@ -38,22 +38,15 @@ const MessageTextarea = (props: Props) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentChat = chatStore.currentChat;
|
||||
if (currentChat.isRequesting) {
|
||||
toast.error("Please wait for the previous message to be sent.");
|
||||
return;
|
||||
}
|
||||
|
||||
messageStore.addMessage({
|
||||
id: generateUUID(),
|
||||
chatId: currentChat.id,
|
||||
chatId: chatStore.currentChat.id,
|
||||
creatorId: userStore.currentUser.id,
|
||||
createdAt: Date.now(),
|
||||
content: value,
|
||||
});
|
||||
setValue("");
|
||||
textareaRef.current!.value = "";
|
||||
|
||||
await sendMessage();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user