iachat/app/controllers
Rodribm10 c8785b999c fix(captain/hermes): intercepta placeholder e força tool call
Quando o LLM emite " Um momento — vou verificar." (ou variantes:
"deixa eu verificar", "aguarde um instante") sem chamar nenhuma tool,
o callback agora:

1. NÃO entrega a msg pro cliente (UX terrível ver "vou verificar" e
   ficar esperando indefinidamente).
2. Dispara notify_event pro Hermes com [SISTEMA: force_tool_call]
   instruindo a retomar e chamar a tool relevante (generate_pix,
   send_suite_images, faq_lookup) com base na última msg do cliente.
3. Limita 2 retries por conversation via Rails.cache (TTL 5min). Após
   esgotar, marca labels hermes_placeholder + triagem_humana e descarta.

Caso real do Rodrigo: cliente confirmou reserva ("Para hoje 23h por 4h")
e o LLM respondeu apenas o placeholder (api_calls=1 no daemon, sem
tool). Cliente ficava esperando sem resposta. Agora Captain força o
LLM a chamar a tool, ou cai pra triagem humana após 2 tentativas.

PLACEHOLDER_PATTERNS cobre as variações observadas. SKILL.md já proibia
"Um momento", mas o LLM ignorava — defesa em camadas.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 17:01:18 -03:00
..
api feat(reports): Painel Diretoria — Onda 1A (leitura) 2026-04-26 12:44:59 -03:00
concerns feat: mensagens agendadas (#198) 2026-01-30 22:08:16 -03:00
devise_overrides fix: Prevent user enumeration on password reset endpoint (#13528) 2026-02-13 13:45:40 +05:30
google feat: use of imap login as default if present (#10249) 2024-10-09 15:01:11 +05:30
instagram feat: Instagram reauthorization (#11221) 2025-04-03 14:30:48 +05:30
installation feat: Unify user and super admin credentials (#3830) 2022-01-25 16:58:49 -08:00
linear feat: move Linear config to installation_config (#10999) 2025-02-28 14:20:27 +05:30
microsoft feat: add Google login flow and inbox creation (#9580) 2024-06-07 16:37:46 +05:30
notion feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
platform/api/v1 Merge branch 'main' into chore/merge-upstream-4.5.0 2025-08-20 11:20:31 -03:00
public feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
shopify feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
super_admin Merge branch 'main' into chore/merge-upstream-4.11.0 2026-02-17 23:05:26 -03:00
survey feat: Add INSTALLATION_NAME to global config (#12376) 2025-09-09 12:13:35 +05:30
tiktok feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
twilio feat: Integrate Twilio WhatsApp ProfileName for contact name resolution (#12122) 2025-08-07 12:53:39 +05:30
twitter fix: response body in twitter callback (#6907) 2023-04-14 16:48:28 +05:30
webhooks fix(captain/hermes): intercepta placeholder e força tool call 2026-05-02 17:01:18 -03:00
android_app_controller.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller.rb chore: lint files (#2) 2025-04-03 23:28:38 -03:00
apple_app_controller.rb Chore: Apple site association file for deep linking (#805) 2020-05-03 12:16:11 +05:30
application_controller.rb feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
dashboard_controller.rb feat: Use amplitude for Cloud Analytics (#13217) 2026-01-09 09:32:09 -08:00
health_controller.rb fix(ci): update health check endpoint for review apps 2026-02-26 16:35:15 -03:00
microsoft_controller.rb chore: Automate SSL with Cloudflare (#12021) 2025-07-24 13:09:06 +04:00
oauth_callback_controller.rb refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
platform_controller.rb Chore: Inbox Members API improvements (#3008) 2021-09-14 11:55:02 +05:30
public_controller.rb fix: Locale not correct in root url when accessing help center with custom domain (#9110) 2024-03-19 18:48:59 +05:30
slack_uploads_controller.rb fix: handle active storage preview error for password protected pdfs (#11888) 2025-08-11 12:41:37 +05:30
swagger_controller.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
widget_tests_controller.rb feat: Support Dark mode for the widget (#4137) 2022-04-01 20:59:03 +05:30
widgets_controller.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00