MCPcopy
hub / github.com/CodebuffAI/codebuff / insert

Method insert

common/src/util/min-heap.ts:65–68  ·  view source on GitHub ↗
(item: T, score: number)

Source from the content-addressed store, hash-verified

63 }
64
65 insert(item: T, score: number): void {
66 this.heap.push({ item, score })
67 this.siftUp(this.heap.length - 1)
68 }
69
70 extractMin(): T | undefined {
71 if (this.heap.length === 0) return undefined

Callers 15

insertMessageBigqueryFunction · 0.80
insertTraceFunction · 0.80
insertRelabelFunction · 0.80
logSyncFailureFunction · 0.80
e2e-setup.tsFile · 0.80
simulateGrantWithDelayFunction · 0.80
grantOrganizationCreditsFunction · 0.80

Calls 1

siftUpMethod · 0.95

Tested by 1

simulateGrantWithDelayFunction · 0.64