diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index e1c9979d..bd4870e4 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -205,8 +205,11 @@ To get started, just start typing below. You can also type / to see a list of co // Evaluate the contents of new_response_text.innerHTML after all the data has been streamed const currentHTML = newResponseText.innerHTML; newResponseText.innerHTML = formatHTMLMessage(currentHTML); - newResponseText.appendChild(references); + if (references != null) { + newResponseText.appendChild(references); + } document.getElementById("chat-body").scrollTop = document.getElementById("chat-body").scrollHeight; + document.getElementById("chat-input").removeAttribute("disabled"); return; } @@ -265,7 +268,6 @@ To get started, just start typing below. You can also type / to see a list of co }); } readStream(); - document.getElementById("chat-input").removeAttribute("disabled"); }); }