Skip to content

Commit

Permalink
Merge pull request #1238 from ManishMadan2882/main
Browse files Browse the repository at this point in the history
Bug Fix: Crash, abnormal update while switching conversation Ids
  • Loading branch information
dartpain authored Oct 5, 2024
2 parents ab1ebeb + 6af7d4e commit afc86ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions frontend/src/conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/conversation/conversationSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const conversationSlice = createSlice({
state,
action: PayloadAction<{ index: number; query: Partial<Query> }>,
) {
if (state.status === 'idle') return;
const { index, query } = action.payload;
if (query.response != undefined) {
state.queries[index].response =
Expand All @@ -167,6 +168,7 @@ export const conversationSlice = createSlice({
action: PayloadAction<{ query: Partial<Query> }>,
) {
state.conversationId = action.payload.query.conversationId ?? null;
state.status = 'idle';
},
updateStreamingSource(
state,
Expand Down

0 comments on commit afc86ef

Please sign in to comment.