Migration code-reference-finder to Tinyfish SDK #180
Migration code-reference-finder to Tinyfish SDK #180KrishnaAgarwal7531 wants to merge 1 commit intotinyfish-io:mainfrom
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 |
simantak-dabhade
left a comment
There was a problem hiding this comment.
Two blockers:
1. search.ts doesn't use the TinyFish SDK
src/lib/search.ts constructs raw GitHub/StackOverflow search URLs instead of using client.search.query(). The README claims SDK search is used, but the code doesn't import @tiny-fish/sdk at all. Please use client.search.query() with appropriate site filters.
2. typeof raw === "string" type error in orchestrator.ts
The SDK types event.result as Record<string, unknown> | null, never string. The typeof raw === "string" branch is unreachable and will cause a TypeScript build error in strict mode — .replace() and .trim() can't be called on a value the type system knows is never a string. Remove the string branch and cast directly.
Migrates all three external dependencies to TinyFish SDK + Groq. The GitHub API and StackExchange API are replaced entirely by client.search.query() with site:github.com and site:stackoverflow.com filters — no more GITHUB_TOKEN, STACKEXCHANGE_KEY, rate limit retries, or sequential delays. OpenRouter is replaced by groq-sdk directly. Mino raw SSE fetch is replaced by client.agent.stream with typed events and result validation. Promise.allSettled for parallel agents. mino-client.ts, openrouter.ts, and the original search.ts are all deleted.