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

Method persist

cli/workspace/memory/profile.go:666–675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

664}
665
666func (ps *UserProfileStore) persist() {
667 data, err := json.MarshalIndent(ps.profile, "", " ")
668 if err != nil {
669 ps.logger.Warn("failed to marshal user profile", zap.Error(err))
670 return
671 }
672 if err := atomicWriteFile(ps.path, data, 0o600); err != nil {
673 ps.logger.Warn("failed to write user profile", zap.Error(err))
674 }
675}
676
677func normalizeExpertise(level string) string {
678 switch strings.ToLower(strings.TrimSpace(level)) {

Callers 4

UpdateWithSourceMethod · 0.95
RecordCommandMethod · 0.95
loadMethod · 0.95

Calls 3

atomicWriteFileFunction · 0.85
WarnMethod · 0.80
ErrorMethod · 0.65

Tested by 1