diff --git a/ui/src/api/application/application.ts b/ui/src/api/application/application.ts index ca83a1b83..df5491403 100644 --- a/ui/src/api/application/application.ts +++ b/ui/src/api/application/application.ts @@ -301,7 +301,7 @@ const getMcpTools: ( * 上传文件 * @param 参数 file:file */ -const uploadFile: ( +const postUploadFile: ( file: any, sourceId: string, resourceType: @@ -313,12 +313,13 @@ const uploadFile: ( | 'TEMPORARY_30_MINUTE' | 'TEMPORARY_120_MINUTE' | 'TEMPORARY_1_DAY', -) => Promise> = (file, sourceId, resourceType) => { + loading?: Ref, +) => Promise> = (file, sourceId, resourceType, loading) => { const fd = new FormData() fd.append('file', file) fd.append('source_id', sourceId) fd.append('source_type', resourceType) - return post(`/oss/file`, fd) + return post(`/oss/file`, fd, undefined, loading) } export default { @@ -346,5 +347,5 @@ export default { postTextToSpeech, speechToText, getMcpTools, - uploadFile, + postUploadFile, } diff --git a/ui/src/api/chat/chat.ts b/ui/src/api/chat/chat.ts index c75eb8f9d..53241da51 100644 --- a/ui/src/api/chat/chat.ts +++ b/ui/src/api/chat/chat.ts @@ -297,7 +297,7 @@ const modifyChat: (chat_id: string, data: any, loading?: Ref) => Promis * @param resourceType 资源类型 * @returns */ -const uploadFile: ( +const postUploadFile: ( file: any, sourceId: string, resourceType: @@ -309,12 +309,13 @@ const uploadFile: ( | 'TEMPORARY_30_MINUTE' | 'TEMPORARY_120_MINUTE' | 'TEMPORARY_1_DAY', -) => Promise> = (file, sourceId, sourceType) => { + loading?: Ref, +) => Promise> = (file, sourceId, sourceType, loading) => { const fd = new FormData() fd.append('file', file) fd.append('source_id', sourceId) fd.append('source_type', sourceType) - return post(`/oss/file`, fd) + return post(`/oss/file`, fd, undefined, loading) } export default { open, @@ -344,5 +345,5 @@ export default { speechToText, deleteChat, modifyChat, - uploadFile, + postUploadFile, } 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 f5022898e..f544cfd29 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -73,11 +73,11 @@ diff --git a/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue b/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue index 0130b23cd..bd437a46c 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue @@ -14,7 +14,11 @@ - +

00:{{ props.time < 10 ? `0${props.time}` : props.time }} props.start, @@ -90,7 +94,7 @@ watch( dialogVisible.value = false isTouching.value = false } - } + }, ) function onTouchStart(event: any) { @@ -127,7 +131,6 @@ function onTouchEnd() { left: 50%; /* 水平居中 */ transform: translateX(-50%); width: 92%; - background: #ffffff; border: 1px solid #ffffff; box-shadow: 0px 6px 24px 0px rgba(31, 35, 41, 0.08); z-index: 999; 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 4147153c9..cc4785603 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 @@ -1,10 +1,16 @@ -