fix(desktop): corrige nomes de parametros nos comandos Tauri

- Usa camelCase (ticketId, ticketRef) em vez de snake_case
- Tauri converte automaticamente snake_case do Rust para camelCase no JS

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
esdrasrenan 2025-12-15 23:55:21 -03:00
parent 1986bf286a
commit d9d5b495a1
2 changed files with 5 additions and 5 deletions

View file

@ -304,7 +304,7 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) {
useEffect(() => {
const prevHasSession = prevHasSessionRef.current
if (prevHasSession && !hasSession) {
invoke("close_chat_window", { ticket_id: ticketId }).catch((err) => {
invoke("close_chat_window", { ticketId }).catch((err) => {
console.error("Erro ao fechar janela ao encerrar sessao:", err)
})
}
@ -502,7 +502,7 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) {
const handleMinimize = async () => {
setIsMinimized(true)
try {
await invoke("set_chat_minimized", { ticket_id: ticketId, minimized: true })
await invoke("set_chat_minimized", { ticketId, minimized: true })
} catch (err) {
console.error("Erro ao minimizar janela:", err)
}
@ -517,14 +517,14 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) {
setIsMinimized(false)
try {
await invoke("set_chat_minimized", { ticket_id: ticketId, minimized: false })
await invoke("set_chat_minimized", { ticketId, minimized: false })
} catch (err) {
console.error("Erro ao expandir janela:", err)
}
}
const handleClose = () => {
invoke("close_chat_window", { ticket_id: ticketId }).catch((err) => {
invoke("close_chat_window", { ticketId }).catch((err) => {
console.error("Erro ao fechar janela de chat:", err)
})
}