mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Append chat message to chat logs as TextNodes in web, desktop clients
This commit is contained in:
@@ -74,7 +74,8 @@
|
|||||||
// Create a new div for the chat message text and append it to the chat message
|
// Create a new div for the chat message text and append it to the chat message
|
||||||
let chatMessageText = document.createElement('div');
|
let chatMessageText = document.createElement('div');
|
||||||
chatMessageText.className = `chat-message-text ${by}`;
|
chatMessageText.className = `chat-message-text ${by}`;
|
||||||
chatMessageText.innerHTML = formattedMessage;
|
let textNode = document.createTextNode(formattedMessage);
|
||||||
|
chatMessageText.appendChild(textNode);
|
||||||
chatMessage.appendChild(chatMessageText);
|
chatMessage.appendChild(chatMessageText);
|
||||||
|
|
||||||
// Append annotations div to the chat message
|
// Append annotations div to the chat message
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
// Create a new div for the chat message text and append it to the chat message
|
// Create a new div for the chat message text and append it to the chat message
|
||||||
let chatMessageText = document.createElement('div');
|
let chatMessageText = document.createElement('div');
|
||||||
chatMessageText.className = `chat-message-text ${by}`;
|
chatMessageText.className = `chat-message-text ${by}`;
|
||||||
chatMessageText.innerHTML = formattedMessage;
|
let textNode = document.createTextNode(formattedMessage);
|
||||||
|
chatMessageText.appendChild(textNode);
|
||||||
chatMessage.appendChild(chatMessageText);
|
chatMessage.appendChild(chatMessageText);
|
||||||
|
|
||||||
// Append annotations div to the chat message
|
// Append annotations div to the chat message
|
||||||
|
|||||||
Reference in New Issue
Block a user