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

Method debugFileStatus

frontend/src/cache.ts:368–387  ·  view source on GitHub ↗

* Debug: Get info about why a file might be uncached

(filePath: string, content: string)

Source from the content-addressed store, hash-verified

366 * Debug: Get info about why a file might be uncached
367 */
368 debugFileStatus(filePath: string, content: string): {
369 inputPath: string;
370 normalizedPath: string;
371 computedHash: string;
372 cachedEntry: boolean;
373 cachedHash: string | null;
374 hashMatch: boolean;
375 } {
376 const normalizedPath = this.toRelativePath(filePath);
377 const computedHash = this.hashContentAST(content, filePath);
378 const cached = this.files[normalizedPath];
379 return {
380 inputPath: filePath,
381 normalizedPath,
382 computedHash: computedHash.substring(0, 16) + '...',
383 cachedEntry: !!cached,
384 cachedHash: cached ? cached.hash.substring(0, 16) + '...' : null,
385 hashMatch: cached ? cached.hash === computedHash : false
386 };
387 }
388
389 /**
390 * Check multiple files, return cached vs uncached

Callers

nothing calls this directly

Calls 2

toRelativePathMethod · 0.95
hashContentASTMethod · 0.95

Tested by

no test coverage detected