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

Method persist

cli/workspace/memory/patterns.go:327–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325}
326
327func (pd *PatternDetector) persist() {
328 data, err := json.MarshalIndent(pd.stats, "", " ")
329 if err != nil {
330 return
331 }
332 if err := atomicWriteFile(pd.path, data, 0o600); err != nil {
333 pd.logger.Warn("failed to write usage stats", zap.Error(err))
334 }
335}

Callers 3

RecordInteractionMethod · 0.95
RecordSessionStartMethod · 0.95
RecordSessionEndMethod · 0.95

Calls 3

atomicWriteFileFunction · 0.85
WarnMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected