From ea8ad1db45fe4d380c9d81df4eb60b87575837ae Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 27 Oct 2025 15:24:24 +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 (#4262) --- .../ai-chat/component/answer-content/index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 d42ff9fd9..4896a770b 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -156,7 +156,17 @@ function showSource(row: any) { } const regenerationChart = (chat: chatType) => { - props.sendMessage(chat.problem_text, { re_chat: true }) + const startNode = 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 || [], + }) } const stopChat = (chat: chatType) => { props.chatManagement.stop(chat.id)