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:504–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected