Skip to content

Added Gemini Assistant#9342

Open
radda-ui wants to merge 7 commits intosublimehq:masterfrom
radda-ui:master
Open

Added Gemini Assistant#9342
radda-ui wants to merge 7 commits intosublimehq:masterfrom
radda-ui:master

Conversation

@radda-ui
Copy link
Copy Markdown

Add Gemini Assistant

Adding Gemini Assistant — a Google Gemini AI assistant integrated directly into Sublime Text as an interactive console.

Details

What it does

Gemini Assistant embeds a terminal-style Gemini AI console inside Sublime Text. Users type naturally, hit Enter to send, and responses appear inline with syntax-aware formatting. Key features:

  • Interactive console with custom syntax highlighting and fold/unfold responses
  • File attachments via @filename syntax — attach project files, images, clipboard, git diffs, build output and more
  • Automatic side-tab opening for complete files and large code snippets
  • Write tools — Gemini can create, edit, patch, move and delete files, run builds, and execute git commands, all behind a confirmation step
  • Multi-key rotation with cooldown tracking — rotates automatically when a key hits quota
  • Full conversation persistence via local SQLite database

Checklist

  • Repository is publicly accessible
  • At least one tagged release exists (v1.0.0)
  • messages/install.txt present
  • dependencies.json present (requests)
  • Works on Linux, macOS, Windows
  • Sublime Text 4 only (uses ST4 APIs)
  • No other Package Control package with this name exists

Comment thread repository/g.json Outdated
Comment thread repository/g.json Outdated
@deathaxe
Copy link
Copy Markdown
Contributor

Also consider adding a .python-version file containing 3.8 to the root of your repo, in order to opt-in to python 3.8 plugin_host.

@braver
Copy link
Copy Markdown
Collaborator

braver commented Mar 23, 2026

Please tell your agent to use the PR template properly…

radda-ui and others added 2 commits March 23, 2026 22:01
Co-authored-by: deathaxe <16542113+deathaxe@users.noreply.github.com>
Co-authored-by: deathaxe <16542113+deathaxe@users.noreply.github.com>
@radda-ui
Copy link
Copy Markdown
Author

i sure will do PR it my self next time, its just 1st time doing this sorry for all the troubles,
and thank you all for your good work

Comment thread repository/g.json Outdated
radda-ui and others added 2 commits March 25, 2026 17:12
fixed the repo package, added details for repo url
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@braver
Copy link
Copy Markdown
Collaborator

braver commented Mar 26, 2026

Some mostly superficial feedback, I'll get to reviewing the package code later.

  • Please remove channel_entry.json: the information is in this PR and doesn't belong inside the package itself.
  • I would strongly advise against a custom color scheme for the "console". It is unlikely to match the user's color scheme and theme. Instead use common scope names, or colors (redish, orangish, yellowish, greenish, bluish, purplish, pinkish). There is typically no need for a special single-purpose color scheme.
  • Commands for settings and keybindings are typically captioned "Preferences: PackageName Settings", etc:
    Scherm­afbeelding 2026-03-26 om 07 14 36
  • The .python-version is used to opt-in to the python 3.8 package runtime. You can't opt-in to 3.3 and should really use 3.8 and not 3.3.
  • A context menu should apply to the clicked context, not just expose the entire package functionality. Settings and keybindings for instance do not apply to the context and should not be in that menu. Any other entries should typically check if they're functional for the current context and otherwise remove themselves from the menu. Since the context menu gets very crowded from packages all wanting to be in there, ideally there is an easy way for users to remove your package.
  • If your package is called "Gemini Assistant" that will be the directory name from which it runs. Make sure you use that consistently in all paths and in all menu items (ie. not just "Gemini"), and the settings file.

@github-actions
Copy link
Copy Markdown

Package Review

Channel Diff

Removed (none), changed (none), added Gemini Assistant.

Review for Gemini Assistant master-162d82e-2026.03.25.16.19.31

5 notices:
- Common used command prefix is: gemini.
- The package defines bindings ['enter'], ['tab'] that are also defined in default bindings and masked with a 'context'. Used context key(s): selector
    File: Default (Linux).sublime-keymap
- The package defines bindings ['enter'], ['tab'] that are also defined in default bindings and masked with a 'context'. Used context key(s): selector
    File: Default (OSX).sublime-keymap
