Skip to content

Commit 701a429

Browse files
committed
fix: import randomUUID from node:crypto
1 parent 4c12914 commit 701a429

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/tools/langsmith/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { randomUUID } from 'node:crypto'
12
import type { LangsmithRunPayload } from '@/tools/langsmith/types'
23

34
interface NormalizedRunPayload {
@@ -20,7 +21,7 @@ const toCompactTimestamp = (startTime?: string): string => {
2021
}
2122

2223
export const normalizeLangsmithRunPayload = (run: LangsmithRunPayload): NormalizedRunPayload => {
23-
const runId = run.id ?? crypto.randomUUID()
24+
const runId = run.id ?? randomUUID()
2425
const traceId = run.trace_id ?? runId
2526
const startTime = run.start_time ?? new Date().toISOString()
2627
const dottedOrder = run.dotted_order ?? `${toCompactTimestamp(startTime)}Z${runId}`

0 commit comments

Comments
 (0)