From b46b78982c757d6f81ef17fade041e1eec2dc768 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Sat, 19 Apr 2025 22:10:47 -0600 Subject: [PATCH] Update useChatStreamMessage.ts --- web/src/context/Chats/useChatStreamMessage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/context/Chats/useChatStreamMessage.ts b/web/src/context/Chats/useChatStreamMessage.ts index 01df145d7..71a71c16c 100644 --- a/web/src/context/Chats/useChatStreamMessage.ts +++ b/web/src/context/Chats/useChatStreamMessage.ts @@ -84,9 +84,9 @@ export const useChatStreamMessage = () => { const completeChatCallback = useMemoizedFn((d: BusterChat) => { const { iChat, iChatMessages } = updateChatToIChat(d, false); chatRef.current[iChat.id] = iChat; + removeBlackBoxMessage({ messageId: iChat.message_ids[iChat.message_ids.length - 1] }); normalizeChatMessage(iChatMessages); onUpdateChat(iChat); - removeBlackBoxMessage({ messageId: iChat.message_ids[iChat.message_ids.length - 1] }); prefetchLastMessageMetricData(iChat, iChatMessages); queryClient.invalidateQueries({ queryKey: [queryKeys.chatsGetList().queryKey, queryKeys.metricsGetList().queryKey]