refactor: align dependencies and centralize GUI activation

This commit is contained in:
Kevin Yue committed 2026-11-01 23:35:59 +08:00
1 parent 54b4d810d9
commit 43eda033e5
7 files changed
+145 -155

No files matched your search

@@ -29,6 +29,18 @@ pub struct DesktopLauncher<'a> {
}
impl<'a> DesktopLauncher<'a> {
/// Bring an already-running GUI to the foreground through its service.
pub async fn activate_existing() -> anyhow::Result<()> {
let endpoint = crate::utils::endpoint::http_endpoint().await?;
crate::utils::request::client_builder()
.build()?
.post(format!("{endpoint}/active-gui"))
.send()
.await?
.error_for_status()?;
Ok(())
}
pub fn new(version: &'a str) -> Self {
Self {
version,