MCPcopy
hub / github.com/codeaashu/claude-code / getOrCreateUserID

Function getOrCreateUserID

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

Source from the content-addressed store, hash-verified

1755}
1756
1757export function getOrCreateUserID(): string {
1758 const config = getGlobalConfig()
1759 if (config.userID) {
1760 return config.userID
1761 }
1762
1763 const userID = randomBytes(32).toString('hex')
1764 saveGlobalConfig(current => ({ ...current, userID }))
1765 return userID
1766}
1767
1768export function recordFirstStartTime(): void {
1769 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