-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add gemini extension #17979
base: main
Are you sure you want to change the base?
Add gemini extension #17979
Conversation
- ray lint --fix - Removes unused getConfiguration - feat: migrate from OpenAI ChatGPT to Google Gemini - refactor(vision): removes unsupported Temperature parameter - refactor: remove unused imports and update token pricing - Updates screenshot - chore: update asset size to be compatible with raycast (512x512) - Updates assets to match Gemini - Fixees 400 no body on ask - Basic reformat from GPT to Gemini (OpenAI Compatible) - Clone ChatGPT Extension - Raycast Extension Create
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days Once the PR is approved and merged, the extension will be available on our Store. |
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.
PR Summary
This PR adds a new Gemini extension that forks and migrates functionality from OpenAI's ChatGPT to Google's Gemini API, providing AI chat, vision analysis, and command automation capabilities through Raycast.
- The CHANGELOG.md entry title for "Fork" should be updated to include
{PR_MERGE_DATE}
template string - Several OpenAI references remain in the codebase (e.g.,
cache.ts
namespace 'abielzulio.chatgpt', OpenAI SDK usage inuseGemini.tsx
) that should be updated for Gemini - The LICENSE file has a future copyright year (2025) that should be corrected to current year
- The
metadata
folder appears to be missing despite havingview
commands in package.json, which is required for store submission - The command descriptions in package.json contain template placeholders that should be replaced with actual descriptions
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
57 file(s) reviewed, 110 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -0,0 +1,194 @@ | |||
# Changelog | |||
|
|||
## [Fork] - 2025-03-13 |
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.
syntax: The title needs to include {PR_MERGE_DATE} template string instead of a hardcoded date
## [Fork] - 2025-03-13 | |
## [Fork] - {PR_MERGE_DATE} |
.cache | ||
.parcel-cache |
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.
logic: Duplicate .cache entry - one already exists on line 84
- Feature: Forked and migrated from OpenAI's ChatGPT to Google's Gemini using OpenAI-compatible API. | ||
- Chore: Updated documentation and preferences to reflect Gemini integration. | ||
|
||
## [Feature] - 2025-02-23 |
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.
syntax: The title needs to include {PR_MERGE_DATE} template string instead of a hardcoded date
## [Feature] - 2025-02-23 | |
## [Feature] - {PR_MERGE_DATE} |
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon |
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.
syntax: Icon entry should be followed by empty line with two carriage returns (Icon\r\r) to properly ignore macOS icon files
Icon | |
Icon |
|
||
- Fixed an authentication error when listing models which caused a crash | ||
|
||
## [Fix & Feature] - May, 18 2023 |
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.
style: Inconsistent date format - should use ISO format YYYY-MM-DD like other entries
## [Fix & Feature] - May, 18 2023 | |
## [Fix & Feature] - 2023-05-18 |
useEffect(() => { | ||
if (isFirstCall && enableVision) { | ||
addFromSelected(() => {}); | ||
addFromClipboard(); | ||
} | ||
}, []); |
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.
logic: Missing dependency array items: addFromSelected and addFromClipboard should be included in useEffect dependencies
useEffect(() => { | |
if (isFirstCall && enableVision) { | |
addFromSelected(() => {}); | |
addFromClipboard(); | |
} | |
}, []); | |
useEffect(() => { | |
if (isFirstCall && enableVision) { | |
addFromSelected(() => {}); | |
addFromClipboard(); | |
} | |
}, [isFirstCall, enableVision, addFromSelected, addFromClipboard]); |
const imageWidth = data.type.width; | ||
const imageHeight = data.type.height; |
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.
logic: No validation of imageWidth/imageHeight before using them - could be undefined from data.type
addFromSelected(async (error) => { | ||
await showToast({ | ||
style: Toast.Style.Failure, | ||
title: "Cannot copy file path", | ||
message: String(error), | ||
}); | ||
}) |
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.
style: Could be simplified using showFailureToast from @raycast/utils
addFromSelected(async (error) => { | |
await showToast({ | |
style: Toast.Style.Failure, | |
title: "Cannot copy file path", | |
message: String(error), | |
}); | |
}) | |
addFromSelected(async (error) => { | |
showFailureToast("Cannot copy file path", String(error)); | |
}) |
metadata={ | ||
imageMeta.size || imageMeta.width || imageMeta.height ? ( | ||
<Detail.Metadata> | ||
{/* {(imageMeta.size || imageMeta.width || imageMeta.height) && <Detail.Metadata.Separator />} */} |
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.
style: Remove commented out code that adds unnecessary noise
if (enableVision && files && files.length > 0) { | ||
if (!validateAttachments(files)) { | ||
setAttachmentError("Contain Invalid File"); | ||
} | ||
} |
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.
style: Validation should happen before setting files to avoid storing invalid files temporarily
Description
This pull request introduces a new fork of the existing ChatGPT extension, specifically tailored to integrate with the Gemini API. Note that a separate fork has been developed for the Claude API, and this initiative aims to provide users with a familiar interface while leveraging the Gemini API.
Key features of this extension include:
This implementation retains the core functionalities of the original extension while extending its use to the Gemini API, thereby enhancing the user experience for those accustomed to the previous extensions.
Screencast
Screen.Recording.2025-03-19.at.16.29.02.mp4
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder