diff --git a/modules/ai_chatbot/js/deepchat-init.js b/modules/ai_chatbot/js/deepchat-init.js index b6a5e05..3756e90 100644 --- a/modules/ai_chatbot/js/deepchat-init.js +++ b/modules/ai_chatbot/js/deepchat-init.js @@ -120,6 +120,9 @@ } return response.json(); }).then(data => { + // Clear the messages from the drupal setting so they are not + // rerendered. + drupalSettings.ai_deepchat.messages = []; setThreadId(data.thread_id); deepchatElement.clearMessages(false); deepchatElement.addMessage({