Generate a short hex string for fallback session IDs. Only used when Cline fails to provide a `taskId`, which should be rare. Uses timestamp bits for uniqueness.
()
| 493 | /// Only used when Cline fails to provide a `taskId`, which should be |
| 494 | /// rare. Uses timestamp bits for uniqueness. |
| 495 | fn uuid_short() -> String { |
| 496 | use std::time::{SystemTime, UNIX_EPOCH}; |
| 497 | |
| 498 | let now = SystemTime::now() |
| 499 | .duration_since(UNIX_EPOCH) |
| 500 | .unwrap_or_default() |
| 501 | .as_millis(); |
| 502 | |
| 503 | // Use lower 32 bits of timestamp for a short hex ID |
| 504 | format!("{:08x}", (now & 0xFFFF_FFFF) as u32) |
| 505 | } |
| 506 | |
| 507 | // ============================================================================= |
| 508 | // Tests |
no outgoing calls