From a4f2f0af02dbd372be801389c1a79a4f6986da54 Mon Sep 17 00:00:00 2001 From: ronalds Date: Tue, 9 Dec 2025 00:59:27 -0300 Subject: [PATCH] =?UTF-8?q?Implementado.=20Ahora=20cuando=20el=20asistente?= =?UTF-8?q?=20termine=20de=20responder,=20aparecer=C3=A1=20un=20bot=C3=B3n?= =?UTF-8?q?=20verde=20"=E2=9C=93=20Continuar=20con=20la=20Inspecci=C3=B3n"?= =?UTF-8?q?=20que=20cierra=20el=20chat=20y=20permite=20al=20mec=C3=A1nico?= =?UTF-8?q?=20seguir=20trabajando=20en=20la=20inspecci=C3=B3n.=20El=20bot?= =?UTF-8?q?=C3=B3n=20solo=20se=20muestra=20cuando:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No está cargando (!loading) Hay mensajes en el chat (messages.length > 0) El último mensaje es del asistente (messages[messages.length - 1].role === 'assistant') --- frontend/src/App.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index d9b6b52..46fcc28 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -5419,7 +5419,7 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl className="w-full mt-3 px-4 py-3 bg-gradient-to-r from-purple-600 to-blue-600 text-white rounded-lg hover:from-purple-700 hover:to-blue-700 transition flex items-center justify-center gap-2 font-semibold shadow-lg" > 💬 - Consultar Asistente + Verificación de Incidencia {answers[currentQuestion.id]?.chatHistory?.length > 0 && ( {answers[currentQuestion.id].chatHistory.length} mensajes @@ -6290,6 +6290,19 @@ function AIAssistantChatModal({ question, inspection, allAnswers, messages, setM )} + {/* Botón Continuar después del mensaje del asistente */} + {!loading && messages.length > 0 && messages[messages.length - 1].role === 'assistant' && ( +
+ +
+ )} +