iachat/app/javascript/dashboard/components-next/sidebar
Rodribm10 40fd0c8f50 feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor
Tela "Construtor" no painel Captain (acessivel em sidebar pra admins) que
permite criar novo agente Hermes via chat guiado com agente Construtor
(profile Hermes separado).

Backend (admin scope):
- POST /api/v1/accounts/:id/captain/hermes_builder — manda mensagem do
  admin pro gateway do Construtor (Hermes na porta 8646)
- GET — retorna historico da sessao (Rails.cache, TTL 4h)
- DELETE /reset — limpa sessao
- POST /webhooks/captain/builder_callback — recebe respostas async do
  Construtor via plugin captain-http-callback do Hermes
- HermesBuilder::Storage (Rails.cache) — persiste msgs por session_key
  (account_id + user_id) com role/content/created_at
- HermesBuilder::Dispatcher — encaminha pro webhook do Construtor com
  HMAC opcional via ENV HERMES_BUILDER_WEBHOOK_SECRET

Frontend:
- Pagina Vue HermesBuilder/Index.vue — chat simples com:
  * Lista de mensagens com bubbles user/construtor
  * Indicador "digitando..." enquanto aguarda resposta
  * Input com Enter pra enviar / Shift+Enter pra nova linha
  * Polling 2s pra novas msgs
  * Botao Limpar conversa
- API client em api/captain/hermesBuilder.js
- Rota captain_hermes_builder_index (admin only)
- Item no sidebar Captain "Construtor (Hermes)"
- i18n keys CAPTAIN.HERMES_BUILDER em pt_BR + en

UX flow:
  Admin abre tela → digita "olá" → Construtor pergunta nome → admin
  responde → marca, persona, tabela (com opcao copiar de existente),
  regras, FAQs, identidade → resumo → confirmar → Construtor chama
  save_agent_spec → JSON salvo em /tmp/agent-specs/<slug>.json pra
  revisao posterior. NAO cria filesystem do profile nem registros DB
  (etapa SEPARADA, prox sessao).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 21:00:41 -03:00
..
ChannelLeaf.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
MobileSidebarLauncher.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
provider.js chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
Sidebar.vue feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
SidebarAccountSwitcher.vue chore: update DropdownBody styles for better overflow handling 2026-02-18 10:23:14 -03:00
SidebarChangelogButton.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarChangelogCard.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarCollapsedPopover.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarGroup.vue Merge branch 'main' into chore/merge-upstream-4.11.0 2026-02-17 23:05:26 -03:00
SidebarGroupEmptyLeaf.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarGroupHeader.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarGroupLeaf.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarGroupSeparator.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarNotificationBell.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarProfileMenu.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarProfileMenuStatus.vue fix: Remove unnecessary scroll bars from filter dropdown (#12515) 2025-09-24 20:55:52 +05:30
SidebarSubGroup.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
useSidebarKeyboardShortcuts.js feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00