Skip to content

Add ray-code extension - #22755

Merged
raycastbot merged 9 commits into
raycast:mainfrom
1weiho:ext/ray-code
Nov 9, 2025
Merged

raycastbot merged 9 commits into
raycast:mainfrom
1weiho:ext/ray-code

Conversation

@1weiho

@1weiho 1weiho commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

Description

An AI extension built at the Tokyo AI Hackathon can turn your Raycast AI Chat into a vibe coding agent.

Screencast

CleanShot 2025-11-08 at 22 27 46@2x

📺 Demo Video: https://x.com/1weiho/status/1986799091918192843

Checklist

- chore: screenshot
- chore: remove hackathon org
- chore: update description
- fix: npm lock file miss
- chore: add org
- chore: add screenshot
- fix: open extension preference action not working
- chore: update get start view
- chore: update ext logo
- chore: get started command
- chore: update ai instruction
- feat: create file tool
- refactor: remove unused workspace utility exports
- feat: delete file tool
- feat: apply edit tool
- feat: search file tool
- feat: workspace setting
- feat: grep tool
- feat: list dir tool
- feat: read file tool
- chore: init commit
@raycastbot

ghost commented Nov 8, 2025

Copy link
Copy Markdown
Collaborator

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.

@1weiho
1weiho marked this pull request as ready for review November 8, 2025 14:30

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 "ray-code" extension that transforms Raycast AI Chat into a coding assistant agent. Built during the Tokyo AI Hackathon, the extension provides AI tools for comprehensive file system operations within a specified workspace. The core functionality includes reading files, creating/deleting files, editing content, searching files with fuzzy matching, directory listing, and grep functionality. Users must configure a workspace root directory through preferences for security boundaries. The extension follows the AI tools pattern where the primary interface is through Raycast's AI chat rather than traditional commands, with a single "get-started" command that checks workspace configuration. All file operations are secured through path validation utilities that prevent directory traversal attacks.

Important Files Changed

Filename Score Overview
extensions/ray-code/package.json 4/5 Defines the AI extension with 7 file operation tools and required workspace directory preference
extensions/ray-code/README.md 1/5 Extremely minimal documentation with only a title and informal tagline lacking essential information
extensions/ray-code/src/utils/workspace.ts 5/5 Implements secure path resolution and validation to prevent directory traversal attacks
extensions/ray-code/src/tools/grep.ts 3/5 Basic grep functionality but lacks error handling and proper regex escaping
extensions/ray-code/src/tools/apply-edit.ts 4/5 Text replacement tool with confirmation function but has duplicate validation logic
extensions/ray-code/src/tools/search-files.ts 4/5 Fuzzy file search with recursive traversal and directory exclusions
extensions/ray-code/src/tools/create-file.ts 5/5 File creation tool with safety checks, user confirmation, and directory creation
extensions/ray-code/src/tools/read-file.ts 5/5 Clean file reading implementation with proper path validation
extensions/ray-code/src/tools/delete-file.ts 4/5 File deletion tool with confirmation but missing proper type imports
extensions/ray-code/src/tools/list-dir.ts 4/5 Simple directory listing tool following consistent patterns
extensions/ray-code/src/get-started.tsx 4/5 Setup interface checking workspace configuration with clear user guidance
extensions/ray-code/ai.json 5/5 AI system instructions defining tool usage patterns and workflows

Confidence score: 3/5

  • This PR introduces significant functionality but has several areas requiring attention before merge
  • Score reflects the combination of well-implemented core tools with security considerations, balanced against a severely inadequate README, some missing error handling in grep functionality, and potential code quality improvements needed in several files
  • Pay close attention to README.md which needs complete rewriting with proper documentation, and extensions/ray-code/src/tools/grep.ts which needs better error handling and regex escaping

18 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

Comment thread extensions/ray-code/src/tools/grep.ts Resolved
Comment thread extensions/ray-code/src/tools/grep.ts Resolved
Comment thread extensions/ray-code/src/get-started.tsx Resolved
Comment thread extensions/ray-code/README.md Resolved
Yiwei Ho and others added 4 commits November 8, 2025 22:41
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@1weiho
1weiho marked this pull request as draft November 8, 2025 14:55
@1weiho
1weiho marked this pull request as ready for review November 8, 2025 15:19

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 review covers only the changes made since the last review, not the entire PR. The updates address all previous feedback points effectively. The file search functionality was corrected by removing .DS_Store from the directory skip list since it's a file, not a directory. The README was completely overhauled from a minimal 3-line description to comprehensive documentation including purpose, features, commands, and detailed tool capabilities. The get-started component now properly uses openExtensionPreferences instead of hardcoded URLs. The grep tool was enhanced with regex escaping to safely handle special characters and now consistently returns arrays instead of null. These changes demonstrate thorough attention to the feedback and improve the extension's reliability, user experience, and documentation quality.

Important Files Changed

Filename Score Overview
extensions/ray-code/src/tools/search-files.ts 4/5 Correctly removed .DS_Store from directory skip list since it's a file, not a directory
extensions/ray-code/README.md 5/5 Completely expanded from minimal description to comprehensive documentation with features and tool capabilities
extensions/ray-code/src/tools/grep.ts 4/5 Added regex escaping for special characters and consistent array return type
extensions/ray-code/src/get-started.tsx 5/5 Properly replaced hardcoded URL with openExtensionPreferences function

Confidence score: 4/5

  • This PR addresses all previous feedback effectively with appropriate fixes and improvements
  • Score reflects solid implementation improvements but minor concerns about potential edge cases in file search logic
  • Pay close attention to the grep tool regex escaping implementation to ensure it handles all edge cases properly

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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 342955a into raycast:main Nov 9, 2025
@github-actions

ghost commented Nov 9, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 9, 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.

@1weiho
1weiho deleted the ext/ray-code branch December 28, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants