mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
fa8bb51b81
commit
1803c7adeb
1 changed files with 2 additions and 27 deletions
|
|
@ -1020,21 +1020,6 @@
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($chatId == _chatId) {
|
|
||||||
if ($settings.saveChatHistory ?? true) {
|
|
||||||
chat = await updateChatById(localStorage.token, _chatId, {
|
|
||||||
messages: messages,
|
|
||||||
history: history,
|
|
||||||
models: selectedModels,
|
|
||||||
params: params,
|
|
||||||
files: chatFiles
|
|
||||||
});
|
|
||||||
|
|
||||||
currentChatPage.set(1);
|
|
||||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
const error = await res.json();
|
const error = await res.json();
|
||||||
|
|
@ -1066,6 +1051,7 @@
|
||||||
|
|
||||||
messages = messages;
|
messages = messages;
|
||||||
}
|
}
|
||||||
|
await saveChatHandler(_chatId);
|
||||||
|
|
||||||
stopResponseFlag = false;
|
stopResponseFlag = false;
|
||||||
await tick();
|
await tick();
|
||||||
|
|
@ -1335,18 +1321,7 @@
|
||||||
await handleOpenAIError(error, null, model, responseMessage);
|
await handleOpenAIError(error, null, model, responseMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($chatId == _chatId) {
|
await saveChatHandler(_chatId);
|
||||||
chat = await updateChatById(localStorage.token, _chatId, {
|
|
||||||
models: selectedModels,
|
|
||||||
messages: messages,
|
|
||||||
history: history,
|
|
||||||
params: params,
|
|
||||||
files: chatFiles
|
|
||||||
});
|
|
||||||
|
|
||||||
currentChatPage.set(1);
|
|
||||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
|
||||||
}
|
|
||||||
|
|
||||||
messages = messages;
|
messages = messages;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue