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

Method extract_session_id

atomic-agent/src/hooks/kilo.rs:168–172  ·  view source on GitHub ↗

Extract a session ID from an optional field, generating a fallback if missing.

(session_id: Option<String>)

Source from the content-addressed store, hash-verified

166
167 /// Extract a session ID from an optional field, generating a fallback if missing.
168 fn extract_session_id(session_id: Option<String>) -> String {
169 session_id
170 .filter(|s| !s.is_empty())
171 .unwrap_or_else(|| format!("kilo-{}", timestamp_hex()))
172 }
173}
174
175impl Default for KiloHook {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected