| 53 | } |
| 54 | |
| 55 | func (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 | |
| 71 | func (a *memoryPluginAdapter) Forget(match string) (string, error) { |
| 72 | if a.cli.memoryStore == nil { |