({
memoryName,
documentName
}: {
memoryName: string;
documentName: string;
})
| 91 | * @throws Will terminate the process if the input is invalid. |
| 92 | */ |
| 93 | export 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 | |
| 112 | export const getAugmentedContext = ({ |
| 113 | similarChunks, |
no test coverage detected