continue-custom/core/llm/utils/getSecureID.ts
Shawn Smith d1973e3a6a
fix: HOTFIX 🚑 Fix crypto error (#7938)
* fix: 🚑 Fix crypto error

* fix: 🎨 Prettier

* fix: 🐛 Fix broken test
2025-09-24 13:06:58 -07:00

10 lines
332 B
TypeScript

import { v4 as uuidv4 } from "uuid";
// Utility function to get or generate UUID for LLM prompts
export function getSecureID(): string {
// Adding a type declaration for the static property
if (!(getSecureID as any).uuid) {
(getSecureID as any).uuid = uuidv4();
}
return `<!-- SID: ${(getSecureID as any).uuid} -->`;
}