10000 feat: Add Gemini support and enhance shell completion (zsh only) by quique0194 · Pull Request #680 · TheR1D/shell_gpt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add Gemini support and enhance shell completion (zsh only) #680

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

quique0194
Copy link

This PR introduces ZSH shell completion, improves the Typer CLI structure, and adds support for both OpenAI and Gemini LLMs.

Key changes:
• Adds support for Gemini LLM alongside OpenAI
• Implements ZSH completion support
• Modernizes Typer usage with a typer.Typer app instance
• Includes a .gitignore file to exclude python artifacts

Note: I'll pause work on this PR for now. Before merging, would like to implement:
• Add tests for the new ZSH completion feature
• Ensure compatibility between OpenAI and Gemini models
• Confirm OpenAI functionality is fully restored

In the meantime, any feedback is welcome!

For now, openai is not working, it will be fixed in a next commit
Changed the default model to 'auto_select_default_model' and added logic to handle different LLM providers (gemini and openai) in the gemini_handler. Introduced a validation function to ensure model compatibility with the selected provider.
Ctrl+L clears the terminal, changing this is too painful.
This commit migrates from `typer.run(main)` to using a `typer.Typer` app instance. This change allows more flexibility in managing the command-line interface and enables features like disabling autocompletion via `add_completion=False`. This also prepares the codebase for more complex command structures  in the future.
This commit introduces the ability to install shell completion files for ZSH, enhancing user experience by providing command suggestions. The implementation includes a new option in the Typer command-line interface and a dedicated function to handle the installation process, ensuring that the necessary configurations are added to the user's .zshrc file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0