Work in the background.
This commit is contained in:
parent
0376fbe3e2
commit
870f517be2
1 changed files with 8 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ use rig::streaming::StreamingChoice;
|
||||||
use rig::{completion::Prompt, providers::anthropic};
|
use rig::{completion::Prompt, providers::anthropic};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::{thread, time};
|
use std::{thread, time};
|
||||||
|
use tauri::RunEvent;
|
||||||
use tauri_plugin_autostart::MacosLauncher;
|
use tauri_plugin_autostart::MacosLauncher;
|
||||||
use tauri_plugin_clipboard_manager::ClipboardExt;
|
use tauri_plugin_clipboard_manager::ClipboardExt;
|
||||||
|
|
||||||
|
|
@ -271,6 +272,13 @@ pub fn run() {
|
||||||
});
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
.on_window_event(|app, event| match event {
|
||||||
|
tauri::WindowEvent::CloseRequested { api, .. } => {
|
||||||
|
app.hide().unwrap();
|
||||||
|
api.prevent_close();
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
})
|
||||||
.invoke_handler(tauri::generate_handler![])
|
.invoke_handler(tauri::generate_handler![])
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue