MCPcopy Create free account
hub / github.com/diillson/chatcli / cleanupDailyNotes

Method cleanupDailyNotes

cli/memory_worker.go:418–430  ·  view source on GitHub ↗

cleanupDailyNotes removes old daily notes.

()

Source from the content-addressed store, hash-verified

416
417// cleanupDailyNotes removes old daily notes.
418func (mw *memoryWorker) cleanupDailyNotes() {
419 if mw.cli.memoryStore == nil {
420 return
421 }
422
423 mgr := mw.cli.memoryStore.Manager()
424 deleted, err := mgr.CleanupDailyNotes()
425 if err != nil {
426 mw.logger.Warn("Memory worker: daily cleanup failed", zap.Error(err))
427 } else if deleted > 0 {
428 mw.logger.Info("Memory worker: cleaned up old daily notes", zap.Int("deleted", deleted))
429 }
430}
431
432// detectFeature detects the current mode for usage stats.
433func (mw *memoryWorker) detectFeature() string {

Callers 1

loopMethod · 0.95

Calls 5

ManagerMethod · 0.80
WarnMethod · 0.80
ErrorMethod · 0.65
InfoMethod · 0.65
CleanupDailyNotesMethod · 0.45

Tested by

no test coverage detected