mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-23 06:00:42 -05:00
fix: the chat beside a note raises notifications and loses input requests (#34159)
With a note open and its chat beside it, every finished answer in that chat also popped up as a notification, and a tool's request for input there was cancelled at once by the main chat, which stays loaded behind the note. The chat beside a note is now listed among the chats open beside the main chat, as a side chat already is, so its answers no longer pop up and its input requests stay with it. A chat left by picking another one, beside a note or in a side chat, comes off that list again. Fixes #34153 Fixes #34154
This commit is contained in:
1 parent
178a6df0dc
commit
2ccf69ceac
1 file changed
+11
-2
@@ -1644,7 +1644,16 @@
|
||||
});
|
||||
};
|
||||
$: syncChatRoom($socket, $chatId, $temporaryChatEnabled);
|
||||
$: if (side && $chatId) openSideChatIds.update((ids) => new Set([...ids, $chatId]));
|
||||
let openSideChatId: string = '';
|
||||
$: if (embedded && $chatId !== openSideChatId) {
|
||||
openSideChatIds.update((ids) => {
|
||||
const next = new Set(ids);
|
||||
next.delete(openSideChatId);
|
||||
if ($chatId) next.add($chatId);
|
||||
return next;
|
||||
});
|
||||
openSideChatId = $chatId;
|
||||
}
|
||||
|
||||
const chatEventHandler = async (event, cb) => {
|
||||
if (isTemporaryChatId(event.chat_id) && event.chat_id !== $chatId) return;
|
||||
@@ -2222,7 +2231,7 @@
|
||||
if (joinedChatId && $socket?.connected)
|
||||
$socket.emit('events:chat', { chat_id: joinedChatId, data: { type: 'leave' } });
|
||||
joinedChatId = '';
|
||||
if (side && $chatId) {
|
||||
if (embedded && $chatId) {
|
||||
if ($temporaryChatEnabled)
|
||||
stopTasksByChatId(localStorage.token, $chatId).catch(console.error);
|
||||
openSideChatIds.update((ids) => {
|
||||
|
||||
Reference in new issue
Block a user