MCPcopy Create free account
hub / github.com/codag-megalith/codag-visualizer / isInBatch

Method isInBatch

frontend/src/cache.ts:433–443  ·  view source on GitHub ↗
(relativePath: string)

Source from the content-addressed store, hash-verified

431
432 // Helper to check if a relative path matches any content key
433 const isInBatch = (relativePath: string): boolean => {
434 if (contents[relativePath]) return true;
435 const normalizedRel = relativePath.replace(/\\/g, '/').replace(/^\//, '');
436 for (const fullPath of Object.keys(contents)) {
437 const normalizedFull = fullPath.replace(/\\/g, '/');
438 if (normalizedFull === normalizedRel) return true;
439 if (normalizedFull.endsWith('/' + normalizedRel)) return true;
440 if (normalizedFull.endsWith(normalizedRel)) return true;
441 }
442 return false;
443 };
444
445 // Filter nodes to only those for files in this batch
446 // LLM sometimes creates symbolic nodes (Frontend_UI, Telnyx_API) — skip them.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected