From d7c8bced9b3034b2994446e85efac9be218ee52c Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Tue, 13 Aug 2024 15:24:09 +0800 Subject: [PATCH] file uploader --- .../base/chat/chat/chat-input-area/index.tsx | 91 ++++++++++--------- ...-list-item.tsx => file-list-flex-item.tsx} | 4 +- .../file-list-flex-operation.tsx | 36 ++++---- .../file-list-flex/file-list-flex-preview.tsx | 10 +- .../file-uploader-in-attachment/index.tsx | 25 ++++- .../components/base/file-uploader/index.ts | 2 +- .../share/text-generation/run-once/index.tsx | 6 +- 7 files changed, 95 insertions(+), 79 deletions(-) rename web/app/components/base/file-uploader/file-list-flex/{file-list-item.tsx => file-list-flex-item.tsx} (95%) 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 7189017b90..c1df858d95 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 @@ -16,7 +16,8 @@ import type { Theme } from '../../embedded-chatbot/theme/theme-context' import { useTextAreaHeight } from './hooks' import Operation from './operation' import cn from '@/utils/classnames' -// import { FileListFlexOperation } from '@/app/components/base/file-uploader' +import { FileListFlexOperation } from '@/app/components/base/file-uploader' +import { FileContextProvider } from '@/app/components/base/file-uploader/store' import VoiceInput from '@/app/components/base/voice-input' import { useToastContext } from '@/app/components/base/toast' @@ -92,58 +93,60 @@ const ChatInputArea = ({ ) return ( -
-
- {/* */} -
-
-
- {query} + +
+
+ +
+
+
+ {query} +
+