This commit is contained in:
Saifeddine ALOUI 2023-04-17 23:38:08 +02:00
parent 8684717317
commit 580e31f4e9
2 changed files with 4 additions and 2 deletions

View File

@ -376,6 +376,7 @@ function addMessage(sender, message, id, rank = 0, can_edit = false) {
// scroll to bottom of chat window // scroll to bottom of chat window
chatWindow.scrollTop = chatWindow.scrollHeight; chatWindow.scrollTop = chatWindow.scrollHeight;
messageElement.messageTextElement = messageTextElement
messageElement.hiddenElement = hiddenElement messageElement.hiddenElement = hiddenElement
messageElement.senderElement = senderElement messageElement.senderElement = senderElement
messageElement.messageTextElement = messageTextElement messageElement.messageTextElement = messageTextElement

View File

@ -66,13 +66,14 @@ function update_main(){
{ {
// We parse it and // We parse it and
infos = JSON.parse(text) infos = JSON.parse(text)
user_msg.setSender(infos.user) user_msg.setSender(infos.user)
user_msg.setID(infos.id) user_msg.setID(infos.id)
bot_msg.setSender(infos.bot) bot_msg.setSender(infos.bot)
bot_msg.setID(infos.response_id) bot_msg.setID(infos.response_id)
messageTextElement=elements; messageTextElement=bot_msg.messageTextElement;
hiddenElement=elements.hiddenElement; hiddenElement=bot_msg.hiddenElement;
entry_counter ++; entry_counter ++;
} }
else{ else{