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

Function formatStaleFooter

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

Source from the content-addressed store, hash-verified

419 * without bloating the main banner.
420 */
421export function formatStaleFooter(stale: PendingFile[]): string {
422 const MAX = 5;
423 const now = Date.now();
424 const shown = stale.slice(0, MAX);
425 const lines = shown.map((p) => {
426 const ageMs = Math.max(0, now - p.lastSeenMs);
427 return ` - ${p.path} (edited ${ageMs}ms ago)`;
428 });
429 const more = stale.length > MAX ? `\n - …and ${stale.length - MAX} more` : '';
430 return (
431 `(Note: ${stale.length} file(s) elsewhere in this project are pending index ` +
432 `sync but were not referenced above:\n${lines.join('\n')}${more})`
433 );
434}
435
436/**
437 * Whole-index degradation banner (issue #876). Emitted at the top of a read

Callers 1

withStalenessNoticeMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected