feat(events): add generic Event Bus and /events/wait endpoint for agent wakeups
This commit is contained in:
1 parent
b8d58b2e64
commit
efcab4a7b4
5 files changed
+69
No files matched your search
@@ -45,5 +45,18 @@ pub async fn nvim_telemetry_handler(
|
||||
let _ = tx.try_send(msg_str.clone());
|
||||
}
|
||||
|
||||
if payload.event == "BufWritePost" {
|
||||
if let Some(ref file_path) = payload.file {
|
||||
let normalized_file = file_path.replace("\\", "/");
|
||||
let topic = format!("nvim:save:{}", normalized_file);
|
||||
let event = crate::state::GenericEvent {
|
||||
topic,
|
||||
session_id: Some(payload.session_id.clone()),
|
||||
payload: serde_json::json!(&payload),
|
||||
};
|
||||
let _ = state.handler.state.event_bus_tx.send(event);
|
||||
}
|
||||
}
|
||||
|
||||
axum::Json(serde_json::json!({"status": "ok"}))
|
||||
}
|
||||
Reference in new issue
Block a user