MCPcopy Create free account
hub / github.com/arctic-cli/interface / calculateDaysToShow

Function calculateDaysToShow

packages/arctic/src/cli/cmd/stats.ts:420–426  ·  view source on GitHub ↗
(stats: SessionStats)

Source from the content-addressed store, hash-verified

418}
419
420function calculateDaysToShow(stats: SessionStats): number {
421 const keys = Object.keys(stats.dailyActivity)
422 if (keys.length === 0) return 90
423 const earliest = Math.min(...keys.map((k) => new Date(k).getTime()))
424 const diff = Math.ceil((Date.now() - earliest) / (24 * 60 * 60 * 1000))
425 return Math.max(diff, 90)
426}
427
428function getFavoriteModel(stats: SessionStats): string | undefined {
429 if (Object.keys(stats.modelUsage).length === 0) return undefined

Callers 1

displayStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected