mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 05:39:11 +00:00
Block input text field when waiting for chat response
This commit is contained in:
@@ -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
|
// Evaluate the contents of new_response_text.innerHTML after all the data has been streamed
|
||||||
const currentHTML = newResponseText.innerHTML;
|
const currentHTML = newResponseText.innerHTML;
|
||||||
newResponseText.innerHTML = formatHTMLMessage(currentHTML);
|
newResponseText.innerHTML = formatHTMLMessage(currentHTML);
|
||||||
|
if (references != null) {
|
||||||
newResponseText.appendChild(references);
|
newResponseText.appendChild(references);
|
||||||
|
}
|
||||||
document.getElementById("chat-body").scrollTop = document.getElementById("chat-body").scrollHeight;
|
document.getElementById("chat-body").scrollTop = document.getElementById("chat-body").scrollHeight;
|
||||||
|
document.getElementById("chat-input").removeAttribute("disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +268,6 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
readStream();
|
readStream();
|
||||||
document.getElementById("chat-input").removeAttribute("disabled");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user