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

Function startPage

plugins/_editor/webui/editor-preview.js:24–36  ·  view source on GitHub ↗
(title, level, line, start)

Source from the content-addressed store, hash-verified

22 let offset = 0;
23
24 const startPage = (title, level, line, start) => {
25 if (current) {
26 current.end = start;
27 pages.push(finalizePage(current, pages.length, source));
28 }
29 current = {
30 title: cleanHeadingText(title) || fallbackTitle,
31 level,
32 lines: [line],
33 start,
34 end: source.length,
35 };
36 };
37
38 for (const [index, line] of lines.entries()) {
39 const lineStart = offset;

Callers 1

buildMarkdownPagesFunction · 0.85

Calls 3

finalizePageFunction · 0.85
cleanHeadingTextFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected