From fa55cdc14388cff30b4ba15837a421bd16b1ac83 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 16 Jul 2025 18:40:20 +0800 Subject: [PATCH] fix: chat issue --- .../component/chat-input-operate/index.vue | 12 ++++-- .../ParagraphCard.vue | 43 +++++++++++-------- .../knowledge-source-component/index.vue | 15 ++++++- ui/src/locales/lang/en-US/ai-chat.ts | 1 + ui/src/locales/lang/zh-CN/ai-chat.ts | 3 +- ui/src/locales/lang/zh-Hant/ai-chat.ts | 3 +- 6 files changed, 51 insertions(+), 26 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 e616d0d68..581cf44d1 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 @@ -271,11 +271,15 @@ - - + + @@ -777,7 +781,7 @@ function sendChatHandle(event?: any) { if (!event?.ctrlKey && !event?.shiftKey && !event?.altKey && !event?.metaKey) { // 如果没有按下组合键,则会阻止默认事件 event?.preventDefault() - if (!isDisabledChat.value && !props.loading && !event?.isComposing) { + if (!isDisabledChat.value && !props.loading && !event?.isComposing && !uploadLoading.value) { if (inputValue.value.trim()) { autoSendMessage() } diff --git a/ui/src/components/ai-chat/component/knowledge-source-component/ParagraphCard.vue b/ui/src/components/ai-chat/component/knowledge-source-component/ParagraphCard.vue index 0ef5a34ab..7ed71cd21 100644 --- a/ui/src/components/ai-chat/component/knowledge-source-component/ParagraphCard.vue +++ b/ui/src/components/ai-chat/component/knowledge-source-component/ParagraphCard.vue @@ -3,7 +3,7 @@ shadow="never" :title="index + 1 + '.' + data.title || '-'" class="paragraph-source-card cursor mb-8 paragraph-source-card-height" - :style="{ 'height': data?.document_name?.trim() ? '300px' : '260px' }" + :style="{ height: data?.document_name?.trim() ? '300px' : '260px' }" :class="data.is_active ? '' : 'disabled'" :showIcon="false" > @@ -26,22 +26,23 @@ > - - - +
+ +
+ + {{ data?.document_name?.trim() }} + +
+
@@ -54,9 +55,10 @@