From 693755b2726cdf40f9a1682171342b128c61b58d Mon Sep 17 00:00:00 2001 From: Mik Date: Thu, 19 Dec 2024 12:35:40 +0100 Subject: [PATCH] fix: infinite loop error stream #1421 (#1434) --- webapp/features/Threads/Conversation/ConversationContext.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp/features/Threads/Conversation/ConversationContext.tsx b/webapp/features/Threads/Conversation/ConversationContext.tsx index 294302cb..f8de6951 100644 --- a/webapp/features/Threads/Conversation/ConversationContext.tsx +++ b/webapp/features/Threads/Conversation/ConversationContext.tsx @@ -142,6 +142,10 @@ function ConversationProvider({ const stream = streams[conversationId]; if (stream.status === 'error') { const error = stream.content[0]; + if (errorMessages[conversationId] === error) { + return; + } + handleError(conversationId, error); const model = modelStorage.items.find((m) => m.id === selectedModelId); if (model) { @@ -162,6 +166,7 @@ function ConversationProvider({ selectedModelId, server.stderr, updateBackendServer, + errorMessages, ]); const handleProcessing = useCallback(