()
| 560 | |
| 561 | #[test] |
| 562 | fn test_parse_user_prompt_submit() { |
| 563 | let hook = make_hook(); |
| 564 | let input = br#"{ |
| 565 | "sessionId": "s1", |
| 566 | "prompt": "Add retry logic to the client", |
| 567 | "cwd": "/repo" |
| 568 | }"#; |
| 569 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 570 | assert_eq!(event.session_id, "s1"); |
| 571 | assert_eq!( |
| 572 | event.prompt.as_deref(), |
| 573 | Some("Add retry logic to the client") |
| 574 | ); |
| 575 | } |
| 576 | |
| 577 | #[test] |
| 578 | fn test_parse_user_prompt_strips_user_query_envelope() { |
nothing calls this directly
no test coverage detected