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

Function canonicalMemoryCmd

cli/plugins/builtin_memory.go:340–356  ·  view source on GitHub ↗

canonicalMemoryCmd folds aliases into the four canonical names.

(s string)

Source from the content-addressed store, hash-verified

338
339// canonicalMemoryCmd folds aliases into the four canonical names.
340func canonicalMemoryCmd(s string) string {
341 switch strings.ToLower(strings.TrimSpace(s)) {
342 case "remember", "add", "store", "note":
343 return "remember"
344 case "profile", "profile_set", "user":
345 return "profile"
346 case "forget", "remove", "delete":
347 return "forget"
348 case "recall", "read", "get", "search":
349 return "recall"
350 case "neighbors", "related", "links", "backlinks", "connected":
351 return "neighbors"
352 case "map", "graph", "moc", "overview":
353 return "map"
354 }
355 return ""
356}
357
358// parseProfileFields extracts the key/value map from a profile invocation.
359// It accepts {"fields":{...}} as well as a bare object {key:value,...} so

Callers 2

parseMemoryInvocationFunction · 0.85

Calls

no outgoing calls

Tested by 1