mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-27 13:15:00 +00:00
fix(ui): UI improvements
Visual improvements and bugfixes including: - disable pagination during search - fix scrolling on new message Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
773b13321c
commit
a3fd24ea22
3 changed files with 385 additions and 260 deletions
|
@ -49,7 +49,7 @@ function submitPrompt(event) {
|
|||
document.getElementById("input").value = "";
|
||||
const key = localStorage.getItem("key");
|
||||
const systemPrompt = localStorage.getItem("system_prompt");
|
||||
|
||||
Alpine.nextTick(() => { document.getElementById('messages').scrollIntoView(false); });
|
||||
promptGPT(systemPrompt, key, input);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,6 @@ function readInputImage() {
|
|||
// Make the "loader" visible
|
||||
document.getElementById("loader").style.display = "block";
|
||||
document.getElementById("input").disabled = true;
|
||||
document.getElementById('messages').scrollIntoView(false)
|
||||
|
||||
messages = Alpine.store("chat").messages();
|
||||
|
||||
|
@ -181,8 +180,8 @@ function readInputImage() {
|
|||
const chatStore = Alpine.store("chat");
|
||||
chatStore.add("assistant", token);
|
||||
// Efficiently scroll into view without triggering multiple reflows
|
||||
const messages = document.getElementById('messages');
|
||||
messages.scrollTop = messages.scrollHeight;
|
||||
// const messages = document.getElementById('messages');
|
||||
// messages.scrollTop = messages.scrollHeight;
|
||||
};
|
||||
|
||||
let buffer = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue