Fix: Remove .optional() from analysis_mode schema to fix type inference
- Changed from .optional().default() to just .default() - This resolves the type mismatch with zodResolver and react-hook-form - The field still defaults to 'deep' when not provided
This commit is contained in:
parent
74417bbf48
commit
cad2889024
|
|
@ -52,7 +52,7 @@ const formSchema = z.object({
|
|||
.regex(/^\d{4}-\d{2}-\d{2}$/, "日期格式必須為 YYYY-MM-DD"),
|
||||
analysts: z.array(z.string()).min(1, "請至少選擇一位分析師"),
|
||||
research_depth: z.number().int().min(1).max(5),
|
||||
analysis_mode: z.enum(["fast", "deep"]).optional().default("deep"),
|
||||
analysis_mode: z.enum(["fast", "deep"]).default("deep"),
|
||||
quick_think_llm: z.string().min(1, "請選擇快速思維模型"),
|
||||
deep_think_llm: z.string().min(1, "請選擇深層思維模型"),
|
||||
embedding_model: z.string().min(1, "請選擇嵌入式模型"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue