feat(app-tauri): option de lancement auto du serveur web au démarrage
Ajoute le déclenchement du serveur embarqué dès le démarrage d'IdeA selon la préférence utilisateur, sans action manuelle requise. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@ -30,6 +30,7 @@ pub mod tickets;
|
||||
|
||||
use std::process::ExitCode;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
use application::{AppError, GetAppExitWorkGuardStateInput, SnapshotOpenWindowsInput};
|
||||
use domain::{
|
||||
@ -152,7 +153,18 @@ pub fn run() {
|
||||
// Wire the domain event bus → Tauri events relay.
|
||||
events::spawn_relay(app.handle().clone(), &app_state.event_bus);
|
||||
|
||||
let embedded_server = Arc::clone(&app_state.embedded_server);
|
||||
let core = app_state.core();
|
||||
app.manage(app_state);
|
||||
tauri::async_runtime::spawn(async move {
|
||||
if let Err(err) = embedded_server.auto_start_if_enabled(core).await {
|
||||
application::diag!(
|
||||
"[embedded-server] auto-start failed: {}: {}",
|
||||
err.code,
|
||||
err.message
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Kill all live PTYs cleanly when the main window is closing. This is
|
||||
// independent of the per-view (navigation/layout) lifecycle — those
|
||||
|
||||
Reference in New Issue
Block a user