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

Function test_parse_turn_start_sets_prompt

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

Source from the content-addressed store, hash-verified

483
484 #[test]
485 fn test_parse_turn_start_sets_prompt() {
486 let hook = make_hook();
487 let input = br#"{
488 "session_id": "rapid-wildflower-4475",
489 "model": "claude-sonnet-4-6",
490 "provider": "anthropic",
491 "turn_number": 1,
492 "intent_title": "Create TypeScript hello world CLI"
493 }"#;
494 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
495 assert_eq!(event.event_type, HookType::TurnStart);
496 assert_eq!(
497 event.prompt.as_deref(),
498 Some("Create TypeScript hello world CLI")
499 );
500 }
501
502 // --- parse_event: turn-start without intent_title has no prompt ---
503

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected