Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions extensions/gemini/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"root": true,
"extends": [
"@raycast"
]
}
165 changes: 165 additions & 0 deletions extensions/gemini/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
Comment on lines +84 to +85
Copy link
Contributor

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


# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon
Copy link
Contributor

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

Suggested change
Icon
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### IDE
.idea

### Project
raycast-env.d.ts
4 changes: 4 additions & 0 deletions extensions/gemini/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": false
}
194 changes: 194 additions & 0 deletions extensions/gemini/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# Changelog

## [Fork] - 2025-03-13
Copy link
Contributor

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

Suggested change
## [Fork] - 2025-03-13
## [Fork] - {PR_MERGE_DATE}


- 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
Copy link
Contributor

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

Suggested change
## [Feature] - 2025-02-23
## [Feature] - {PR_MERGE_DATE}


- Fix: Fixed the error display issue: errors are now always fully readable and rendered correctly in their respective places.
- Fix: Fixed the issue when some errors may not be displayed in the UI.
- Feature: Added a tip to help users understand how to discuss the results of the AI command in chat.
- Feature: Refactored error messages. Now, they are more informative and user-friendly.

## [Feature] - 2025-01-22

- Feature: Introduced a method to dynamically create new commands for processing user text input from various sources, including selected text, clipboard text, and open web pages.
- Feature: Added new commands: "Fix Spelling and Grammar" and "Improve Writing".

## [Feature] - 2025-01-01

- Feature: Added import/export functionality to Conversations.

## [Fix] - 2025-01-01

- Fix: Fixed o1 models not working, and added a prompt warning for o1 models.

## [Fix] - 2024-11-24

- Fix: Fixed Images not rendering if their paths have spaces in them.

## [Feature] - 2024-10-09

- Feature: Added import/export functionality to Models to prevent potential data loss and alleviate data anxiety.
- Feature: Introduced a new reusable import/export module, so that it can be used in other parts of the extension in the future.

## [Fix] - 2024-10-09

- Fix: Modified the `useModel` initialization process to update `localStorage` only after initialization is complete, preventing data overwrite. Addresses issues #8977, #14356, and #14125.
- Chore: Removed `List.EmptyView` when the model list is empty, as the Action panel would remain empty and default models ensure the model list is not empty.

## [Feature] - 2024-10-06

- Feature: Change all occurence of `gpt-3.5` and the like to `gpt-4o-mini`, as the latter is cheaper and more efficient.
- Feature: Update `setOption` to include all model IDs, removing the filter for 'gpt' prefix. (To support `o1` models).
- Chore: Remove unnecessary union type literals in `src/type.ts:Model.option`, since 'option' was already effectively a 'string'.

## [Feature] - 2024-09-02

- Feature: Support for certain platforms that only accept simple string formats, such as DeepSeek.

## [Feature] - 2024-08-26

- Feature: Support custom vision model name

## [Fix] - 2024-08-13

- Fix: the image width calculation in AnswerDetailView, which previously returned undefined.
- Update package-lock.json to fix the security vulnerability (npm audit fix)

## [Fix] - 2024-08-09

- Fix: An unhandled error was encountered while parsing the CSV file.
- Chore: Update prompts.csv URL to the latest version

## [Fix] - 2024-07-29

- Restarting a conversation will retain the currently selected model

## [Fix] - 2024-07-16

- Add placeholder to improve accessibility

## [Feature] - 2024-06-13

- Feature: Add Vision Command Capability on Clipboard Image
- Feature: Add Vision Command Capability on Finder Image

## [Chore] - 2024-06-02

- Chore: Improve README about models and vision capabilities

## [Fix] - 2024-05-16

- Fix: add `isAutoFullInput` state machine check
- Fix: `isAutoTTS` not available in stream mode
- Feat: support detail show img
- Feat: support clipboard upload file
- Fix: question onchange not clear error

## [Fix] - 2024-05-15

- Fix: `List.Item.Detail.Markdown` display big image caused Heap out of memory

## [Feature] - 2024-05-14

- Feature: support GPT vision input

## [Feature] - 2024-04-30

- Feature: add `Summarize` command to summarize website and YouTube video
- Refactor: model dropdown save model switch `localstorage` to `cache`

## [Feature] - 2024-04-09

