MCPcopy Create free account
hub / github.com/codeaashu/claude-code / addEntry

Function addEntry

web/lib/workers/search.worker.ts:47–54  ·  view source on GitHub ↗
(entry: SearchEntry)

Source from the content-addressed store, hash-verified

45}
46
47function addEntry(entry: SearchEntry): void {
48 const idx = entries.length;
49 entries.push(entry);
50 for (const token of tokenize(entry.text)) {
51 if (!index.has(token)) index.set(token, new Set());
52 index.get(token)!.add(idx);
53 }
54}
55
56function removeConversation(conversationId: string): void {
57 // Mark entries as removed (nullish id) — we rebuild if fragmentation grows

Callers 1

search.worker.tsFile · 0.85

Calls 6

tokenizeFunction · 0.70
getMethod · 0.65
pushMethod · 0.45
hasMethod · 0.45
setMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected