MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / index

Function index

graph-ui/tools/pr-2068-errors-e2e.mjs:45–59  ·  view source on GitHub ↗
(project)

Source from the content-addressed store, hash-verified

43}
44
45async function index(project) {
46 const begin = await json('/api/index', { root_path: FIXTURE, project_name: project });
47 report.actions.push({ action: 'POST /api/index', project, root: FIXTURE, acknowledgement: begin });
48 const deadline = Date.now() + 180000;
49 while (Date.now() < deadline) {
50 const jobs = await json('/api/index-status');
51 const job = jobs.find((item) => item.slot === begin.slot);
52 if (job && job.status !== 'indexing') {
53 report.actions.push({ action: 'Index terminal state', project, job });
54 return job;
55 }
56 await delay(500);
57 }
58 throw new Error(`Index job timed out: ${project}`);
59}
60
61async function capture(page, name) {
62 name = proofPrefix + name;

Callers 2

failedJobWhileWatchingFunction · 0.85
mainFunction · 0.85

Calls 3

jsonFunction · 0.70
delayFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected