Skip to content

Commit

Permalink
fix: infinite loop error stream #1421 (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikbry authored Dec 19, 2024
1 parent 5023ca2 commit 693755b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webapp/features/Threads/Conversation/ConversationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -162,6 +166,7 @@ function ConversationProvider({
selectedModelId,
server.stderr,
updateBackendServer,
errorMessages,
]);

const handleProcessing = useCallback(
Expand Down

0 comments on commit 693755b

Please sign in to comment.