MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / buildMemoryIdentityParts

Function buildMemoryIdentityParts

src/memory/store.ts:226–240  ·  view source on GitHub ↗
(memory: {
  type: MemoryType;
  category: MemoryCategory;
  memory: string;
  reason: string;
  scope?: MemoryScope;
})

Source from the content-addressed store, hash-verified

224}
225
226export function buildMemoryIdentityParts(memory: {
227 type: MemoryType;
228 category: MemoryCategory;
229 memory: string;
230 reason: string;
231 scope?: MemoryScope;
232}): string {
233 const scopePart =
234 !memory.scope || memory.scope.kind === 'global'
235 ? 'global'
236 : memory.scope.kind === 'file'
237 ? `file:${normalizePathLike(memory.scope.file)}`
238 : `symbol:${normalizePathLike(memory.scope.file)}:${memory.scope.symbol}`;
239 return `${memory.type}:${memory.category}:${memory.memory}:${memory.reason}:${scopePart}`;
240}
241
242export function applyUnfilteredLimit(
243 memories: Memory[],

Callers 3

handleMemoryCliFunction · 0.85
handleFunction · 0.85

Calls 1

normalizePathLikeFunction · 0.70

Tested by

no test coverage detected