iachat/enterprise/app/services/captain
Rodribm10 d2c2c6b7fe fix(captain): pre-reservation semantics + no duplicate pix links
Three UX bugs from staging testing:

1. Duplicate Pix link in WhatsApp — the tool's formatted_message
   embedded the full link + instructions, so the LLM copied it into
   its own response on top of the dedicated link message sent by
   dispatch_direct_link_message. The tool now returns a short
   summary with no URL; dispatch is the single source of the link.

2. "Reserva confirmada!" sent before payment — the scenario prompt
   used the word "confirmação" loosely, which the LLM read as the
   reservation being closed. Now the prompt forces "pré-reserva /
   aguardando pagamento" until the Pix is actually paid, and the
   dispatched link message explains that the reservation is only
   secured after payment clears.

3. Memory extraction wrote "Reservou Hidromassagem para pernoite
   em 22/04/2026" when the customer only received a Pix link and
   replied "obrigado". Tightened the extraction prompt so
   padrao_comportamental of a reservation requires a literal
   payment confirmation — Pix generated alone no longer qualifies.
2026-04-22 04:19:39 -03:00
..
assistant fix(captain): wrap runner.run in Timeout to guard HTTP hangs 2026-04-19 11:40:59 -03:00
contact_memories fix(captain): pre-reservation semantics + no duplicate pix links 2026-04-22 04:19:39 -03:00
copilot feat: Migrate ruby llm captain (#12981) 2025-12-04 18:26:10 +05:30
inter chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
lifecycle feat(lifecycle): add Dispatcher service with guards→render→send pipeline 2026-04-15 01:53:01 -03:00
llm feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
notifications feat: sistema de notificações de reserva com templates configuráveis 2026-03-01 21:53:11 -03:00
onboarding feat: legacy features to ruby llm (#12994) 2025-12-11 14:17:28 +05:30
payments feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
reports feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
reservations chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
roleta feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
tools fix(captain): pre-reservation semantics + no duplicate pix links 2026-04-22 04:19:39 -03:00
open_ai_message_builder_service.rb feat(ai): implement dynamic debounce with sidekiq and concurrency locking with redis 2026-03-01 02:04:55 -03:00
tool_registry_service.rb feat: Update UI for Copilot (#11561) 2025-06-02 22:02:03 -05:00