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

Function openInTree

graph-ui/tools/smoke-w4d.mjs:401–418  ·  view source on GitHub ↗

Eine Datei im Baum anklicken und warten, bis der Reader eine Lage hat.

(page, path)

Source from the content-addressed store, hash-verified

399
400/** Eine Datei im Baum anklicken und warten, bis der Reader eine Lage hat. */
401async function openInTree(page, path) {
402 await page.click(`[data-testid="atlas-tree-row"][data-path="${path}"]`);
403 await page.waitForFunction(
404 (expected) => {
405 const seam = globalThis.__atlasReader;
406 if (seam === undefined) {
407 return false;
408 }
409 if (seam.status === 'unavailable' || seam.status === 'failed') {
410 return true;
411 }
412 return seam.status === 'ready' && seam.document?.path === expected;
413 },
414 path,
415 { timeout: 40000 },
416 );
417 await page.waitForTimeout(500);
418}
419
420async function main() {
421 const totalStarted = Date.now();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected