fix(ai): diferenciar respuestas del agente demo por intención#48
Draft
AlejoLobo wants to merge 4 commits into
Draft
fix(ai): diferenciar respuestas del agente demo por intención#48AlejoLobo wants to merge 4 commits into
AlejoLobo wants to merge 4 commits into
Conversation
El mock del chat ignoraba la pregunta y repetía el mismo resumen. Ahora enruta overview/alertas/detenidos/velocidad y el parser reconoce la sugerencia «por encima de N km/h». Co-authored-by: Alejandro Lobo-Guerrero <alejolobo.ti@gmail.com>
Evita que «cuántos en línea» reutilice el mismo texto del resumen operativo completo. Co-authored-by: Alejandro Lobo-Guerrero <alejolobo.ti@gmail.com>
La card ya no crece con la conversación; el listado hace scroll interno y se posiciona en la última respuesta. Co-authored-by: Alejandro Lobo-Guerrero <alejolobo.ti@gmail.com>
Fija altura con min-h-0/basis-0, scroll interno real y items-start en el grid para que el contenido no estire la columna. Co-authored-by: Alejandro Lobo-Guerrero <alejolobo.ti@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
En el dashboard, el chat IA en modo Demo ignoraba la pregunta y siempre devolvía el mismo resumen de flota. Las sugerencias (alertas, detenidos, velocidad) parecían rotas.
En Tiempo real el backend sí enruta por intención; el fallo principal era el mock del frontend. Además, la sugerencia «Vehículos por encima de 80 km/h» no se reconocía bien en el parser.
Cambios
generateMockAiResponse(question)responde distinto según overview / alertas críticas / detenidos / velocidad / no operativa.useAiChatpasa la pregunta al mock.AiQuestionParserreconoce «por encima» y umbrales conkm/h.AiQuestionParserTests.Cómo verificar
answerysources.POST /api/ai/querycon preguntas distintas.docker compose --profile app up -d --build web apiy Ctrl+F5.