feat(desktop): auto-open chat window on new message
When a new message arrives from a support agent, the chat window now opens automatically without user interaction. 🤖 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
faa6e28765
commit
d00c59e0b5
1 changed files with 11 additions and 0 deletions
|
|
@ -464,6 +464,17 @@ impl ChatRuntime {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Abrir janela de chat automaticamente para a sessao com nova mensagem
|
||||||
|
if let Some(session) = current_sessions.first() {
|
||||||
|
crate::log_info!(
|
||||||
|
"[CHAT DEBUG] Abrindo janela de chat para ticket={}",
|
||||||
|
session.ticket_id
|
||||||
|
);
|
||||||
|
if let Err(e) = open_chat_window(&app, &session.ticket_id) {
|
||||||
|
crate::log_warn!("Falha ao abrir janela de chat: {e}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Enviar notificacao nativa do Windows
|
// Enviar notificacao nativa do Windows
|
||||||
let notification_title = "Nova mensagem de suporte";
|
let notification_title = "Nova mensagem de suporte";
|
||||||
let notification_body = if new_count == 1 {
|
let notification_body = if new_count == 1 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue