From 079c802b5c800d64f94cbed854651750a063f57c Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Mon, 12 Aug 2024 16:24:13 +0800 Subject: [PATCH] file uploader --- web/app/components/base/chat/chat/chat-input-area/index.tsx | 1 + .../components/base/chat/chat/chat-input-area/operation.tsx | 3 +++ .../base/file-uploader/file-from-link-or-local/index.tsx | 2 +- .../base/file-uploader/file-uploader-in-attachment/index.tsx | 2 +- web/i18n/en-US/common.ts | 3 ++- web/i18n/zh-Hans/common.ts | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/web/app/components/base/chat/chat/chat-input-area/index.tsx b/web/app/components/base/chat/chat/chat-input-area/index.tsx index c8de1d2b54..7189017b90 100644 --- a/web/app/components/base/chat/chat/chat-input-area/index.tsx +++ b/web/app/components/base/chat/chat/chat-input-area/index.tsx @@ -87,6 +87,7 @@ const ChatInputArea = ({ ref={holdSpaceRef} speechToTextConfig={speechToTextConfig} onShowVoiceInput={handleShowVoiceInput} + onSend={handleSend} /> ) diff --git a/web/app/components/base/chat/chat/chat-input-area/operation.tsx b/web/app/components/base/chat/chat/chat-input-area/operation.tsx index f33f79739e..58246d034c 100644 --- a/web/app/components/base/chat/chat/chat-input-area/operation.tsx +++ b/web/app/components/base/chat/chat/chat-input-area/operation.tsx @@ -17,10 +17,12 @@ import cn from '@/utils/classnames' type OperationProps = { speechToTextConfig?: EnableType onShowVoiceInput?: () => void + onSend: () => void } const Operation = forwardRef(({ speechToTextConfig, onShowVoiceInput, + onSend, }, ref) => { return (
(({ diff --git a/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx b/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx index 0621d4f8d8..159b037c84 100644 --- a/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx +++ b/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx @@ -44,7 +44,7 @@ const FileFromLinkOrLocal = ({
setUrl(e.target.value)} /> diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx index ff4a61221d..ebac040ec2 100644 --- a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx +++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx @@ -37,7 +37,7 @@ const FileUploaderInAttachment = () => {