feat: add Dreaming UI and gateway auto-fix startup flow

This commit is contained in:
晴天
2026-04-10 20:28:20 +08:00
parent 3105e56fd6
commit cfd00f043e
10 changed files with 989 additions and 31 deletions

View File

@@ -60,19 +60,29 @@ fn handle_menu_event(app: &AppHandle, id: &str) {
}
}
"gateway_start" => {
std::mem::drop(crate::commands::service::start_service(
"ai.openclaw.gateway".into(),
));
let app2 = app.clone();
tauri::async_runtime::spawn(async move {
let _ = crate::commands::service::start_service(
app2,
"ai.openclaw.gateway".into(),
)
.await;
});
}
"gateway_stop" => {
std::mem::drop(crate::commands::service::stop_service(
"ai.openclaw.gateway".into(),
));
tauri::async_runtime::spawn(async move {
let _ = crate::commands::service::stop_service("ai.openclaw.gateway".into()).await;
});
}
"gateway_restart" => {
std::mem::drop(crate::commands::service::restart_service(
"ai.openclaw.gateway".into(),
));
let app2 = app.clone();
tauri::async_runtime::spawn(async move {
let _ = crate::commands::service::restart_service(
app2,
"ai.openclaw.gateway".into(),
)
.await;
});
}
"quit" => {
app.exit(0);