MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / generateMessageKey

Function generateMessageKey

packages/core/src/import/dedup.ts:42–51  ·  view source on GitHub ↗
(timestamp: number, senderPlatformId: string, content: string | null)

Source from the content-addressed store, hash-verified

40}
41
42export function generateMessageKey(timestamp: number, senderPlatformId: string, content: string | null): string {
43 const normalizedContent = content || null
44 const parts = [
45 String(timestamp),
46 senderPlatformId,
47 normalizedContent === null ? 'null' : 'text',
48 normalizedContent ?? '',
49 ]
50 return fnv1a64(parts.join('\0'))
51}

Callers 9

dedup.test.tsFile · 0.90
getMessageKeyFunction · 0.90
loadExistingDedupFunction · 0.90
isDuplicateFunction · 0.90
writeMessagesFunction · 0.90
fullImportFunction · 0.90
incrementalImportFunction · 0.90
buildMergedOutputFunction · 0.90
tempDb.test.tsFile · 0.85

Calls 1

fnv1a64Function · 0.85

Tested by

no test coverage detected