MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / validateMemoryName

Function validateMemoryName

packages/baseai/src/utils/memory/lib.ts:74–82  ·  view source on GitHub ↗
(memoryName: string)

Source from the content-addressed store, hash-verified

72 * Logs error and exits process if the memory name is invalid.
73 */
74export const validateMemoryName = (memoryName: string) => {
75 const validatedName = memoryNameSchema.safeParse(memoryName);
76 if (!validatedName.success) {
77 const err = fromZodError(validatedName.error).message;
78 p.cancel(`Invalid memory name: ${err}`);
79 process.exit(1);
80 }
81 return validatedName.data;
82};
83
84/**
85 * Validates the document embedding schema using the provided memory and document names.

Callers 2

embedMemoryFunction · 0.90
retrieveMemoryFunction · 0.90

Calls 1

cancelMethod · 0.45

Tested by

no test coverage detected