Migration loan-decision-copilot to Tinyfish SDK #207
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI 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 |
- Remove unused isSearching variable from page.tsx - Escape apostrophe in AgentCard.tsx - Remove unused FileText import from BankDetailPanel.tsx - Remove committed next-env.d.ts and add to .gitignore
simantak-dabhade
left a comment
There was a problem hiding this comment.
Clean migration. Fixed ESLint errors, removed next-env.d.ts. Build passes.
Full rewrite from a Vite + Supabase Edge Functions app to Next.js App Router. Supabase is completely removed — no client, no Edge Functions, no VITE_SUPABASE_* env vars. Everything routes through Next.js API routes directly.
The biggest improvement is in discovery: the original discover-banks function called Lovable's AI gateway (Gemini) to hallucinate bank URLs from training data — results were often wrong or outdated. The new /api/discover-banks runs two parallel TinyFish Search queries targeted at the user's specific location, deduplicates by domain, and filters out aggregator sites so only real bank pages reach the agents.
/api/analyze-loan replaces the raw Mino SSE fetch with client.agent.stream — typed EventType.STREAMING_URL, EventType.PROGRESS, EventType.COMPLETE + RunStatus.COMPLETED, with result content validation (COMPLETED status alone is not treated as success). Agents run in parallel via Promise.allSettled and stream results back as each bank finishes.