MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / formatCacheAge

Function formatCacheAge

src/commands/setup.ts:123–135  ·  view source on GitHub ↗
(timestamp: number | null)

Source from the content-addressed store, hash-verified

121}
122
123function formatCacheAge(timestamp: number | null): string {
124 if (!timestamp) return '';
125 const ageMs = Date.now() - timestamp;
126 const days = Math.floor(ageMs / (1000 * 60 * 60 * 24));
127 const hours = Math.floor(ageMs / (1000 * 60 * 60));
128
129 if (days > 0) {
130 return `${days} day${days === 1 ? '' : 's'} ago`;
131 } else if (hours > 0) {
132 return `${hours} hour${hours === 1 ? '' : 's'} ago`;
133 }
134 return 'just now';
135}
136
137async function selectModel(
138 provider: string,

Callers 1

selectModelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…