Generate a short hex string for fallback session IDs. This is only used when the Kiro hook scripts fail to provide a session_id, which should be rare. Uses timestamp bits for uniqueness.
()
| 416 | /// This is only used when the Kiro hook scripts fail to provide a session_id, |
| 417 | /// which should be rare. Uses timestamp bits for uniqueness. |
| 418 | fn timestamp_hex() -> String { |
| 419 | use std::time::{SystemTime, UNIX_EPOCH}; |
| 420 | |
| 421 | let now = SystemTime::now() |
| 422 | .duration_since(UNIX_EPOCH) |
| 423 | .unwrap_or_default() |
| 424 | .as_millis(); |
| 425 | |
| 426 | // Use lower 32 bits of timestamp for a short hex ID |
| 427 | format!("{:08x}", (now & 0xFFFF_FFFF) as u32) |
| 428 | } |
| 429 | |
| 430 | // --------------------------------------------------------------------------- |
| 431 | // Verb mapping |
nothing calls this directly
no outgoing calls
no test coverage detected