Generate a short hex string for fallback session IDs. Only used when Cursor fails to provide a conversation_id or session_id, which should be rare. Uses timestamp bits for uniqueness.
()
| 756 | /// Only used when Cursor fails to provide a conversation_id or session_id, |
| 757 | /// which should be rare. Uses timestamp bits for uniqueness. |
| 758 | fn uuid_short() -> String { |
| 759 | use std::time::{SystemTime, UNIX_EPOCH}; |
| 760 | |
| 761 | let now = SystemTime::now() |
| 762 | .duration_since(UNIX_EPOCH) |
| 763 | .unwrap_or_default() |
| 764 | .as_millis(); |
| 765 | |
| 766 | // Use lower 32 bits of timestamp for a short hex ID |
| 767 | format!("{:08x}", (now & 0xFFFF_FFFF) as u32) |
| 768 | } |
| 769 | |
| 770 | /// Convert a Cursor-specific verb to a [`HookType`]. |
| 771 | /// |
no outgoing calls