render markdown in old chats

This commit is contained in:
Christian Rute 2024-11-18 17:48:18 +01:00
parent bf9e076f3e
commit d031c8ce86

View File

@ -130,7 +130,7 @@ function loadChatHistory(chatId) {
chatHistory.forEach(entry => { chatHistory.forEach(entry => {
const messageElement = document.createElement('div'); const messageElement = document.createElement('div');
messageElement.classList.add('chat-message', entry.role); messageElement.classList.add('chat-message', entry.role);
messageElement.innerText = entry.content; messageElement.innerHTML = renderMarkdown(entry.content);
chatBox.prepend(messageElement); chatBox.prepend(messageElement);
}); });
} }