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 34175bac01..8a1289a19e 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 @@ -15,6 +15,7 @@ import { useTextAreaHeight } from './hooks' import Operation from './operation' import cn from '@/utils/classnames' import { FileListInChatInput } from '@/app/components/base/file-uploader' +import { useFile } from '@/app/components/base/file-uploader/hooks' import { FileContextProvider, useStore, @@ -60,6 +61,14 @@ const ChatInputArea = ({ const [showVoiceInput, setShowVoiceInput] = useState(false) const files = useStore(s => s.files) const setFiles = useStore(s => s.setFiles) + const { + handleDragFileEnter, + handleDragFileLeave, + handleDragFileOver, + handleDropFile, + handleClipboardPasteFile, + isDragActive, + } = useFile(visionConfig!) const handleSend = () => { if (onSend) { @@ -105,7 +114,7 @@ const ChatInputArea = ({ const operation = (
@@ -134,8 +144,10 @@ const ChatInputArea = ({