Merge pull request #38 from ollama-webui/dev

fix: unfinished chat load error
This commit is contained in:
Timothy Jaeryang Baek 2023-10-28 22:34:17 -05:00 committed by GitHub
commit 576ab695b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,6 +236,9 @@
const loadChat = async (id) => { const loadChat = async (id) => {
const chat = await db.get('chats', id); const chat = await db.get('chats', id);
if (chatId !== chat.id) { if (chatId !== chat.id) {
if (chat.messages.length > 0) {
chat.messages.at(-1).done = true;
}
messages = chat.messages; messages = chat.messages;
title = chat.title; title = chat.title;
chatId = chat.id; chatId = chat.id;