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

Source from the content-addressed store, hash-verified

503
504 #[test]
505 fn test_parse_user_prompt_submit() {
506 let hook = make_hook();
507 let input = br#"{
508 "sessionId": "s1",
509 "prompt": "Add retry logic to the client",
510 "cwd": "/repo"
511 }"#;
512 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
513 assert_eq!(event.session_id, "s1");
514 assert_eq!(
515 event.prompt.as_deref(),
516 Some("Add retry logic to the client")
517 );
518 }
519
520 #[test]
521 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