fix(ai): default series type to event in funnel report tool#328
fix(ai): default series type to event in funnel report tool#328nielskaspers wants to merge 1 commit intoOpenpanel-dev:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModified the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
z.preprocesswrapper around thezChartEventItemdiscriminated union to defaulttypeto"event"when the field is missinginvalid_union_discriminatorerrors when the LLM omits thetypefield in series objects during AI chat funnel report generationIssue
Fixes #327
Changes
packages/validation/src/index.ts: WrappedzChartEventItemwithz.preprocess()that addstype: "event"to objects missing thetypefield before discriminated union validationTesting
typein series objectstype: "event"ortype: "formula"still works as beforeSummary by CodeRabbit