fix(chat): correções de SSE, inicialização e área de clique
- Substituir WebSocket por SSE para real-time (chat.rs) - Corrigir inicialização do chat runtime em lib.rs - Iniciar unreadByMachine em 0 ao criar sessão (liveChat.ts) - Corrigir área de clique do chip minimizado (pointer-events) - Corrigir roteamento SPA no Tauri (index.html?view=chat) - Corrigir estado inicial isMinimized como true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3aee1a6694
commit
3c2d1824fb
7 changed files with 213 additions and 256 deletions
|
|
@ -1728,12 +1728,13 @@ function StatusBadge({ status, className }: { status: string | null; className?:
|
|||
)
|
||||
}
|
||||
|
||||
// Roteamento simples baseado no path
|
||||
// Roteamento simples baseado em query params (compativel com Tauri SPA)
|
||||
function RootApp() {
|
||||
const path = window.location.pathname
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const view = params.get("view")
|
||||
|
||||
// Rota /chat - janela de chat flutuante
|
||||
if (path === "/chat" || path.startsWith("/chat?")) {
|
||||
// Janela de chat flutuante (view=chat ou path=/chat para compatibilidade)
|
||||
if (view === "chat" || window.location.pathname === "/chat") {
|
||||
return <ChatApp />
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue