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

Function openTreeFile

graph-ui/tools/handtest-fixes-chat.mjs:616–628  ·  view source on GitHub ↗

Opens a file of the project root (or below) in Explore by clicking its tree row.

(page, path)

Source from the content-addressed store, hash-verified

614
615/** Opens a file of the project root (or below) in Explore by clicking its tree row. */
616async function openTreeFile(page, path) {
617 const parts = path.split('/');
618 for (let depth = 1; depth < parts.length; depth++) {
619 const row = page.locator(`.atlas-tree-row[data-path="${parts.slice(0, depth).join('/')}"]`).first();
620 await row.waitFor({ timeout: 30000 });
621 for (let attempt = 0; attempt < 4 && (await row.getAttribute('data-expanded')) !== 'true'; attempt++) { await row.click(); await wait(1200); }
622 }
623 const file = page.locator(`.atlas-tree-row[data-path="${path}"]`).first();
624 if (!(await file.count())) return false;
625 await file.click();
626 await wait(3500);
627 return true;
628}
629const cardButton = (page, name) => page.locator('.cbm-chat-explanation').getByRole('button', { name, exact: true });
630
631async function k12(page) {

Callers 3

k1Function · 0.85
k12Function · 0.85
k24SituationsFunction · 0.85

Calls 2

countMethod · 0.80
waitFunction · 0.70

Tested by

no test coverage detected