Repository navigation
Add grokipedia extension - #22519
Add grokipedia extension#22519
Conversation
- Refactor imports and improve type definitions; streamline component structure in search-grokipedia - first commit
|
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10 business days. Once the PR is approved and merged, the extension will be available on our Store. |
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR introduces a new "Grokipedia" extension that allows users to search and browse AI-powered encyclopedia content directly from Raycast. The extension provides access to grokipedia.com, which offers bias-free information retrieval through xAI's Grok technology. The implementation includes a robust HTTP client with retry logic, comprehensive error handling, and a clean React-based interface for searching articles and viewing detailed content with markdown support. The extension follows standard Raycast patterns with proper data fetching hooks, action panels for copying links/citations, and TypeScript type definitions for API integration.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| extensions/grokipedia/.prettierrc | 3/5 | Custom formatting config that deviates from Raycast's standard code style |
| extensions/grokipedia/src/grokipedia/types.ts | 4/5 | TypeScript definitions with some loose typing (unknown[], object) |
| extensions/grokipedia/src/grokipedia/client.ts | 4/5 | Robust HTTP client with retry logic and comprehensive error handling |
| extensions/grokipedia/src/search-grokipedia.tsx | 4/5 | Main extension component implementing search and article viewing functionality |
| extensions/grokipedia/package.json | 4/5 | Standard extension configuration with proper metadata and dependencies |
| extensions/grokipedia/CHANGELOG.md | 4/5 | Minimal changelog missing trailing newline but follows required format |
| extensions/grokipedia/README.md | 4/5 | Brief but adequate documentation for the extension |
| extensions/grokipedia/src/grokipedia/errors.ts | 5/5 | Well-structured error hierarchy for comprehensive error handling |
| extensions/grokipedia/eslint.config.js | 5/5 | Standard ESLint configuration following required template |
| extensions/grokipedia/tsconfig.json | 5/5 | Standard TypeScript configuration appropriate for Raycast extensions |
| extensions/grokipedia/.gitignore | 5/5 | Standard gitignore following established Raycast extension patterns |
Confidence score: 4/5
- This PR is safe to merge with minor improvements needed for code style consistency
- Score reflects solid implementation with good error handling and proper Raycast patterns, but deducted one point for .prettierrc deviation from standards and loose typing in some interfaces
- Pay close attention to the .prettierrc file which should use Raycast's standard configuration instead of custom settings
11 files reviewed, 8 comments
| "@types/node": "22.13.10", | ||
| "@types/node-fetch": "^2.6.13", |
There was a problem hiding this comment.
logic: @types/node-fetch dependency is listed but node-fetch itself is not included in dependencies. Either remove this dev dependency or add the corresponding runtime dependency. Are you actually using node-fetch in your code, or should this dev dependency be removed?
| if (error) { | ||
| console.error("Search error:", error); | ||
| } |
There was a problem hiding this comment.
style: error handling logs to console but doesn't display user-friendly error message
| titleHighlights: unknown[]; | ||
| snippetHighlights: unknown[]; |
There was a problem hiding this comment.
style: Consider defining more specific types instead of unknown[] for better type safety. What structure do highlight objects have? What is the expected structure of titleHighlights and snippetHighlights arrays?
| images: unknown[]; | ||
| fixedIssues: unknown[]; | ||
| metadata: object; | ||
| stats: PageStats; | ||
| linkedPages: unknown[]; |
There was a problem hiding this comment.
style: Replace unknown[] and object with more specific types for better type safety and IDE support. What are the expected structures for images, fixedIssues, linkedPages, and metadata?
| } | ||
|
|
||
| export interface StatsResponse { | ||
| totalPages: string; |
There was a problem hiding this comment.
style: Consider using number instead of string for totalPages if it represents a count. Does totalPages contain a numeric value that should be typed as number?
| @@ -0,0 +1,3 @@ | |||
| # Grokipedia | |||
|
|
|||
| Tired of reading news written by people with a bias? Find articles of information about a given topic from Grokipedia, a bias-free encyclopedia powered by AI. It is available now on Raycast, with all functionality from the webpage, grokipedia.com! No newline at end of file | |||
There was a problem hiding this comment.
style: Missing newline at end of file - add a trailing newline for proper file formatting
| @@ -0,0 +1,3 @@ | |||
| # Grokipedia Changelog | |||
|
|
|||
| ## [Initial Version] - {PR_MERGE_DATE} No newline at end of file | |||
There was a problem hiding this comment.
style: Missing newline at end of file
| { | ||
| "printWidth": 120, | ||
| "singleQuote": false | ||
| } |
There was a problem hiding this comment.
style: This .prettierrc configuration doesn't match Raycast's standard formatting. According to the guidelines, extensions should use Raycast's code style. Consider removing custom Prettier configuration to use the default Raycast formatting.
There was a problem hiding this comment.
@greptileai that's not correct; this file is EXACTLY where and what it should look like. Please remember!
There was a problem hiding this comment.
Got it! I'll remember that the .prettierrc configuration with printWidth: 120 and singleQuote: false is the standard and correct format for Raycast extensions. Here's a link to the new rule that will help me avoid this mistake in future reviews.
Thank you for the correction - this configuration is indeed exactly where and what it should be!
|
Thanks for your contribution 🔥 Another extension for this service is also in the queue. Could we unify them and create one extension? Maybe the other one has something this one doesn't. Would you be up for that? We can discuss it in Slack since we're all there. |
|
Ah sure. We could do that... |
|
Since my extension was in PR first, and I'm not hearing anything from the other contributor, maybe @pernielsentikaer could you just go ahead with publishing this and then he could just add contributions to this when he has time? |
left a comment
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR introduces a new Raycast extension called "Grokipedia" that provides search functionality for an AI-powered "bias-free encyclopedia" service. The extension allows users to search for articles on various topics through a clean List/Detail interface. The implementation follows standard Raycast extension patterns with proper TypeScript configuration, ESLint setup, and project structure. The extension includes a comprehensive HTTP client with retry logic and error handling, custom error classes for different API scenarios, and proper content processing for markdown articles with images and citations. The code demonstrates good separation of concerns with dedicated modules for types, client operations, and UI components.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| extensions/grokipedia/package.json | 3/5 | New extension package definition with missing node-fetch runtime dependency |
| extensions/grokipedia/src/grokipedia/client.ts | 3/5 | HTTP client implementation using node-fetch without proper dependency declaration |
| extensions/grokipedia/src/search-grokipedia.tsx | 4/5 | Main command component with proper Raycast patterns but basic error handling |
| extensions/grokipedia/src/grokipedia/types.ts | 4/5 | TypeScript interfaces with some weak typing using unknown[] and object types |
| extensions/grokipedia/README.md | 4/5 | Minimal documentation making unsubstantiated claims about bias-free content |
| extensions/grokipedia/CHANGELOG.md | 5/5 | Proper changelog format with required merge date template |
| extensions/grokipedia/src/grokipedia/errors.ts | 5/5 | Well-structured error class hierarchy for comprehensive error handling |
| extensions/grokipedia/.prettierrc | 5/5 | Standard Raycast Prettier configuration |
| extensions/grokipedia/.gitignore | 5/5 | Standard gitignore following Raycast extension conventions |
| extensions/grokipedia/eslint.config.js | 5/5 | Correct ESLint configuration using Raycast template |
| extensions/grokipedia/tsconfig.json | 5/5 | Standard TypeScript configuration for Raycast extensions |
Confidence score: 3/5
- This PR has significant dependency issues that will prevent proper functionality after deployment
- Score reflects critical missing runtime dependency (node-fetch) that the extension code relies on but isn't declared in package.json dependencies
- Pay close attention to extensions/grokipedia/package.json and extensions/grokipedia/src/grokipedia/client.ts for the dependency mismatch issue
11 files reviewed, 1 comment
| @@ -0,0 +1,167 @@ | |||
| import { URL, URLSearchParams } from "url"; | |||
| import fetch, { Response } from "node-fetch"; | |||
There was a problem hiding this comment.
logic: node-fetch is imported but not included in package.json dependencies. This will cause runtime errors when the extension is built and distributed.
commented
Nov 6, 2025
|
How are the working going @0xdhrv @Visual-Studio-Coder |
commented
Nov 6, 2025
I simplified the fetching process and am now working on the AI extension, which should be updated this week. |
commented
Nov 11, 2025
Greptile OverviewGreptile SummaryThis PR adds a new Grokipedia extension that allows users to search for articles and information from Grokipedia (an AI-powered, bias-free encyclopedia) directly within Raycast. The extension provides a single search command that displays results in a list view with detailed article content accessible through a Detail view. Key functionality includes HTML tag stripping from titles, citation processing with numbered references, and standard Raycast actions like copying links and opening articles in browser. The codebase follows typical Raycast patterns with proper React hooks, loading states, and error handling. The extension includes a comprehensive HTTP client with retry logic, custom error types, and structured API response interfaces. PR Description Notes:
Important Files Changed
Confidence score: 3/5
|
| @@ -0,0 +1,64 @@ | |||
| /** | |||
| * Grokipedia error classes (JS) | |||
There was a problem hiding this comment.
style: Comment says 'JS' but this is TypeScript - consider updating to reflect the actual language
| * Grokipedia error classes (JS) | |
| * Grokipedia error classes (TypeScript) |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
commented
Nov 11, 2025
|
@0xdhrv did you resolve it yet? |
commented
Nov 11, 2025
|
He said that it is okay to merge this extension for now and he would submit a PR contribution later for it. @pernielsentikaer |
commented
Nov 12, 2025
|
Published to the Raycast Store: |
commented
Nov 12, 2025
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder