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

Method extract_session_id

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

Source from the content-addressed store, hash-verified

45 }
46
47 fn extract_session_id(raw: &Value) -> String {
48 value_string(raw, "session_id")
49 .or_else(|| value_string(raw, "conversation_id"))
50 .or_else(|| value_string(raw, "thread_id"))
51 .or_else(|| value_at(raw, &["extra", "session_id"]))
52 .filter(|s| !s.is_empty())
53 .unwrap_or_else(|| "hermes-session".to_string())
54 }
55
56 fn extract_prompt(raw: &Value) -> Option<String> {
57 value_string(raw, "prompt")

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