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 b346c3c57..d632ad977 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 @@ -653,23 +653,13 @@ function autoSendMessage() { audio_list: uploadAudioList.value, video_list: uploadVideoList.value }) - - if ( - props.sendMessage(inputValue.value, { - image_list: uploadImageList.value, - document_list: uploadDocumentList.value, - audio_list: uploadAudioList.value, - video_list: uploadVideoList.value - }) !== undefined - ) { - inputValue.value = '' - uploadImageList.value = [] - uploadDocumentList.value = [] - uploadAudioList.value = [] - uploadVideoList.value = [] - if (quickInputRef.value) { - quickInputRef.value.textareaStyle.height = '45px' - } + inputValue.value = '' + uploadImageList.value = [] + uploadDocumentList.value = [] + uploadAudioList.value = [] + uploadVideoList.value = [] + if (quickInputRef.value) { + quickInputRef.value.textareaStyle.height = '45px' } } diff --git a/ui/src/components/ai-chat/component/user-form/index.vue b/ui/src/components/ai-chat/component/user-form/index.vue index 125640230..2276d014b 100644 --- a/ui/src/components/ai-chat/component/user-form/index.vue +++ b/ui/src/components/ai-chat/component/user-form/index.vue @@ -357,8 +357,10 @@ const decodeQuery = (query: string) => { } } const confirmHandle = () => { - localStorage.setItem(`${accessToken}userForm`, JSON.stringify(form_data_context.value)) - emit('confirm') + if (checkInputParam()) { + localStorage.setItem(`${accessToken}userForm`, JSON.stringify(form_data_context.value)) + emit('confirm') + } } const cancelHandle = () => { emit('cancel') diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index b3ce6f240..fe608e132 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -5,7 +5,7 @@ :class="type" :style="{ height: firsUserInput ? '100%' : undefined }" > -