Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(voice): handle hotkey listener cleanup on server shutdown

Steven Enamakelc247d69cc526
diff --git a/crates/openhuman-core/src/voice/server/hotkey_listener.rs b/crates/openhuman-core/src/voice/server/hotkey_listener.rs
index a9483a3274..d6626ca20d 100644
--- a/crates/openhuman-core/src/voice/server/hotkey_listener.rs
+++ b/crates/openhuman-core/src/voice/server/hotkey_listener.rs
@@ -1,13 +1,16 @@
//! Hotkey listener dispatch: rdev everywhere except the macOS Fn/Globe key,
//! which needs the Swift-based globe listener instead.
+#[cfg(target_os = "macos")]
use std::time::Duration;
+#[cfg(target_os = "macos")]
use log::{debug, info, warn};
use tokio_util::sync::CancellationToken;
use crate::voice::hotkey;
+#[cfg(target_os = "macos")]
use super::LOG_PREFIX;
/// Opaque handle that keeps the hotkey listener alive. Drop to stop.