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

Function test_parse_prompt_submit

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

Source from the content-addressed store, hash-verified

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