Function
validateEmbedDocInput
({
memoryName,
documentName
}: {
memoryName: string;
documentName: string;
})
Source from the content-addressed store, hash-verified
| 196 | }; |
| 197 | |
| 198 | export 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
Tested by
no test coverage detected