MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getCutoffDate

Function getCutoffDate

src/utils/cleanup.ts:25–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const DEFAULT_CLEANUP_PERIOD_DAYS = 30
24
25function getCutoffDate(): Date {
26 const settings = getSettings_DEPRECATED() || {}
27 const cleanupPeriodDays =
28 settings.cleanupPeriodDays ?? DEFAULT_CLEANUP_PERIOD_DAYS
29 const cleanupPeriodMs = cleanupPeriodDays * 24 * 60 * 60 * 1000
30 return new Date(Date.now() - cleanupPeriodMs)
31}
32
33export type CleanupResult = {
34 messages: number

Callers 7

cleanupOldMessageFilesFunction · 0.85
cleanupOldSessionFilesFunction · 0.85
cleanupSingleDirectoryFunction · 0.85
cleanupOldSessionEnvDirsFunction · 0.85
cleanupOldDebugLogsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected