fix: filter outlet issue

This commit is contained in:
Timothy J. Baek 2024-09-25 13:44:06 +02:00
parent 92b1acd6fb
commit 6c4445d545

View File

@ -483,11 +483,12 @@
}
}
await tick();
if ($chatId == chatId) {
if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, chatId, {
models: selectedModels,
messages: messages,
history: history,
params: params,
files: chatFiles
@ -1134,13 +1135,6 @@
}
}
}
await chatCompletedHandler(
_chatId,
model.id,
responseMessageId,
createMessagesList(responseMessageId)
);
} else {
if (res !== null) {
const error = await res.json();
@ -1169,11 +1163,18 @@
(status) => status.action !== 'knowledge_search'
);
}
history.messages[responseMessageId] = responseMessage;
}
await saveChatHandler(_chatId);
history.messages[responseMessageId] = responseMessage;
await chatCompletedHandler(
_chatId,
model.id,
responseMessageId,
createMessagesList(responseMessageId)
);
stopResponseFlag = false;
await tick();
@ -1430,13 +1431,6 @@
}
}
await chatCompletedHandler(
_chatId,
model.id,
responseMessageId,
createMessagesList(responseMessageId)
);
if ($settings.notificationEnabled && !document.hasFocus()) {
const notification = new Notification(`${model.id}`, {
body: responseMessage.content,
@ -1464,6 +1458,13 @@
history.messages[responseMessageId] = responseMessage;
await chatCompletedHandler(
_chatId,
model.id,
responseMessageId,
createMessagesList(responseMessageId)
);
stopResponseFlag = false;
await tick();