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

Function test_parse_prompt_submit

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

Source from the content-addressed store, hash-verified

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