MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / getOrCreateUserID

Function getOrCreateUserID

src/utils/config.ts:1769–1778  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1767}
1768
1769export function getOrCreateUserID(): string {
1770 const config = getGlobalConfig()
1771 if (config.userID) {
1772 return config.userID
1773 }
1774
1775 const userID = randomBytes(32).toString('hex')
1776 saveGlobalConfig(current => ({ ...current, userID }))
1777 return userID
1778}
1779
1780export function recordFirstStartTime(): void {
1781 const config = getGlobalConfig()

Callers 6

getTelemetryAttributesFunction · 0.85
user.tsFile · 0.85
getAPIMetadataFunction · 0.85
logEventTo1PAsyncFunction · 0.85
datadog.tsFile · 0.85

Calls 3

getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected