MCPcopy Create free account
hub / github.com/Noumena-Network/code / getMemoryOptionLabel

Function getMemoryOptionLabel

src/components/memory/MemoryFileSelector.tsx:53–73  ·  view source on GitHub ↗
(
  file: ExtendedMemoryFileInfo,
  userMemoryPath: string,
  projectMemoryPath: string,
  projectAgentsPath: string,
  legacyUserMemoryPath: string,
  legacyProjectMemoryPath: string,
)

Source from the content-addressed store, hash-verified

51}
52
53function getMemoryOptionLabel(
54 file: ExtendedMemoryFileInfo,
55 userMemoryPath: string,
56 projectMemoryPath: string,
57 projectAgentsPath: string,
58 legacyUserMemoryPath: string,
59 legacyProjectMemoryPath: string,
60): string {
61 const displayPath = getDisplayPath(file.path);
62 const existsLabel = file.exists ? "" : " (new)";
63 if (file.type === "User" && !file.isNested) {
64 if (file.path === userMemoryPath) return "User memory";
65 if (file.path === legacyUserMemoryPath) return "Legacy user memory";
66 }
67 if (file.type === "Project" && !file.isNested) {
68 if (file.path === projectMemoryPath) return "Project memory";
69 if (file.path === projectAgentsPath) return "Project instructions (AGENTS.md)";
70 if (file.path === legacyProjectMemoryPath) return "Legacy project memory";
71 }
72 return `${displayPath}${existsLabel}`;
73}
74
75function getMemoryOptionDescription(
76 file: ExtendedMemoryFileInfo,

Callers 1

MemoryFileSelectorFunction · 0.85

Calls 1

getDisplayPathFunction · 0.85

Tested by

no test coverage detected