Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
a655ccdd
"sgl-kernel/vscode:/vscode.git/clone" did not exist on "a7d825fccc378e5876bac48b462035a7fedf667e"
Commit
a655ccdd
authored
Feb 20, 2024
by
Danny Liu
Browse files
only cancel chat completion if the deleted message is the most recently sent
parent
95b8edf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/lib/components/chat/Messages.svelte
src/lib/components/chat/Messages.svelte
+5
-1
No files found.
src/lib/components/chat/Messages.svelte
View file @
a655ccdd
...
@@ -227,9 +227,13 @@
...
@@ -227,9 +227,13 @@
history.messages[messageId].deleted = true;
history.messages[messageId].deleted = true;
history.messages[history.messages[messageId].childrenIds[0]].deleted = true;
history.messages[history.messages[messageId].childrenIds[0]].deleted = true;
const responseId = history.messages[messageId].childrenIds[0];
if (history.messages[responseId].childrenIds.length === 0) {
await cancelChatCompletion(localStorage.token, chatId);
}
await updateChatById(localStorage.token, chatId, { history });
await updateChatById(localStorage.token, chatId, { history });
await chats.set(await getChatList(localStorage.token));
await chats.set(await getChatList(localStorage.token));
await cancelChatCompletion(localStorage.token, chatId);
};
};
</script>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment