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

Function test_parse_prompt_submit

atomic-agent/src/hooks/kilo.rs:556–569  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

554
555 #[test]
556 fn test_parse_prompt_submit() {
557 let hook = make_hook();
558 let input = br#"{
559 "session_id": "abc123-kilo",
560 "cwd": "/tmp/project",
561 "model": "claude-sonnet-4",
562 "prompt": "Fix the bug",
563 "timestamp": "2026-07-15T12:00:00Z"
564 }"#;
565 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
566 assert_eq!(event.session_id, "abc123-kilo");
567 assert_eq!(event.event_type, HookType::TurnStart);
568 assert_eq!(event.prompt.as_deref(), Some("Fix the bug"));
569 }
570
571 #[test]
572 fn test_parse_agent_stop() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected