diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx index 7c2a94bc..240bb4d2 100644 --- a/frontend/src/app/chat/page.tsx +++ b/frontend/src/app/chat/page.tsx @@ -121,7 +121,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[] @@ -132,7 +131,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); @@ -275,43 +273,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(); }; @@ -1958,31 +1919,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...

@@ -1999,8 +1941,8 @@ function ChatPage() {
{message.role === "user" && (
- - + + {user?.name ? ( user.name.charAt(0).toUpperCase() @@ -2019,7 +1961,7 @@ function ChatPage() { {message.role === "assistant" && (
-
+
@@ -2083,18 +2025,6 @@ function ChatPage() {
)} - - {/* Drag overlay for existing messages */} - {isDragOver && messages.length > 0 && ( -
-
- -

- Drop document to add context -

-
-
- )}