Repository navigation
Add ai-stats extension - #21393
Add ai-stats extension#21393JonathanRReed wants to merge 10 commits into
Conversation
- docs: add privacy policy, preferences docs and improve error handling - chore: package update - docs: move screenshots from metadata to assets folder and add commands section - feat: improve UI with N/A placeholders, enhanced copy options and metadata display - docs: add screenshots and usage instructions to README - refactor: add default Supabase credentials and remove preference fields - feat: unify model search and leaderboard into single view with pinning and filtering - feat: improve UI with creator filter dropdown, reset filters, and cleaner model display - feat: add pinned section toggle and pin reordering to model search - feat: support pinning up to 10 models with dedicated pinned section - docs: update README and add model pinning with quick switcher menu - int
|
Congratulations on your new Raycast extension! 🚀 You can expect an initial review within five 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 Summary
This PR introduces a new ai-stats extension that provides Raycast users with access to AI model statistics and leaderboards. The extension integrates with ArtificialAnalysis.ai data via a read-only Supabase backend, offering search functionality, price comparisons, benchmark results, and detailed model information.
• Core Features: Model search, leaderboard rankings, pricing data, benchmark scores, and pinning functionality
• Architecture: Uses React components with Raycast API, Supabase client for data fetching, and local storage for user preferences
• Configuration: Proper ESLint/Prettier setup following Raycast guidelines with optional Supabase override preferences
• Store Readiness: Minor issue with screenshot placement - they need to be moved from assets to metadata folder for store submission
Confidence score: 4/5
- This PR is safe to merge with minimal changes needed for store compliance
- Well-structured code following Raycast conventions with proper TypeScript typing, error handling, and configuration. Only minor store compliance issue with screenshot placement.
- Screenshot folder structure needs adjustment for store submission
Important Files Changed
File Analysis
| Filename | Score | Overview | Issues |
|---|---|---|---|
| extensions/ai-stats/package.json | 5/5 | Extension configuration with proper dependencies and Node.js version requirement | None identified |
| extensions/ai-stats/src/view_ui.tsx | 4/5 | Main React component with search, leaderboard, and detail views for AI model statistics | None identified |
| extensions/ai-stats/src/lib/supabase.ts | 4/5 | Supabase client configuration with fallback defaults and preference-based overrides | None identified |
| extensions/ai-stats/.prettierrc | 5/5 | Prettier configuration matching Raycast guidelines | None identified |
| extensions/ai-stats/eslint.config.js | 5/5 | ESLint configuration extending Raycast's standard config | None identified |
12 files reviewed, 1 comment
- chore: move screenshot assets from assets/ to metadata/ directory - chore: clean up of readme.md & minor ui fixes - refactor: extract prop type interfaces and add type roots config - chore: add Node.js version requirement to package.json - docs: add privacy policy, preferences docs and improve error handling - chore: package update - docs: move screenshots from metadata to assets folder and add commands section - feat: improve UI with N/A placeholders, enhanced copy options and metadata display - docs: add screenshots and usage instructions to README - refactor: add default Supabase credentials and remove preference fields - feat: unify model search and leaderboard into single view with pinning and filtering - feat: improve UI with creator filter dropdown, reset filters, and cleaner model display - feat: add pinned section toggle and pin reordering to model search - feat: support pinning up to 10 models with dedicated pinned section - docs: update README and add model pinning with quick switcher menu - int
There was a problem hiding this comment.
Hi 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
-
Could be nice to show the
isLoadingproperty on the<List>and maybe utilize useCachedPromise for the data being fetched faster? -
It feels like something is wrong with the colors, it's pretty red, not sure what you think here?
I'm looking forward to testing this extension again 🔥
Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.
…onsistent tag colors
|
Listened to feedback: reduced “all red” colors, improved loading with isLoading + useCachedPromise, and kept pins cached locally. Decided to skip heavy global caching to avoid stale data. It also avoids forcing the user to manually refresh to get the most up-to-date info. |
|
Updated the screenshots with the new colors. |
There was a problem hiding this comment.
Greptile Summary
This PR adds a new ai-stats extension that provides AI model benchmarks and pricing data through a Supabase backend. The extension features search functionality, leaderboards by different metrics, and detailed model information views with proper TypeScript typing and React hooks usage.
Key Features Added:
- Search and filter AI models by name, creator, and other criteria
- Leaderboard view for various metrics (MMLU Pro, GPQA, pricing, throughput)
- Pin/unpin functionality for favorite models
- Detailed model information with benchmarks, pricing, and performance data
- Proper metadata folder structure with screenshots for Raycast store submission
Issues Found:
- Hardcoded Supabase credentials exposed in source code
- Memory leak potential in debounced search implementation missing cleanup
Confidence score: 3/5
- This PR introduces security concerns with hardcoded credentials and has a minor memory leak issue
- Score reflects the hardcoded Supabase credentials which is a security vulnerability, plus a missing cleanup in useEffect that could cause memory leaks. The extension is otherwise well-structured.
- extensions/ai-stats/src/lib/supabase.ts needs credential externalization, extensions/ai-stats/src/view_ui.tsx needs useEffect cleanup
Important Files Changed
File Analysis
| Filename | Score | Overview | Issues |
|---|---|---|---|
| extensions/ai-stats/package.json | 4/5 | Well-structured package configuration with proper dependencies and commands | None identified |
| extensions/ai-stats/src/view_ui.tsx | 3/5 | Complex React component with search, leaderboards and model details functionality | Memory leak in debounce cleanup missing |
| extensions/ai-stats/src/lib/supabase.ts | 2/5 | Supabase client configuration with fallback credentials | Hardcoded credentials exposed in source code |
3 files reviewed, 2 comments
…ebounced search timeouts and implement tiered config resolution for Supabase credentials
|
fix: targeted errors found in greptile-apps bot, kept Supabase but allowed users to change it if they want. The Supabase keys are anonymous & publishable. The DB has RLS enabled & configured. |
…i.tsx - Updated dependencies in package-lock.json for various packages including @eslint-community/eslint-utils, @oclif/core, and @supabase libraries. - Enhanced user interactions in view_ui.tsx by adding keyboard shortcuts for pinning actions and displaying toast notifications for pinning/unpinning models.
|
I'll try to resolve those later today! |
|
Had problems with uploading the new PR, so I made a new one. Sorry. #21480 |


Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder