add a clarification comment about crypto.randomUUID()

This commit is contained in:
Haileyesus Dessie
2026-01-10 15:00:46 +03:00
parent b70728254b
commit 35e140b941

View File

@@ -37,6 +37,7 @@ const TOOL_APPROVAL_TIMEOUT_MS = parseInt(process.env.CLAUDE_TOOL_APPROVAL_TIMEO
// This does not encode tool details or get shown to users; it exists so the UI
// can respond to the correct pending request without collisions.
function createRequestId() {
// if clause is used because randomUUID is not available in older Node.js versions
if (typeof crypto.randomUUID === 'function') {
return crypto.randomUUID();
}