Implementa sistema de chat em tempo real entre agente e cliente
- Adiciona tabela liveChatSessions no schema Convex - Cria convex/liveChat.ts com mutations e queries para chat - Adiciona API routes para maquinas (sessions, messages, poll) - Cria modulo chat.rs no Tauri com ChatRuntime e polling - Adiciona comandos de chat no lib.rs (start/stop polling, open/close window) - Cria componentes React do chat widget (ChatWidget, types) - Adiciona botao "Iniciar Chat" no dashboard (ticket-chat-panel) - Implementa menu de chat no system tray - Polling de 2 segundos para maior responsividade - Janela de chat flutuante, frameless, always-on-top 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0c8d53c0b6
commit
ba91c1e0f5
15 changed files with 2004 additions and 15 deletions
20
apps/desktop/src/chat/index.tsx
Normal file
20
apps/desktop/src/chat/index.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { ChatWidget } from "./ChatWidget"
|
||||
|
||||
export function ChatApp() {
|
||||
// Obter ticketId da URL
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const ticketId = params.get("ticketId")
|
||||
|
||||
if (!ticketId) {
|
||||
return (
|
||||
<div className="flex h-screen flex-col items-center justify-center bg-white p-4">
|
||||
<p className="text-sm text-red-600">Erro: ticketId nao fornecido</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return <ChatWidget ticketId={ticketId} />
|
||||
}
|
||||
|
||||
export { ChatWidget }
|
||||
export * from "./types"
|
||||
Loading…
Add table
Add a link
Reference in a new issue