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

Function test_parse_turn_end_sets_prompt

atomic-agent/src/hooks/sherpa.rs:515–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

513
514 #[test]
515 fn test_parse_turn_end_sets_prompt() {
516 let hook = make_hook();
517 let input = br#"{
518 "session_id": "rapid-wildflower-4475",
519 "model": "claude-sonnet-4-6",
520 "provider": "anthropic",
521 "turn_number": 2,
522 "intent_title": "Add TypeScript hello world scaffold"
523 }"#;
524 let event = hook.parse_event(HookType::TurnEnd, input).unwrap();
525 assert_eq!(event.event_type, HookType::TurnEnd);
526 assert_eq!(
527 event.prompt.as_deref(),
528 Some("Add TypeScript hello world scaffold")
529 );
530 }
531
532 // --- parse_event: turn-end stores turn_number in raw_json ---
533

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected