diff --git a/src/components/ChatWindow.tsx b/src/components/ChatWindow.tsx index d4ce2bb6..166b60ad 100644 --- a/src/components/ChatWindow.tsx +++ b/src/components/ChatWindow.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect } from "react"; -import { Send, Bot, User } from "lucide-react"; +import { Send, Bot, User, Paperclip, X } from "lucide-react"; import type { TriageMessage } from "@/lib/tauriCommands"; interface ChatWindowProps { @@ -7,9 +7,12 @@ interface ChatWindowProps { onSend: (message: string) => Promise; isLoading?: boolean; placeholder?: string; + pendingFiles?: { name: string }[]; + onAttach?: () => void; + onRemoveFile?: (index: number) => void; } -export function ChatWindow({ messages, onSend, isLoading, placeholder }: ChatWindowProps) { +export function ChatWindow({ messages, onSend, isLoading, placeholder, pendingFiles, onAttach, onRemoveFile }: ChatWindowProps) { const [input, setInput] = useState(""); const bottomRef = useRef(null); @@ -76,20 +79,48 @@ export function ChatWindow({ messages, onSend, isLoading, placeholder }: ChatWin )}
-
+
+ {pendingFiles && pendingFiles.length > 0 && ( +
+ {pendingFiles.map((f, i) => ( + + + {f.name} + {onRemoveFile && ( + + )} + + ))} +
+ )}
+ {onAttach && ( + + )}