fix(config): accept optional Codex search location

This commit is contained in:
Peter Steinberger
2026-05-01 14:52:07 +01:00
parent 9f55378745
commit c38d94677c

View File

@@ -286,13 +286,13 @@ export const ToolPolicySchema = ToolPolicyBaseSchema.superRefine((value, ctx) =>
}
}).optional();
const TrimmedOptionalConfigStringSchema = z.preprocess((value) => {
if (typeof value !== "string") {
return value;
}
const trimmed = value.trim();
return trimmed.length > 0 ? trimmed : undefined;
}, z.string().optional());
const TrimmedOptionalConfigStringSchema = z
.string()
.transform((value) => {
const trimmed = value.trim();
return trimmed.length > 0 ? trimmed : undefined;
})
.optional();
const CodexAllowedDomainsSchema = z
.array(z.string())