This commit is contained in:
Timothy Jaeryang Baek committed 2026-12-01 00:14:25 +04:00
1 parent bc410a62bd
commit abdaa9d143
1 file changed
+5 -2
+5 -2
View File
@@ -1837,8 +1837,8 @@
const connectionId = socket?.id;
if (next && socket)
socket.emit('events:chat', { chat_id: next, data: { type: 'join' } }, (accepted: boolean) => {
if (!socket.connected || socket.id !== connectionId || $chatId !== next) return;
if (!accepted) clearPresence();
if (accepted || !socket.connected || socket.id !== connectionId || $chatId !== next) return;
clearPresence();
// A refused join can mean access was lost; the refresh then sends the reader home.
void refreshChat();
});
@@ -2325,6 +2325,8 @@
}
joinedChatId = '';
syncChatRoom($socket, $chatId, $temporaryChat);
// Updates sent while disconnected were missed.
void refreshChat();
const id = $chatId;
const tasks = await getTaskIdsByChatId(localStorage.token, id).catch(() => null);
if ($chatId !== id || !tasks) return;
@@ -3580,6 +3582,7 @@
// nodes from failed regenerations (#24424, #24157, #20474)
sanitizeHistory(history);
cachedHistory = cached ? { ...history, messages: { ...history.messages } } : null;
if (cached) void refreshChat();
chatTitle.set(chatContent.title);
branchPointMessageId =