Block input text field when waiting for chat response

This commit is contained in:
sabaimran
2023-11-11 17:14:37 -08:00
parent 9c321ac070
commit 603f838115

View File

@@ -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");
});
}