diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index d5908ca30..7bcfbbf6c 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -54,10 +54,6 @@ export default function Conversation() { } }, []); - useEffect(() => { - fetchStream.current && fetchStream.current.abort(); - }, [conversationId]); - useEffect(() => { if (queries.length) { queries[queries.length - 1].error && setLastQueryReturnedErr(true); diff --git a/frontend/src/conversation/conversationSlice.ts b/frontend/src/conversation/conversationSlice.ts index bf3753119..1b7e9d41e 100644 --- a/frontend/src/conversation/conversationSlice.ts +++ b/frontend/src/conversation/conversationSlice.ts @@ -151,6 +151,7 @@ export const conversationSlice = createSlice({ state, action: PayloadAction<{ index: number; query: Partial }>, ) { + if (state.status === 'idle') return; const { index, query } = action.payload; if (query.response != undefined) { state.queries[index].response = @@ -167,6 +168,7 @@ export const conversationSlice = createSlice({ action: PayloadAction<{ query: Partial }>, ) { state.conversationId = action.payload.query.conversationId ?? null; + state.status = 'idle'; }, updateStreamingSource( state,