Feat/Create Pack Template from Video#1988
Conversation
… with gemini for content analysis
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 Tip Migrating from UI to YAML configuration.Use the |
There was a problem hiding this comment.
Pull request overview
Adds TikTok video support to the “generate pack template from TikTok” flow in the API by extending the TikTok container to return/rehost either slideshow images or a video URL, and switching AI analysis for this endpoint to Google Gemini.
Changes:
- Add
videoUrlsupport end-to-end (container import response + API route prompt construction). - Switch
/pack-templates/generate-from-tiktokAI provider from OpenAI to@ai-sdk/google(Gemini). - Add env validation/test env for
GOOGLE_GENERATIVE_AI_API_KEYand update mobile copy to mention videos.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/api/test/setup.ts | Adds test env var for Google Generative AI key. |
| packages/api/src/utils/env-validation.ts | Adds GOOGLE_GENERATIVE_AI_API_KEY to validated env schema. |
| packages/api/src/schemas/packTemplates.ts | Updates request schema description to include videos. |
| packages/api/src/routes/packTemplates/generateFromTikTok.ts | Fetches videoUrl from container and sends video/images to Gemini for analysis. |
| packages/api/package.json | Adds @ai-sdk/google dependency. |
| packages/api/drizzle/meta/_journal.json | Records new migration snapshot metadata. |
| packages/api/drizzle/meta/0034_snapshot.json | Drizzle snapshot update (reflects schema state). |
| packages/api/drizzle/0034_thin_spirit.sql | Migration adding users.avatar_url. |
| packages/api/container_src/server.ts | Extends TikTok import to handle videos + optional video rehosting to R2. |
| bun.lock | Lockfile updates for new dependency and transitive upgrades. |
| apps/expo/lib/i18n/locales/en.json | Updates TikTok import UI text to mention videos/slideshows. |
| console.log('TikTok API Parsed Response:', JSON.stringify(result, null, 2)); | ||
|
|
There was a problem hiding this comment.
console.log('TikTok API Parsed Response:', JSON.stringify(result, null, 2)) will dump the full third-party response into logs, which can be very large and may include user/content metadata. Please remove this or guard it behind a debug flag and log only minimal fields needed for troubleshooting.
Feat/Create Pack Template from Video
No description provided.