()
| 502 | |
| 503 | #[test] |
| 504 | fn test_parse_user_prompt_submit() { |
| 505 | let hook = make_hook(); |
| 506 | let input = br#"{ |
| 507 | "sessionId": "s1", |
| 508 | "prompt": "Add retry logic to the client", |
| 509 | "cwd": "/repo" |
| 510 | }"#; |
| 511 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 512 | assert_eq!(event.session_id, "s1"); |
| 513 | assert_eq!( |
| 514 | event.prompt.as_deref(), |
| 515 | Some("Add retry logic to the client") |
| 516 | ); |
| 517 | } |
| 518 | |
| 519 | #[test] |
| 520 | fn test_parse_user_prompt_strips_user_query_envelope() { |
nothing calls this directly
no test coverage detected