Fix: Remove schema default from analysis_mode, rely on form defaultValues

- Removed .default('deep') from Zod schema to fix type inference
- The field is now purely required with no optional inference
- The default value is provided by useForm's defaultValues
- This cleanly separates schema validation from form defaults
This commit is contained in:
MarkLo127 2026-03-12 22:06:05 +08:00
parent cad2889024
commit 8fa86ef6c0
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit a02ffd63fe1f8cdee302c03b0d7dca86c9631c15
Subproject commit 26f91ef0e47bc70526accb11dc43d2c20ea07a55

View File

@ -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"]).default("deep"),
analysis_mode: z.enum(["fast", "deep"]),
quick_think_llm: z.string().min(1, "請選擇快速思維模型"),
deep_think_llm: z.string().min(1, "請選擇深層思維模型"),
embedding_model: z.string().min(1, "請選擇嵌入式模型"),