diff --git a/apps/desktop/src-tauri/src/chat.rs b/apps/desktop/src-tauri/src/chat.rs index e4cfc06..7468738 100644 --- a/apps/desktop/src-tauri/src/chat.rs +++ b/apps/desktop/src-tauri/src/chat.rs @@ -718,9 +718,9 @@ fn open_chat_window_internal(app: &tauri::AppHandle, ticket_id: &str) -> Result< .inner_size(380.0, 520.0) .min_inner_size(300.0, 400.0) .position(x, y) - .decorations(true) // Usar decoracoes nativas do Windows + .decorations(false) // Sem decoracoes nativas - usa header customizado .always_on_top(true) - .skip_taskbar(false) // Mostrar na taskbar + .skip_taskbar(true) .focused(true) .visible(true) .build() diff --git a/apps/desktop/src/chat/ChatWidget.tsx b/apps/desktop/src/chat/ChatWidget.tsx index 2b64d26..f155629 100644 --- a/apps/desktop/src/chat/ChatWidget.tsx +++ b/apps/desktop/src/chat/ChatWidget.tsx @@ -4,7 +4,7 @@ import { listen } from "@tauri-apps/api/event" import { Store } from "@tauri-apps/plugin-store" import { appLocalDataDir, join } from "@tauri-apps/api/path" import { open } from "@tauri-apps/plugin-dialog" -import { Send, X, Loader2, Headphones, Paperclip, FileText, Image as ImageIcon, File } from "lucide-react" +import { Send, X, Minus, Loader2, Headphones, Paperclip, FileText, Image as ImageIcon, File } from "lucide-react" import type { ChatMessage, ChatMessagesResponse, SendMessageResponse } from "./types" const STORE_FILENAME = "machine-agent.json" @@ -291,6 +291,14 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) { } } + const handleMinimize = () => { + invoke("minimize_chat_window", { ticketId }) + } + + const handleClose = () => { + invoke("close_chat_window", { ticketId }) + } + const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault() @@ -325,20 +333,39 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) { return (
- {ticketInfo?.agentName ?? "Suporte"} -
- {ticketInfo && ( -- Chamado #{ticketInfo.ref} + {/* Header - arrastavel */} +
+ {ticketInfo?.agentName ?? "Suporte"}
- )} + {ticketInfo && ( ++ Chamado #{ticketInfo.ref} +
+ )} +