Fix chat window behavior - remove auto-open on session start
- Remove automatic window opening when agent starts a chat session - Remove automatic window focus when new messages arrive - Only show Windows notification, user opens chat manually via tray icon - Update notification message to instruct user to click Raven icon 🤖 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
cd4b702198
commit
e4f8f465de
1 changed files with 4 additions and 20 deletions
|
|
@ -345,12 +345,14 @@ impl ChatRuntime {
|
|||
);
|
||||
|
||||
// Enviar notificacao nativa do Windows
|
||||
// A janela de chat NAO abre automaticamente -
|
||||
// o usuario deve clicar na notificacao ou no tray
|
||||
let notification_title = format!(
|
||||
"Chat iniciado - Chamado #{}",
|
||||
session.ticket_ref
|
||||
);
|
||||
let notification_body = format!(
|
||||
"{} iniciou um chat de suporte",
|
||||
"{} iniciou um chat de suporte.\nClique no icone do Raven para abrir.",
|
||||
session.agent_name
|
||||
);
|
||||
if let Err(e) = app
|
||||
|
|
@ -364,16 +366,6 @@ impl ChatRuntime {
|
|||
"Falha ao enviar notificacao: {e}"
|
||||
);
|
||||
}
|
||||
|
||||
// Abrir janela de chat automaticamente
|
||||
if let Err(e) = open_chat_window_internal(
|
||||
&app,
|
||||
&session.ticket_id,
|
||||
) {
|
||||
crate::log_error!(
|
||||
"Falha ao abrir janela de chat: {e}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -420,15 +412,7 @@ impl ChatRuntime {
|
|||
"Falha ao enviar notificacao de nova mensagem: {e}"
|
||||
);
|
||||
}
|
||||
|
||||
// Focar janela de chat se existir
|
||||
if let Some(session) = result.sessions.first() {
|
||||
let label = format!("chat-{}", session.ticket_id);
|
||||
if let Some(window) = app.get_webview_window(&label) {
|
||||
let _ = window.show();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
// NAO foca a janela automaticamente - usuario abre manualmente
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue