Skip to content

Add grokipedia extension - #22519

Merged
raycastbot merged 2 commits into
raycast:mainfrom
Visual-Studio-Coder:ext/grokipedia
Nov 12, 2025
Merged

raycastbot merged 2 commits into
raycast:mainfrom
Visual-Studio-Coder:ext/grokipedia

Conversation

@Visual-Studio-Coder

@Visual-Studio-Coder Visual-Studio-Coder commented Oct 30, 2025 •

Copy link
Copy Markdown
Contributor

Description

Screencast

Checklist

- Refactor imports and improve type definitions; streamline component structure in search-grokipedia
- first commit
@raycastbot

raycastbot commented Oct 30, 2025 •

Copy link
Copy Markdown
Collaborator

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.

@Visual-Studio-Coder
Visual-Studio-Coder marked this pull request as ready for review October 30, 2025 01:20

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Edit Code Review Agent Settings | Greptile

Comment on lines +44 to +45
"@types/node": "22.13.10",
"@types/node-fetch": "^2.6.13",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment on lines +23 to +25
if (error) {
console.error("Search error:", error);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: error handling logs to console but doesn't display user-friendly error message

Comment on lines +7 to +8
titleHighlights: unknown[];
snippetHighlights: unknown[];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment on lines +33 to +37
images: unknown[];
fixedIssues: unknown[];
metadata: object;
stats: PageStats;
linkedPages: unknown[];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Missing newline at end of file - add a trailing newline for proper file formatting

Comment thread extensions/grokipedia/CHANGELOG.md Outdated
@@ -0,0 +1,3 @@
# Grokipedia Changelog

## [Initial Version] - {PR_MERGE_DATE} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Missing newline at end of file

Comment on lines +1 to +4
{
"printWidth": 120,
"singleQuote": false
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greptileai that's not correct; this file is EXACTLY where and what it should look like. Please remember!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@raycastbot raycastbot added the Approved Approved by a user label Oct 30, 2025
@pernielsentikaer pernielsentikaer mentioned this pull request Oct 31, 2025
5 tasks done
@pernielsentikaer

Copy link
Copy Markdown
Contributor

Hi @Visual-Studio-Coder👋

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.

@Visual-Studio-Coder

Copy link
Copy Markdown
Contributor Author

Ah sure. We could do that...

@Visual-Studio-Coder

Copy link
Copy Markdown
Contributor Author

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?

@pernielsentikaer pernielsentikaer removed the Approved Approved by a user label Nov 3, 2025

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Edit Code Review Agent Settings | Greptile

@@ -0,0 +1,167 @@
import { URL, URLSearchParams } from "url";
import fetch, { Response } from "node-fetch";

ghost Nov 3, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: node-fetch is imported but not included in package.json dependencies. This will cause runtime errors when the extension is built and distributed.

@pernielsentikaer

ghost commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

How are the working going @0xdhrv @Visual-Studio-Coder

@pernielsentikaer
pernielsentikaer marked this pull request as draft November 6, 2025 11:17
@0xdhrv

ghost commented Nov 6, 2025

Copy link
Copy Markdown
Member

How are the working going @0xdhrv @Visual-Studio-Coder

I simplified the fetching process and am now working on the AI extension, which should be updated this week.

@Visual-Studio-Coder
Visual-Studio-Coder marked this pull request as ready for review November 11, 2025 17:44
@greptile-apps

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This 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:

  • The description and screencast sections are empty and should be filled out to explain what the extension does and provide visual demonstration

Important Files Changed

Filename Score Overview
extensions/grokipedia/package.json 3/5 Defines extension metadata and dependencies but missing node-fetch runtime dependency
extensions/grokipedia/src/search-grokipedia.tsx 4/5 Main search command implementation with proper React patterns but silent error handling
extensions/grokipedia/src/grokipedia/client.ts 3/5 HTTP client with retry logic but uses node-fetch without proper dependency declaration
extensions/grokipedia/src/grokipedia/types.ts 4/5 TypeScript interfaces for API responses with some weak typing using unknown[] and object
extensions/grokipedia/src/grokipedia/errors.ts 5/5 Well-structured error hierarchy for comprehensive error handling
extensions/grokipedia/README.md 4/5 Basic extension description but lacks comprehensive documentation and trailing newline
extensions/grokipedia/CHANGELOG.md 4/5 Proper changelog format with template string but missing content and trailing newline
extensions/grokipedia/.prettierrc 5/5 Standard Prettier configuration following Raycast guidelines
extensions/grokipedia/tsconfig.json 5/5 Proper TypeScript configuration for Raycast extensions
extensions/grokipedia/.gitignore 5/5 Standard gitignore file for Raycast extensions
extensions/grokipedia/eslint.config.js 5/5 Correct ESLint configuration using Raycast's template

Confidence score: 3/5

  • This PR introduces a functional extension but has several dependency and error handling issues that need attention
  • Score reflects missing runtime dependencies, silent error handling in search functionality, and weak type definitions that could cause runtime issues
  • Pay close attention to package.json for dependency management and search-grokipedia.tsx for error handling improvements

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@@ -0,0 +1,64 @@
/**
* Grokipedia error classes (JS)

ghost Nov 11, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Comment says 'JS' but this is TypeScript - consider updating to reflect the actual language

Suggested change
* 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!

@pernielsentikaer

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

@0xdhrv did you resolve it yet?

@Visual-Studio-Coder

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

He said that it is okay to merge this extension for now and he would submit a PR contribution later for it. @pernielsentikaer

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 05e1779 into raycast:main Nov 12, 2025
@github-actions

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants