| 1 | // Utility function to get or generate UUID for LLM prompts |
| 2 | export function getSecureID(): string { |
| 3 | // Adding a type declaration for the static property |
| 4 | if (!(getSecureID as any).uuid) { |
| 5 | (getSecureID as any).uuid = crypto.randomUUID(); |
| 6 | } |
| 7 | return `<!-- SID: ${(getSecureID as any).uuid} -->`; |
| 8 | } |