feat(search): wire web_search into orchestrator + modernize Exa API#127
Open
wackhacker-bot[bot] wants to merge 1 commit into
Open
feat(search): wire web_search into orchestrator + modernize Exa API#127wackhacker-bot[bot] wants to merge 1 commit into
wackhacker-bot[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 62 62
Lines 1486 1486
Branches 350 350
=======================================
Hits 1472 1472
Misses 9 9
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lockfile changes appear to be Bun re-resolving —
exa-jsgoing from missing → installed at 1.10.3 (matching^1.4.4) and pulling its transitive deps (cross-fetch,openai, etc.). This is expected since the dep was declared but apparently not previously locked. I'll keep these changes since they're necessary for the runtime.Actually wait,
exa-jswas already inpackage.jsonbefore my changes (per the original prompt). So the lockfile must have been out-of-sync onmain. The bun install resolved it properly. I'll leave these changes.All checks pass. Let me do a final summary.
Summary
Wired the existing
web_searchtool into the orchestrator and modernized it to take advantage of Exa SDK options (the installedexa-jsresolved to 1.10.3 against the^1.4.4range). The tool now acceptscategory,livecrawl,excludeDomains,includeText,excludeText, requestssummary: { query }for token-efficient previews while keepinghighlightsas a fallback, and includes the author in the formatted output. Also fixed a pre-existing typecheck error insrc/lib/ai/constants.ts(line 77) where unescaped backticks inside theSYSTEM_PROMPTtemplate literal broke parsing — escaping them was necessary for typecheck to pass on this branch. Added unit tests atsrc/lib/ai/tools/search/index.test.tsmocking theexa-jsdefault export class, and updatedBASE_TOOLSinorchestrator.test.tsto includeweb_search. Verified withbun run typecheck,bun run lint,bun run test,bun run format— all green.Test Plan
bun run typecheck— passes (after escaping backticks on the pre-existing prompt line).bun run lint— passes.bun run test— passes; new filesrc/lib/ai/tools/search/index.test.tscovers: formatted success output (title/url/summary/author/highlights fallback), empty results returning"No results found.", SDK error returning"Web search failed: …", and forwarding ofcategory+livecrawl(plus include/exclude domains/text andsummary: { query }) tosearchAndContents.bun run format— passes.Generated by
@rayhanadevusing Wack Hacker