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

Method UpdateProfile

cli/memory_adapter.go:55–69  ·  view source on GitHub ↗
(updates map[string]string)

Source from the content-addressed store, hash-verified

53}
54
55func (a *memoryPluginAdapter) UpdateProfile(updates map[string]string) (string, error) {
56 if a.cli.memoryStore == nil {
57 return "", fmt.Errorf("memory not enabled")
58 }
59 changed := a.cli.memoryStore.UpdateProfile(updates)
60 a.invalidate()
61 if !changed {
62 return i18n.T("mem.tool.profile.nochange"), nil
63 }
64 keys := make([]string, 0, len(updates))
65 for k := range updates {
66 keys = append(keys, k)
67 }
68 return i18n.T("mem.tool.profile.ok", strings.Join(keys, ", ")), nil
69}
70
71func (a *memoryPluginAdapter) Forget(match string) (string, error) {
72 if a.cli.memoryStore == nil {

Callers 1

TestMemoryPluginAdapterFunction · 0.95

Calls 4

invalidateMethod · 0.95
TFunction · 0.92
ErrorfMethod · 0.80
UpdateProfileMethod · 0.65

Tested by 1

TestMemoryPluginAdapterFunction · 0.76