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

Method extract_prompt

atomic-agent/src/hooks/hermes.rs:56–63  ·  view source on GitHub ↗
(raw: &Value)

Source from the content-addressed store, hash-verified

54 }
55
56 fn extract_prompt(raw: &Value) -> Option<String> {
57 value_string(raw, "prompt")
58 .or_else(|| value_string(raw, "user_message"))
59 .or_else(|| value_string(raw, "message"))
60 .or_else(|| value_at(raw, &["extra", "prompt"]))
61 .or_else(|| value_at(raw, &["extra", "user_message"]))
62 .filter(|s| !s.is_empty())
63 }
64
65 fn extract_transcript_path(raw: &Value) -> Option<String> {
66 value_string(raw, "transcript_path")

Callers

nothing calls this directly

Calls 3

value_atFunction · 0.85
value_stringFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected