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

Method extract_session_id

atomic-agent/src/hooks/copilot.rs:239–243  ·  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

237
238 /// Extract a session ID from an optional field, generating a fallback if missing.
239 fn extract_session_id(session_id: Option<String>) -> String {
240 session_id
241 .filter(|s| !s.is_empty())
242 .unwrap_or_else(|| format!("copilot-{}", uuid_short()))
243 }
244}
245
246impl Default for CopilotHook {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected