MCPcopy Create free account
hub / github.com/IIIIQIIII/claude-code / add

Method add

src/utils/CircularBuffer.ts:18–24  ·  view source on GitHub ↗

* Add an item to the buffer. If the buffer is full, * the oldest item will be evicted.

(item: T)

Source from the content-addressed store, hash-verified

16 * the oldest item will be evicted.
17 */
18 add(item: T): void {
19 this.buffer[this.head] = item
20 this.head = (this.head + 1) % this.capacity
21 if (this.size < this.capacity) {
22 this.size++
23 }
24 }
25
26 /**
27 * Add multiple items to the buffer at once.

Callers 15

addAllMethod · 0.95
getTimestampedHistoryFunction · 0.45
removeLastFromHistoryFunction · 0.45
addToTotalSessionCostFunction · 0.45
runFunction · 0.45
callFunction · 0.45
callInnerFunction · 0.45
callFunction · 0.45
trackGitOperationsFunction · 0.45
resolveAgentToolsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected