From 9115558389ce282cccf668c09d37b773c81afca1 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Wed, 18 Feb 2026 09:48:25 +0100 Subject: [PATCH] Update App.tsx --- App.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App.tsx b/App.tsx index bd461ac..a11a3c4 100644 --- a/App.tsx +++ b/App.tsx @@ -4,7 +4,7 @@ import { ClientPortal } from './components/ClientPortal'; import { AuthScreen } from './components/AuthScreen'; import { ToastContainer, ToastMessage, ToastType } from './components/Toast'; import { INITIAL_SETTINGS } from './constants'; -import { Agent, AppSettings, AppState, ClientUser, KBArticle, Ticket, TicketStatus, SurveyResult, TicketQueue, ChatMessage, AgentRole } from './types'; +import { Agent, AppSettings, AppState, ClientUser, KBArticle, Ticket, TicketStatus, SurveyResult, TicketQueue, ChatMessage, AgentRole, Attachment } from './types'; const App: React.FC = () => { const [state, setState] = useState({ @@ -147,12 +147,12 @@ const App: React.FC = () => { } }; - const replyToTicket = async (ticketId: string, message: string) => { + const replyToTicket = async (ticketId: string, message: string, attachments: Attachment[] = []) => { const role = state.userRole === 'client' ? 'user' : 'assistant'; try { const newMsg = await apiFetch(`/tickets/${ticketId}/messages`, { method: 'POST', - body: JSON.stringify({ role, content: message }) + body: JSON.stringify({ role, content: message, attachments }) }); setState(prev => ({