fix: make TodoItemSchema tolerant of Claude's TodoWrite payload (#502)

This commit is contained in:
hu chenxi
2026-04-20 19:46:50 +08:00
committed by GitHub
parent bec7ac3c84
commit a118b47b41
+3 -2
View File
@@ -90,8 +90,9 @@ export type AgentState = z.infer<typeof AgentStateSchema>
export const TodoItemSchema = z.object({
content: z.string(),
status: z.enum(['pending', 'in_progress', 'completed']),
priority: z.enum(['high', 'medium', 'low']),
id: z.string()
priority: z.enum(['high', 'medium', 'low']).optional().default('medium'),
id: z.string().optional().default(''),
activeForm: z.string().optional()
})
export type TodoItem = z.infer<typeof TodoItemSchema>