MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / generateId

Function generateId

src/core/memory-graph.ts:62–64  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

60let saveTimeout = new Map<string, ReturnType<typeof setTimeout>>();
61
62function generateId(prefix: string): string {
63 return `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
64}
65
66function cosine(a: number[], b: number[]): number {
67 const len = Math.min(a.length, b.length);

Callers 2

upsertNodeFunction · 0.85
createRelationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected