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

Function validateMemoryDocNames

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

Source from the content-addressed store, hash-verified

91 * @throws Will terminate the process if the input is invalid.
92 */
93export const validateMemoryDocNames = ({
94 memoryName,
95 documentName
96}: {
97 memoryName: string;
98 documentName: string;
99}) => {
100 const validatedData = memoryDocSchema.safeParse({
101 memoryName,
102 documentName
103 });
104 if (!validatedData.success) {
105 const err = fromZodError(validatedData.error).message;
106 p.cancel(`Invalid input: ${err}`);
107 process.exit(1);
108 }
109 return validatedData.data;
110};
111
112export const getAugmentedContext = ({
113 similarChunks,

Callers 1

isMemoryDocExistFunction · 0.90

Calls 1

cancelMethod · 0.45

Tested by

no test coverage detected