feat: unique chat id

This commit is contained in:
Jeffrey-Wang
2023-06-11 13:14:53 +08:00
parent 011f6afcb3
commit 023967e0c2
5 changed files with 19 additions and 11 deletions
@@ -118,7 +118,8 @@ export const ChatMessage = ({ open, chatflowid, isDialog }) => {
setLoading(true)
setMessages((prevMessages) => [...prevMessages, { message: userInput, type: 'userMessage' }])
addChatMessage(userInput, 'userMessage')
// waiting for first chatmessage uploaded, the first chatmessage id will be chatId for every components
await addChatMessage(userInput, 'userMessage')
// Send user question and history to API
try {