- Feature: Support custom model name in `Models` (Enable in preferences)

## [Fix] - 2024-03-22

- Fix: `Auto-load Text` and `Use Full Text Input` not working properly
- Fix: `Ask` `onSelectionChange` race condition

## [Chore] - 2024-03-09

- Chore: Retrieve `Preferences` dynamically directly from the generated type definition

## [Feature] - 2024-02-21

- Feature: Integrate awesome-chatgpt-prompts project

## [Fix] - 2024-02-20

- Fix: Inability to answer according to prompt rules or even refusal to answer

## [Added keywords] - 2024-12-02

- Added a few keywords to make the extension easier to find in the store.

## [Feat] - 2024-01-31

- Feature: Make responses display above the question

## [Fix] - 2024-01-28

- Fix: Proxy not working
- Fix: Fetching model data lag entered the form view
- Fix: Switching from "Ask Question" to "Full Text Input", the model change didn't work
- Chore: Add react hook lint

## [Fix] - 2024-01-19

- Fix: Azure API 401 error

## [Chore] - 2024-01-11

- Migrate openai v3 to v4

## [Fix] - 2024-01-01

- Fix: Markdown output being truncated when streaming enabled with json parse error
- Fix: Display question improperly in markdown with trailing whitespace
- Fix: Showing error message when throwing Can't stream message error

## [Fix] - 2023-08-23

- Fixed an authentication error when listing models which caused a crash

## [Fix & Feature] - May, 18 2023
Copy link
Contributor

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

Suggested change
## [Fix & Feature] - May, 18 2023
## [Fix & Feature] - 2023-05-18


- Feature: Custom API Endpoint
- Fix: 404 error code while Use Azure is enabled

## [Fix & Feature] - May, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing specific date - should use ISO format YYYY-MM-DD


- Feature: Azure OpenAI ([@sykuang](https://github.com/abielzulio/chatgpt-raycast/pull/36))
- Fix: More verbose on handling the `429` error code
- Fix: `API` -> `APIKey` ([@k8scat](https://github.com/abielzulio/chatgpt-raycast/pull/32))
- Fix: Refine docs
- Fix: JavaScript heap out of memory ([@thanhlongb](https://github.com/abielzulio/extensions/pull/1))

## [Fix & Feature] - April, 9 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing specific date - should use ISO format YYYY-MM-DD

Suggested change
## [Fix & Feature] - April, 9 2023
## [Fix & Feature] - 2023-04-09


- Feature: Pause history
- Fix: Handle the `429` error code

## [Fix] - April, 4 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing specific date - should use ISO format YYYY-MM-DD

Suggested change
## [Fix] - April, 4 2023
## [Fix] - 2023-04-04


- Fixed an edge case bug causing the conversation to only remember the response to #1.

## [Fix] - March, 29 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing specific date - should use ISO format YYYY-MM-DD

Suggested change
## [Fix] - March, 29 2023
## [Fix] - 2023-03-29


- Fetch models from the API. This allows to use GPT-4 if enabled on the user's account ([@CruelMoney](https://github.com/abielzulio/chatgpt-raycast/pull/29))
- Show the error message coming from OpenAI instead of the generic error message ([@CruelMoney](https://github.com/abielzulio/chatgpt-raycast/pull/29))
- Handle overlimit token usage ([@CruelMoney](https://github.com/abielzulio/chatgpt-raycast/pull/29))

## [Initial release] - March, 26 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing specific date - should use ISO format YYYY-MM-DD

Suggested change
## [Initial release] - March, 26 2023
## [Initial release] - 2023-03-26


Introducing ChatGPT for Raycast. Interact with OpenAI's ChatGPT straight from your command bar, with 5 commands available:

1. `Ask` Start a new conversation with ChatGPT by asking a question
2. `Conversations` → Continue recent conversations without losing context
3. `Models` → Collection of the user's default and custom models
4. `Saved Answer` → Collection of the user's saved question and its answer
5. `History`→ Collection of all the user's questions plus the answers
21 changes: 21 additions & 0 deletions extensions/gemini/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Daniele Gargano
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Copyright year 2025 is in the future - should be current year or when the code was written

Suggested change
Copyright (c) 2025 Daniele Gargano
Copyright (c) 2024 Daniele Gargano


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading