Cursor `subagentStart` hook handler. Allows Cursor subagents while preserving legacy hook compatibility.
()
| 45 | /// |
| 46 | /// Allows Cursor subagents while preserving legacy hook compatibility. |
| 47 | pub fn hook_cursor_subagent_start() -> i32 { |
| 48 | let event = read_hook_event!(); |
| 49 | let root = cursor_project_root_from_event(&event); |
| 50 | record_hook_invoked(root.as_deref(), HintAgent::Cursor, "subagentStart", &event); |
| 51 | if let Some(decision) = evaluate_cursor_subagent_start(&event) { |
| 52 | println!("{decision}"); |
| 53 | } |
| 54 | 0 |
| 55 | } |
| 56 | |
| 57 | /// Cursor `postToolUse` hook handler. |
| 58 | /// |
no test coverage detected