MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / at

Method at

cli/src/utils/arrays.ts:96–106  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

94 }
95
96 at(index: number): T | undefined {
97 if (index >= this._length || index < -this.length) {
98 return undefined
99 }
100 if (index < 0) {
101 return this._items[
102 (this._head + this._length + index) % this._items.length
103 ]
104 }
105 return this._items[(this._head + index) % this._items.length]
106 }
107
108 clear(): void {
109 this._items = repeated(undefined as T, this._defaultCapacity)

Callers 7

enqueueMethod · 0.95
modelDisplayNameFunction · 0.80
arrays.test.tsFile · 0.80
hasSameAssistantTextFunction · 0.80
mainFunction · 0.80
printSummaryFunction · 0.80
recordFunction · 0.80

Calls

no outgoing calls

Tested by 1

recordFunction · 0.64