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

Method extract_session_id

atomic-agent/src/hooks/codex.rs:167–178  ·  view source on GitHub ↗
(
        session_id: Option<String>,
        thread_id: Option<String>,
        raw: &Value,
    )

Source from the content-addressed store, hash-verified

165 }
166
167 fn extract_session_id(
168 session_id: Option<String>,
169 thread_id: Option<String>,
170 raw: &Value,
171 ) -> String {
172 session_id
173 .or(thread_id)
174 .or_else(|| value_string(raw, "conversation_id"))
175 .or_else(|| value_string(raw, "thread_id"))
176 .filter(|s| !s.is_empty())
177 .unwrap_or_else(|| format!("codex-{}", uuid_short()))
178 }
179
180 fn parse_json(&self, hook_type: HookType, input: &[u8]) -> AgentResult<Value> {
181 if input.is_empty() {

Callers

nothing calls this directly

Calls 2

value_stringFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected