From c7d1ba6a73e4f04d862c5b9b6bcdd46636edda51 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 8 Jul 2025 17:44:54 +0800 Subject: [PATCH] fix: The conversation file cannot be displayed when uploading other files (#3513) --- .../ai-chat/component/chat-input-operate/index.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 6a05bf55c..7a12f3633 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -359,7 +359,7 @@ const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP'] const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV'] const videoExtensions: any = [] const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A'] -let otherExtensions = ['PPT', 'DOC'] +let otherExtensions = ref(['PPT', 'DOC']) const getAcceptList = () => { const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting @@ -378,8 +378,8 @@ const getAcceptList = () => { } if (other) { // 其他文件类型 - otherExtensions = props.applicationDetails.file_upload_setting.otherExtensions - accepts = [...accepts, ...otherExtensions] + otherExtensions.value = props.applicationDetails.file_upload_setting.otherExtensions + accepts = [...accepts, ...otherExtensions.value] } if (accepts.length === 0) { @@ -507,7 +507,12 @@ const uploadImageList = computed(() => fileFilter(fileAllList.value, imageExtens const uploadDocumentList = computed(() => fileFilter(fileAllList.value, documentExtensions)) const uploadVideoList = computed(() => fileFilter(fileAllList.value, videoExtensions)) const uploadAudioList = computed(() => fileFilter(fileAllList.value, audioExtensions)) -const uploadOtherList = computed(() => fileFilter(fileAllList.value, otherExtensions)) +const uploadOtherList = computed(() => + fileFilter( + fileAllList.value, + otherExtensions.value.map((item) => item.toUpperCase()), + ), +) const showDelete = ref('')