- The package defines bindings ['enter'], ['tab'] that are also defined in default bindings and masked with a 'context'. Used context key(s): selector
    File: Default (Windows).sublime-keymap
- Tip of master is tagged with 1.0.3. ✅
    Repository: https://github.com/radda-ui/geminiassistant

1 failures:
- Calling unsafe method 'load_settings' of sublime module when API may not have been initialized
    File: coder.py
    Line: 117, Column: 17

3 warnings:
- 'Main.sublime-menu' has no 'Package Settings' entry for key bindings of 'Gemini Assistant'
    File: Main.sublime-menu
- No standard settings file matches the package name 'Gemini Assistant'. Found: gemini.sublime-settings
    Expected file: Gemini Assistant.sublime-settings
- 'Main.sublime-menu' has no 'Package Settings' entry for 'Gemini Assistant'
    File: Main.sublime-menu


For more details on the report messages (for example how to resolve them), go to:
https://github.com/packagecontrol/st_package_reviewer/wiki

@braver braver added the feedback provided The changes and package have been seen by a reviewer label Apr 8, 2026
@radda-ui
Copy link
Copy Markdown
Author

radda-ui commented Apr 11, 2026

i have fix all merge conflicts , fixed few bugs
[ ] not fixed
The package defines bindings ['enter'], ['tab'] that are also defined in default bindings and masked with a 'context'. Used context key(s): selector
File: Default (Linux).sublime-keymap
File: Default (OSX).sublime-keymap
File: Default (Windows).sublime-keymap

i did not remove those binding since they are masked with selector and they are required for the functionality of the plugin
how ever the user can chanege them from the key bindings

[ x] fixed
Calling unsafe method 'load_settings' of sublime module when API may not have been initialized
[ x] fixed
File: coder.py removed and split into focused modules: settings.py, console_view.py, code_tabs.py, dispatch.py, commands.py
[x] fixed
'Main.sublime-menu' has no 'Package Settings' entry for key bindings of 'Gemini Assistant'
File: Main.sublime-menu
[x] fixed
No standard settings file matches the package name 'Gemini Assistant'. Found: gemini.sublime-settings
Expected file: Gemini Assistant.sublime-settings
[x] fixed
'Main.sublime-menu' has no 'Package Settings' entry for 'Gemini Assistant'
File: Main.sublime-menu
[x] fixed
Replaced custom color scheme with standard Sublime Text scope names [GeminiConsole.sublime-syntax]
[x] fixed
.python-version now use 3.8
[x] fixed
prefix is set to 'GeminiAssistant' in all menus and file paths

updated release
https://github.com/radda-ui/GeminiAssistant/releases/tag/1.0.3

@braver
Copy link
Copy Markdown
Collaborator

braver commented Apr 12, 2026

You've got duplicate menu items now. Please don't repeat the settings entries in the tools menu. That way you can also have just one top-level item in the tools menu instead of an entire submenu.

i did not remove those binding since they are masked with selector and they are required for the functionality of the plugin

You still have two command without any context taking very coming bindings like Alt+N.

Edit: note that you default to a string for api_key, but you expect an array.

@braver
Copy link
Copy Markdown
Collaborator

braver commented Apr 12, 2026

Oh, almost forgot: as with any package like this we request you describe very clearly in your readme when and what data might leave the user's machine to be sent to any third party server or agent.

@rchl
Copy link
Copy Markdown
Contributor

rchl commented Apr 12, 2026

I'm not interested in the package but I've looked a bit at the code because I have nothing better to do.

  • where will the database be stored? The db_path setting value is gemini_db.db but what the directory will be? Not inside the package since packages are by default shipped in a zipped form.
  • path to settings in .sublime-commands contains two spaces so I guess it won't work - Default ($platform).sublime-keymap
  • in some places the package is called Gemini Assistant (with a space, in menus) and in some without space (in commands)
  • you are trying to read file from the package in _load_gemini_context using filesystem APIs. That won't work by default as package is installed in zipped form. Sublime has APIs to read files from a package.
  • you have hardcoded SYNTAX_MAP with paths of some syntaxes. ST has a https://www.sublimetext.com/docs/api_reference.html#sublime.list_syntaxes API that should allow you to lookup available syntaxes. Also it has API to assing syntax without using path (https://www.sublimetext.com/docs/api_reference.html#sublime.View.assign_syntax) so might not even need a path.

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

Labels

feedback provided The changes and package have been seen by a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants