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

Source from the content-addressed store, hash-verified

607
608 #[test]
609 fn test_parse_turn_end_sets_prompt() {
610 let hook = make_hook();
611 let input = br#"{
612 "session_id": "rapid-wildflower-4475",
613 "model": "claude-sonnet-4-6",
614 "provider": "anthropic",
615 "turn_number": 2,
616 "intent_title": "Add TypeScript hello world scaffold"
617 }"#;
618 let event = hook.parse_event(HookType::TurnEnd, input).unwrap();
619 assert_eq!(event.event_type, HookType::TurnEnd);
620 assert_eq!(
621 event.prompt.as_deref(),
622 Some("Add TypeScript hello world scaffold")
623 );
624 }
625
626 // --- parse_event: turn-end stores turn_number in raw_json ---
627

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected