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

Function test_parse_user_prompt_submit

atomic-agent/src/hooks/grok.rs:562–575  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected