Skip to content

Commit c38d946

Browse files
committed
fix(config): accept optional Codex search location
1 parent 9f55378 commit c38d946

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/config/zod-schema.agent-runtime.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ export const ToolPolicySchema = ToolPolicyBaseSchema.superRefine((value, ctx) =>
286286
}
287287
}).optional();
288288

289-
const TrimmedOptionalConfigStringSchema = z.preprocess((value) => {
290-
if (typeof value !== "string") {
291-
return value;
292-
}
293-
const trimmed = value.trim();
294-
return trimmed.length > 0 ? trimmed : undefined;
295-
}, z.string().optional());
289+
const TrimmedOptionalConfigStringSchema = z
290+
.string()
291+
.transform((value) => {
292+
const trimmed = value.trim();
293+
return trimmed.length > 0 ? trimmed : undefined;
294+
})
295+
.optional();
296296

297297
const CodexAllowedDomainsSchema = z
298298
.array(z.string())

0 commit comments

Comments
 (0)