Skip to content

Commit 8dbef83

Browse files
authored
fix: After uploading the file, ask a question. After completing the question and answer, change the answer and the file will not be uploaded again, resulting in the loss of file information (#4269)
1 parent f3bf9e2 commit 8dbef83

File tree

1 file changed

+9
-8
lines changed
  • ui/src/components/ai-chat/component/answer-content

1 file changed

+9
-8
lines changed

ui/src/components/ai-chat/component/answer-content/index.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,17 @@ function showSource(row: any) {
156156
}
157157
158158
const regenerationChart = (chat: chatType) => {
159-
const startNode = props.chatRecord.execution_details?.find(
160-
(detail) => detail.type === 'start-node',
161-
)
159+
const container = props.chatRecord?.upload_meta
160+
? props.chatRecord.upload_meta
161+
: props.chatRecord.execution_details?.find((detail) => detail.type === 'start-node')
162+
162163
props.sendMessage(chat.problem_text, {
163164
re_chat: true,
164-
image_list: startNode?.image_list || [],
165-
document_list: startNode?.document_list || [],
166-
audio_list: startNode?.audio_list || [],
167-
video_list: startNode?.video_list || [],
168-
other_list: startNode?.other_list || [],
165+
image_list: container?.image_list || [],
166+
document_list: container?.document_list || [],
167+
audio_list: container?.audio_list || [],
168+
video_list: container?.video_list || [],
169+
other_list: container?.other_list || [],
169170
})
170171
}
171172
const stopChat = (chat: chatType) => {

0 commit comments

Comments
 (0)