MCPcopy
hub / github.com/codeaashu/claude-code / splice

Method splice

src/server/web/public/terminal.js:2397–2408  ·  view source on GitHub ↗
(e3, t3, ...i3)

Source from the content-addressed store, hash-verified

2395 return this._array[this._getCyclicIndex(this._length-- - 1)];
2396 }
2397 splice(e3, t3, ...i3) {
2398 if (t3) {
2399 for (let i4 = e3; i4 < this._length - t3; i4++) this._array[this._getCyclicIndex(i4)] = this._array[this._getCyclicIndex(i4 + t3)];
2400 this._length -= t3, this.onDeleteEmitter.fire({ index: e3, amount: t3 });
2401 }
2402 for (let t4 = this._length - 1; t4 >= e3; t4--) this._array[this._getCyclicIndex(t4 + i3.length)] = this._array[this._getCyclicIndex(t4)];
2403 for (let t4 = 0; t4 < i3.length; t4++) this._array[this._getCyclicIndex(e3 + t4)] = i3[t4];
2404 if (i3.length && this.onInsertEmitter.fire({ index: e3, amount: i3.length }), this._length + i3.length > this._maxLength) {
2405 const e4 = this._length + i3.length - this._maxLength;
2406 this._startIndex += e4, this._length = this._maxLength, this.onTrimEmitter.fire(e4);
2407 } else this._length += i3.length;
2408 }
2409 trimStart(e3) {
2410 e3 > this._length && (e3 = this._length), this._startIndex += e3, this._length -= e3, this.onTrimEmitter.fire(e3);
2411 }

Callers 15

removeLastFromHistoryFunction · 0.80
submitMessageMethod · 0.80
mainFunction · 0.80
extractFlagFunction · 0.80
callFunction · 0.80
registerFileReadListenerFunction · 0.80
sendMethod · 0.80
pollMethod · 0.80
receiveMethod · 0.80
dequeueFunction · 0.80
removeFunction · 0.80
removeByFilterFunction · 0.80

Calls 2

_getCyclicIndexMethod · 0.95
fireMethod · 0.80

Tested by

no test coverage detected