()
| 1024 | |
| 1025 | #[test] |
| 1026 | fn test_parse_after_thought() { |
| 1027 | let hook = make_hook(); |
| 1028 | let input = br#"{ |
| 1029 | "conversation_id": "c1", |
| 1030 | "text": "I need to check the file structure first", |
| 1031 | "duration_ms": 500, |
| 1032 | "model": "claude-sonnet-4-6" |
| 1033 | }"#; |
| 1034 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 1035 | assert_eq!(event.session_id, "c1"); |
| 1036 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 1037 | assert_eq!(event.tool_name.as_deref(), Some("AgentThought")); |
| 1038 | let raw = event.raw_json.unwrap(); |
| 1039 | assert_eq!( |
| 1040 | raw["reasoning_text"], |
| 1041 | "I need to check the file structure first" |
| 1042 | ); |
| 1043 | assert_eq!(raw["duration"], 500); |
| 1044 | assert_eq!(raw["model"], "claude-sonnet-4-6"); |
| 1045 | } |
| 1046 | |
| 1047 | #[test] |
| 1048 | fn test_parse_after_thought_minimal() { |
nothing calls this directly
no test coverage detected