diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-29 17:20:53 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-29 17:20:53 +0300 |
| commit | 8b7848aac33ec67dee09e8d0b35fd70384aed1bb (patch) | |
| tree | 8d3f2e5d6bf3ed54ab8fe4b8f50f86b778aff3d4 /src/main.rs | |
| parent | fd1e3b8b056b2937fc0a5c90bf482e01d269f6b2 (diff) | |
feat(api): add socket subscriptions and lifecycle events
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
