diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx index 072567ba..0f4eec6e 100644 --- a/frontend/src/app/chat/page.tsx +++ b/frontend/src/app/chat/page.tsx @@ -120,7 +120,6 @@ function ChatPage() { >(new Set()); // previousResponseIds now comes from useChat context const [isUploading, setIsUploading] = useState(false); - const [isDragOver, setIsDragOver] = useState(false); const [isFilterDropdownOpen, setIsFilterDropdownOpen] = useState(false); const [availableFilters, setAvailableFilters] = useState< KnowledgeFilterData[] @@ -131,7 +130,6 @@ function ChatPage() { const [dropdownDismissed, setDropdownDismissed] = useState(false); const [isUserInteracting, setIsUserInteracting] = useState(false); const [isForkingInProgress, setIsForkingInProgress] = useState(false); - const dragCounterRef = useRef(0); const messagesEndRef = useRef(null); const inputRef = useRef(null); const fileInputRef = useRef(null); @@ -274,43 +272,6 @@ function ChatPage() { } }; - // Remove the old pollTaskStatus function since we're using centralized system - - const handleDragEnter = (e: React.DragEvent) => { - e.preventDefault(); - e.stopPropagation(); - dragCounterRef.current++; - if (dragCounterRef.current === 1) { - setIsDragOver(true); - } - }; - - const handleDragOver = (e: React.DragEvent) => { - e.preventDefault(); - e.stopPropagation(); - }; - - const handleDragLeave = (e: React.DragEvent) => { - e.preventDefault(); - e.stopPropagation(); - dragCounterRef.current--; - if (dragCounterRef.current === 0) { - setIsDragOver(false); - } - }; - - const handleDrop = (e: React.DragEvent) => { - e.preventDefault(); - e.stopPropagation(); - dragCounterRef.current = 0; - setIsDragOver(false); - - const files = Array.from(e.dataTransfer.files); - if (files.length > 0) { - handleFileUpload(files[0]); // Upload first file only - } - }; - const handleFilePickerClick = () => { fileInputRef.current?.click(); }; @@ -1957,31 +1918,12 @@ function ChatPage() {
{/* Messages Area */}
{messages.length === 0 && !streamingMessage ? (
- {isDragOver ? ( - <> - -

- Drop your document here -

-

- I'll process it and add it to our conversation - context -

- - ) : isUploading ? ( + {isUploading ? ( <>

Processing your document...

@@ -2082,18 +2024,6 @@ function ChatPage() {
)} - - {/* Drag overlay for existing messages */} - {isDragOver && messages.length > 0 && ( -
-
- -

- Drop document to add context -

-
-
- )}