Best-effort daemon notification for Cursor `afterFileEdit`. Resolves the edited repo-relative paths locally, then lets the daemon own scheduling and sync execution. No-ops when no in-project paths were edited.
(event_json: &str)
| 590 | /// Resolves the edited repo-relative paths locally, then lets the daemon own |
| 591 | /// scheduling and sync execution. No-ops when no in-project paths were edited. |
| 592 | async fn notify_cursor_after_file_edit(event_json: &str) { |
| 593 | let Some(root) = cursor_project_root_from_event(event_json) else { |
| 594 | return; |
| 595 | }; |
| 596 | if !crate::tracedecay::TraceDecay::has_initialized_store(&root).await { |
| 597 | return; |
| 598 | } |
| 599 | let rels = cursor_after_file_edit_rel_paths(event_json, &root); |
| 600 | if rels.is_empty() { |
| 601 | return; |
| 602 | } |
| 603 | crate::daemon::notify_hook_event( |
| 604 | &root, |
| 605 | crate::daemon::DaemonHookEvent::cursor_after_file_edit(rels) |
| 606 | .with_route(hook_route_metadata_from_event(event_json, &root)), |
| 607 | ) |
| 608 | .await; |
| 609 | } |
| 610 | |
| 611 | /// Best-effort daemon notification for Cursor `afterShellExecution`. |
| 612 | async fn notify_cursor_after_shell_event(event_json: &str) { |
no test coverage detected