feat: full pattern matrix — M1 complete, M2 LLM chat, 30+ pattern files #10
1 changed files with 14 additions and 0 deletions
|
|
@ -76,6 +76,20 @@ pub fn run() {
|
|||
.map(|pf| pf.log_paths.clone())
|
||||
.unwrap_or_default();
|
||||
|
||||
// Intercept the chat window's close button so it hides rather than
|
||||
// destroys the window. Without this, closing once makes the window
|
||||
// unreachable — get_webview_window("chat") returns None and the tray
|
||||
// click does nothing.
|
||||
if let Some(chat_win) = app.get_webview_window("chat") {
|
||||
let win = chat_win.clone();
|
||||
chat_win.on_window_event(move |event| {
|
||||
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
|
||||
let _ = win.hide();
|
||||
api.prevent_close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let rx = watcher::spawn(log_paths);
|
||||
let pf = Arc::new(pattern_file);
|
||||
let app_handle = app.handle().clone();
|
||||
|
|
|
|||
Loading…
Reference in a new issue