fix(config): accept optional Codex search location · openclaw/openclaw@c38d946
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -286,13 +286,13 @@ export const ToolPolicySchema = ToolPolicyBaseSchema.superRefine((value, ctx) =>
|
286 | 286 | } |
287 | 287 | }).optional(); |
288 | 288 | |
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(); |
296 | 296 | |
297 | 297 | const CodexAllowedDomainsSchema = z |
298 | 298 | .array(z.string()) |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。