mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
fix: sources not getting set on stream end
This commit is contained in:
@@ -289,8 +289,7 @@ const ConversationBubble = forwardRef<
|
||||
type === 'ERROR' ||
|
||||
sources?.length === 0 ||
|
||||
sources?.some((source) => source.link === 'None') ? null : !sources &&
|
||||
chunks !== '0' &&
|
||||
selectedDocs ? (
|
||||
chunks !== '0' ? (
|
||||
<div className="mb-4 flex flex-col flex-wrap items-start self-start lg:flex-nowrap">
|
||||
<div className="my-2 flex flex-row items-center justify-center gap-3">
|
||||
<Avatar
|
||||
|
||||
@@ -284,14 +284,9 @@ export const conversationSlice = createSlice({
|
||||
query: Partial<Query>;
|
||||
}>,
|
||||
) {
|
||||
const { conversationId, index, query } = action.payload;
|
||||
if (state.conversationId !== conversationId) return;
|
||||
|
||||
if (!state.queries[index].sources) {
|
||||
state.queries[index].sources = query?.sources;
|
||||
} else if (query.sources) {
|
||||
state.queries[index].sources!.push(...query.sources);
|
||||
}
|
||||
const { index, query } = action.payload;
|
||||
if (query.sources !== undefined)
|
||||
state.queries[index].sources = query.sources;
|
||||
},
|
||||
updateToolCall(state, action) {
|
||||
const { index, tool_call } = action.payload;
|
||||
|
||||
Reference in New Issue
Block a user