MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_user_prompt

Function test_parse_user_prompt

atomic-agent/src/hooks/pi.rs:689–695  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

687
688 #[test]
689 fn test_parse_user_prompt() {
690 let hook = make_hook();
691 let input = br#"{"session_id": "s1", "prompt": "Fix the bug", "model": "claude-sonnet-4-6", "provider": "anthropic"}"#;
692 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
693 assert_eq!(event.session_id, "s1");
694 assert_eq!(event.prompt.as_deref(), Some("Fix the bug"));
695 }
696
697 #[test]
698 fn test_parse_user_prompt_no_prompt() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected