- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
[Components] Exa - new components #18878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
 | 
| WalkthroughAdds four Exa action modules (search, get-contents, find-similar-links, answer-question), expands the Exa app with request helpers and action methods, validates optional JSON schema inputs, and bumps package version while adding a platform dependency. Changes
 Sequence Diagram(s)sequenceDiagram
  participant Action as Action (search/get-contents/find-similar/answer)
  participant App as exa.app
  participant HTTP as HTTP API
  note right of Action #D6EAF8: action.run({ $ })\nbuilds payload from props
  Action->>App: call app.<operation>({ $, data: payload })
  note left of App #FDEBD0: app.<operation> -> post()
  App->>App: _makeRequest({ $, path, data })
  App->>HTTP: HTTP POST to getUrl(path) with _headers()
  HTTP-->>App: response
  App-->>Action: return API response
  Action->>Action: $.export("$summary", ...)
  Action-->>Caller: returns response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 
 Poem
 Pre-merge checks and finishing touches❌ Failed checks (1 warning)
 ✅ Passed checks (3 passed)
 ✨ Finishing touches
 🧪 Generate unit tests (beta)
 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
 📒 Files selected for processing (6)
 🚧 Files skipped from review as they are similar to previous changes (2)
 🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-09-15T22:01:11.472ZApplied to files: 
 📚 Learning: 2024-10-08T15:33:38.240ZApplied to files: 
 🧬 Code graph analysis (3)components/exa/actions/find-similar-links/find-similar-links.mjs (1)
 components/exa/actions/get-contents/get-contents.mjs (1)
 components/exa/actions/answer-question/answer-question.mjs (3)
 ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
 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  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (6)
- components/exa/actions/answer-question/answer-question.mjs(1 hunks)
- components/exa/actions/find-similar-links/find-similar-links.mjs(1 hunks)
- components/exa/actions/get-contents/get-contents.mjs(1 hunks)
- components/exa/actions/search/search.mjs(1 hunks)
- components/exa/exa.app.mjs(1 hunks)
- components/exa/package.json(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
components/exa/actions/search/search.mjs (3)
components/exa/actions/answer-question/answer-question.mjs (1)
response(46-53)components/exa/actions/find-similar-links/find-similar-links.mjs (1)
response(234-272)components/exa/actions/get-contents/get-contents.mjs (1)
response(122-165)
components/exa/actions/answer-question/answer-question.mjs (3)
components/exa/actions/find-similar-links/find-similar-links.mjs (1)
response(234-272)components/exa/actions/get-contents/get-contents.mjs (1)
response(122-165)components/exa/actions/search/search.mjs (1)
response(120-138)
components/exa/actions/get-contents/get-contents.mjs (1)
components/exa/actions/find-similar-links/find-similar-links.mjs (1)
response(234-272)
components/exa/actions/find-similar-links/find-similar-links.mjs (2)
components/exa/actions/get-contents/get-contents.mjs (1)
response(122-165)components/exa/actions/search/search.mjs (1)
response(120-138)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Ensure component commits modify component versions
- GitHub Check: Lint Code Base
🔇 Additional comments (6)
components/exa/package.json (1)
3-3: LGTM! Version bump and dependency addition are appropriate.The version bump to 0.1.0 reflects the new action surface, and the platform dependency is correctly specified for the new components.
Also applies to: 15-17
components/exa/actions/search/search.mjs (1)
1-143: LGTM! Clean action implementation.The action follows Pipedream best practices with proper propDefinitions, clear structure, and appropriate summary export with request tracking.
components/exa/actions/get-contents/get-contents.mjs (1)
103-169: LGTM! Conditional payload construction works correctly.The pattern of conditionally including nested objects (extras, highlights, summary) is safe since axios's JSON serialization automatically strips undefined values. The implementation correctly handles optional nested parameters.
components/exa/exa.app.mjs (2)
6-214: LGTM! Comprehensive propDefinitions.The propDefinitions are well-structured with appropriate types, labels, descriptions, and optional flags. The examples and documentation references (like JSON Schema link for summarySchema) enhance usability.
216-263: LGTM! Clean HTTP helper pattern.The methods follow a clear hierarchy (specific methods → post → _makeRequest) with proper header handling and URL construction. The API key is correctly included via x-api-key header per Exa's authentication requirements.
components/exa/actions/find-similar-links/find-similar-links.mjs (1)
180-276: LGTM! Consistent pattern with proper nested object handling.The action correctly implements conditional construction of nested objects (highlights, summary, extras) and wraps them in the contents payload when needed. The summary properly includes requestId for tracking.
4094241    to
    f8e36ce      
    Compare
  
    f8e36ce    to
    c658a54      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (7)
components/exa/actions/get-contents/get-contents.mjs (4)
66-71: Reuse app propDefinition for livecrawlTimeout for consistencyAvoid duplicating labels/descriptions/defaults; align with the app’s canonical prop definition.
- livecrawlTimeout: { - type: "integer", - label: "Live Crawl Timeout", - description: "Timeout in milliseconds for live crawling (default: 10000)", - optional: true, - }, + livecrawlTimeout: { + propDefinition: [ + app, + "livecrawlTimeout", + ], + },
104-121: Avoid shadowing the importedappinside run()Alias the destructured prop to improve readability and prevent confusion.
- async run({ $ }) { - const { - app, + async run({ $ }) { + const { + app: exa, urls, text, ... } = this; - const response = await app.getContents({ + const response = await exa.getContents({ $, data: { urls,Also applies to: 136-139
168-177: Only includeschemawhen provided to keep payload cleanPrevents sending
schema: undefined.- ...(summaryQuery - || summarySchema + ...(summaryQuery + || parsedSchema ? { summary: { query: summaryQuery, - schema: parsedSchema, + ...(parsedSchema ? { schema: parsedSchema } : {}), }, } : undefined ),
181-182: Harden $summary for missing requestIdUse optional chaining and a fallback.
- $.export("$summary", `Successfully retrieved contents with ID \`${response.requestId}\`.`); + $.export("$summary", `Successfully retrieved contents (request ID: ${response?.requestId ?? "n/a"}).`);components/exa/actions/find-similar-links/find-similar-links.mjs (3)
219-238: Only includeschemawhen provided to keep payload cleanMirror the pattern used in the other action.
- const summary = contentsSummaryQuery - || contentsSummarySchema + const summary = contentsSummaryQuery + || parsedSchema ? { query: contentsSummaryQuery, - schema: parsedSchema, + ...(parsedSchema ? { schema: parsedSchema } : {}), } : undefined;
181-207: Avoid shadowing the importedappinside run()Alias the prop to improve readability.
- const { - app, + const { + app: exa, ... } = this; - const response = await app.findSimilar({ + const response = await exa.findSimilar({Also applies to: 248-249
288-289: Harden $summary for missing requestIdUse optional chaining and a fallback.
- $.export("$summary", `Successfully found similar links with ID \`${response.requestId}\`.`); + $.export("$summary", `Successfully found similar links (request ID: ${response?.requestId ?? "n/a"}).`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (6)
- components/exa/actions/answer-question/answer-question.mjs(1 hunks)
- components/exa/actions/find-similar-links/find-similar-links.mjs(1 hunks)
- components/exa/actions/get-contents/get-contents.mjs(1 hunks)
- components/exa/actions/search/search.mjs(1 hunks)
- components/exa/exa.app.mjs(1 hunks)
- components/exa/package.json(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- components/exa/actions/answer-question/answer-question.mjs
- components/exa/exa.app.mjs
- components/exa/actions/search/search.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/exa/actions/get-contents/get-contents.mjs (1)
components/exa/actions/find-similar-links/find-similar-links.mjs (2)
parsedSchema(219-219)
response(248-286)
components/exa/actions/find-similar-links/find-similar-links.mjs (1)
components/exa/actions/get-contents/get-contents.mjs (2)
parsedSchema(123-123)
response(136-179)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/exa/package.json (1)
3-17: Version bump and platform dep look goodNo blocking issues here. Proceed.
c658a54    to
    84887d6      
    Compare
  
    | /approve | 
WHY
Resolves #18854
Summary by CodeRabbit
New Features
Chores