MCPcopy Index your code
hub / github.com/codeaashu/claude-code / _createNewPage

Method _createNewPage

src/server/web/public/terminal.js:7641–7654  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7639 if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
7640 for (const e3 of this._pages) e3.clear();
7641 this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = false;
7642 }
7643 }
7644 _createNewPage() {
7645 if (g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages)) {
7646 const e4 = this._pages.filter(((e5) => 2 * e5.canvas.width <= (g.maxTextureSize || 4096))).sort(((e5, t4) => t4.canvas.width !== e5.canvas.width ? t4.canvas.width - e5.canvas.width : t4.percentageUsed - e5.percentageUsed));
7647 let t3 = -1, i3 = 0;
7648 for (let s4 = 0; s4 < e4.length; s4++) if (e4[s4].canvas.width !== i3) t3 = s4, i3 = e4[s4].canvas.width;
7649 else if (s4 - t3 == 3) break;
7650 const s3 = e4.slice(t3, t3 + 4), r2 = s3.map(((e5) => e5.glyphs[0].texturePage)).sort(((e5, t4) => e5 > t4 ? 1 : -1)), o2 = this.pages.length - s3.length, n2 = this._mergePages(s3, o2);
7651 n2.version++;
7652 for (let e5 = r2.length - 1; e5 >= 0; e5--) this._deletePage(r2[e5]);
7653 this.pages.push(n2), this._requestClearModel = true, this._onAddTextureAtlasCanvas.fire(n2.canvas);
7654 }
7655 const e3 = new v(this._document, this._textureSize);
7656 return this._pages.push(e3), this._activePages.push(e3), this._onAddTextureAtlasCanvas.fire(e3.canvas), e3;
7657 }

Callers 2

constructorMethod · 0.95
_drawToCacheMethod · 0.95

Calls 5

_mergePagesMethod · 0.95
_deletePageMethod · 0.95
maxMethod · 0.80
fireMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected