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

Function test_parse_user_prompt_with_model

atomic-agent/src/hooks/cline.rs:770–781  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

768
769 #[test]
770 fn test_parse_user_prompt_with_model() {
771 let hook = make_hook();
772 let input = br#"{
773 "taskId": "prompt-4",
774 "model": {"provider": "anthropic", "slug": "claude-sonnet-4-5"},
775 "userPromptSubmit": {"prompt": "hello"}
776 }"#;
777 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
778 let raw = event.raw_json.unwrap();
779 assert_eq!(raw["model_name"], "claude-sonnet-4-5");
780 assert_eq!(raw["vendor"], "anthropic");
781 }
782
783 // ── parse_event tests: pre-tool (PreToolUse) ────────────────────
784

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected