From 8b7848aac33ec67dee09e8d0b35fd70384aed1bb Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 29 Mar 2026 17:20:53 +0300 Subject: feat(api): add socket subscriptions and lifecycle events --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e3c54541..8b31cdc7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -225,7 +225,8 @@ fn main() -> io::Result<()> { init_logging(); let (api_tx, api_rx) = std::sync::mpsc::channel(); - let _api_server = api::start_server(api_tx)?; + let event_hub = api::EventHub::default(); + let _api_server = api::start_server(api_tx, event_hub.clone())?; let no_session = std::env::args().any(|a| a == "--no-session"); let in_tmux = std::env::var("TMUX").is_ok(); @@ -288,7 +289,7 @@ fn main() -> io::Result<()> { std::io::stdout().flush()?; } - let mut app = app::App::new(config, no_session, config_diagnostic, api_rx); + let mut app = app::App::new(config, no_session, config_diagnostic, api_rx, event_hub); let result = app.run(&mut terminal).await; // Reset modifyOtherKeys if we enabled it -- cgit v1.2.3