MCPcopy
hub / github.com/agent0ai/agent-zero / pushHistory

Function pushHistory

plugins/_editor/webui/editor-store.js:1516–1523  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1514 },
1515
1516 pushHistory(text) {
1517 const value = String(text || "");
1518 if (this._history[this._historyIndex] === value) return;
1519 this._history = this._history.slice(0, this._historyIndex + 1);
1520 this._history.push(value);
1521 if (this._history.length > MAX_HISTORY) this._history.shift();
1522 this._historyIndex = this._history.length - 1;
1523 },
1524
1525 undo() {
1526 if (this.sourceEditor && this.isSourceMode()) {

Callers

nothing calls this directly

Calls 2

sliceMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected