From 8dbef83d7ac94873627e08752f9ad9b21709591e Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:38:30 +0800 Subject: [PATCH] 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) --- .../ai-chat/component/answer-content/index.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ui/src/components/ai-chat/component/answer-content/index.vue b/ui/src/components/ai-chat/component/answer-content/index.vue index 4896a770b..e2bfe8ad3 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -156,16 +156,17 @@ function showSource(row: any) { } const regenerationChart = (chat: chatType) => { - const startNode = props.chatRecord.execution_details?.find( - (detail) => detail.type === 'start-node', - ) + const container = props.chatRecord?.upload_meta + ? props.chatRecord.upload_meta + : props.chatRecord.execution_details?.find((detail) => detail.type === 'start-node') + props.sendMessage(chat.problem_text, { re_chat: true, - image_list: startNode?.image_list || [], - document_list: startNode?.document_list || [], - audio_list: startNode?.audio_list || [], - video_list: startNode?.video_list || [], - other_list: startNode?.other_list || [], + image_list: container?.image_list || [], + document_list: container?.document_list || [], + audio_list: container?.audio_list || [], + video_list: container?.video_list || [], + other_list: container?.other_list || [], }) } const stopChat = (chat: chatType) => {