feat: melhorias no sistema de chat ao vivo

- Chat do agente abre expandido automaticamente ao iniciar nova sessao
- Toasts fecham apos tempo fixo independente do foco da janela
- Janela de chat do desktop com transparencia (sem fundo branco)
- Chat reabre quando usuario abre o Raven (duplo clique no tray)
- Chat nao reabre sozinho com novas mensagens (apenas notificacao)
- Mensagem de toast simplificada: "Chat ao vivo iniciado"
- Reduz intervalo de polling SSE de 2s para 1s (mais responsivo)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Seu Nome 2025-12-08 11:06:01 -03:00
parent 3700ac9dad
commit 24dee5d5eb
9 changed files with 74 additions and 31 deletions

View file

@ -359,7 +359,7 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
// Quando não há sessão, mostrar versão minimizada com indicador de offline
if (!hasSession) {
return (
<div className="flex h-screen flex-col items-center justify-end bg-transparent p-4">
<div className="flex h-full w-full items-end justify-end bg-transparent">
<div className="flex items-center gap-2 rounded-full bg-slate-200 px-4 py-2 text-slate-600 shadow-lg">
<MessageCircle className="size-4" />
<span className="text-sm font-medium">
@ -375,7 +375,7 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
// Versão minimizada (chip compacto igual web)
if (isMinimized) {
return (
<div className="flex h-full w-full items-center justify-center bg-transparent">
<div className="flex h-full w-full items-end justify-end bg-transparent">
<button
onClick={handleExpand}
className="flex items-center gap-2 rounded-full bg-black px-4 py-2 text-white shadow-lg hover:bg-black/90"