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

Method removePreferences

cli/workspace/memory/profile.go:319–329  ·  view source on GitHub ↗

removePreferences deletes the named preference keys (comma-separated), along with their per-key meta.

(value string)

Source from the content-addressed store, hash-verified

317// removePreferences deletes the named preference keys (comma-separated),
318// along with their per-key meta.
319func (ps *UserProfileStore) removePreferences(value string) bool {
320 changed := false
321 for _, k := range splitListItems(value) {
322 if _, ok := ps.profile.Preferences[k]; ok {
323 delete(ps.profile.Preferences, k)
324 delete(ps.profile.FieldMeta, "pref:"+k)
325 changed = true
326 }
327 }
328 return changed
329}
330
331// upsertStances records "position :: reason" entries. A stance restating an
332// existing position (same stem) supersedes it — positions evolve, they do

Callers 1

applyUpdateMethod · 0.95

Calls 1

splitListItemsFunction · 0.85

Tested by

no test coverage detected