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

Function uuid_short

atomic-agent/src/hooks/devin.rs:400–410  ·  view source on GitHub ↗

Generate a short hex string for fallback session IDs. This is only used when the bridge scripts fail to provide a session_id, which should be rare. Uses timestamp bits for uniqueness.

()

Source from the content-addressed store, hash-verified

398/// This is only used when the bridge scripts fail to provide a session_id,
399/// which should be rare. Uses timestamp bits for uniqueness.
400fn uuid_short() -> String {
401 use std::time::{SystemTime, UNIX_EPOCH};
402
403 let now = SystemTime::now()
404 .duration_since(UNIX_EPOCH)
405 .unwrap_or_default()
406 .as_millis();
407
408 // Use lower 32 bits of timestamp for a short hex ID
409 format!("{:08x}", (now & 0xFFFF_FFFF) as u32)
410}
411
412// Devin hook verb → HookType mapping
413

Callers 2

test_uuid_short_formatFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_uuid_short_formatFunction · 0.56