fix: Enter does not create a new line after sending the data

This commit is contained in:
Jens Rapp 2024-08-18 11:48:31 +02:00
parent 16796f86c9
commit 784f2530f9
No known key found for this signature in database
GPG Key ID: BA31635CA641E768

View File

@ -157,6 +157,7 @@
}
function send_form(event) {
event.preventDefault();
const data = JSON.parse(document.getElementById("parameters").value) || {};
data.prompt = document.getElementById("textfield").value;
document.getElementById("textfield").value = "";
@ -170,6 +171,8 @@
// remove the context
if (data.prompt == "/clear") {
document.getElementById("context").value = "[]";
append_text("Context has been cleared.");
return;
}
const xhr = new XMLHttpRequest();