docs(gemini): replace type assertions with runtime narrowing in interactions examples#743
Conversation
…actions examples
Remove the `GeminiInteractionsCustomEventValue` and inline `{ interactionId }`
casts from the Interactions API examples, narrowing the custom-event payload
with typeof/in checks instead, per the repo's no-`as`-in-docs convention. Also
drops the now-unused type imports.
|
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)
📝 WalkthroughWalkthroughThis PR updates the Gemini adapter documentation to use defensive runtime parsing for interaction ID extraction. The import statement is simplified, and two code examples are revised to add shape verification guards before accessing the interaction ID from ChangesGemini Interaction ID Defensive Parsing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Remove the
GeminiInteractionsCustomEventValueand inline{ interactionId }casts from the Interactions API examples, narrowing the custom-event payload
with typeof/in checks instead, per the repo's no-
as-in-docs convention. Alsodrops the now-unused type imports.
Summary by CodeRabbit