MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / validateEmbedDocInput

Function validateEmbedDocInput

packages/baseai/src/utils/memory/lib.ts:198–212  ·  view source on GitHub ↗
({
	memoryName,
	documentName
}: {
	memoryName: string;
	documentName: string;
})

Source from the content-addressed store, hash-verified

196};
197
198export const validateEmbedDocInput = ({
199 memoryName,
200 documentName
201}: {
202 memoryName: string;
203 documentName: string;
204}) => {
205 const validatedName = memoryNameSchema.safeParse(memoryName);
206 if (!validatedName.success) {
207 const err = fromZodError(validatedName.error).message;
208 p.cancel(`Invalid memory name: ${err}`);
209 process.exit(1);
210 }
211 return validatedName.data;
212};

Callers

nothing calls this directly

Calls 1

cancelMethod · 0.45

Tested by

no test coverage detected