MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / formatStaleBanner

Function formatStaleBanner

src/mcp/tools.ts:400–414  ·  view source on GitHub ↗
(stale: PendingFile[])

Source from the content-addressed store, hash-verified

398 * without waiting for the debounced sync (issue #403).
399 */
400export function formatStaleBanner(stale: PendingFile[]): string {
401 const now = Date.now();
402 const lines = stale.map((p) => {
403 const ageMs = Math.max(0, now - p.lastSeenMs);
404 const label = p.indexing ? 'indexing in progress' : 'pending sync';
405 return ` - ${p.path} (edited ${ageMs}ms ago, ${label})`;
406 });
407 return (
408 '⚠️ Some files referenced below were edited since the last index sync — ' +
409 'their codegraph entries may be stale:\n' +
410 lines.join('\n') +
411 '\nFor accurate content of those specific files, Read them directly. ' +
412 'The rest of this response is fresh.'
413 );
414}
415
416/**
417 * Compact footer listing pending files that are NOT referenced in this

Callers 1

withStalenessNoticeMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected