-
Notifications
You must be signed in to change notification settings - Fork 10.6k
feat :uninstall multiple extensions #13016
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
feat :uninstall multiple extensions #13016
Conversation
Summary of ChangesHello @JayadityaGit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the extension management CLI by enabling users to uninstall multiple extensions simultaneously. It refactors the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request successfully adds the functionality to uninstall multiple extensions in a single command. The implementation is robust, handling partial failures by continuing with other extensions and reporting all errors at the end. The associated tests are comprehensive and cover various scenarios, including single, multiple, and failed uninstalls. I have one suggestion to handle cases where duplicate extension names are provided as input to avoid user confusion.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| expect(processSpy).not.toHaveBeenCalled(); | ||
| }); | ||
|
|
||
| it('should report errors for failed uninstalls but continue with others', async () => { |
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.
👍 👍 👍 👍
chrstnb
left a comment
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.
Awesome! Looks good to me
|
Hi @chrstnb I've resolved the merge conflicts and updated the branch. I also adjusted the test mocking strategy so the partial-failure test now works as intended. The tests now use vi.hoisted() instead of the usual vi.mocked() pattern. This allows chaining mockResolvedValueOnce() / mockRejectedValueOnce() calls, which the existing vi.clearAllMocks() pattern was clearing. Thank for the review ! |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary
This PR adds support for uninstalling multiple extensions in a single command.
Previously, users had to run
gemini extensions uninstallmultiple times — now they can pass multiple extension names separated by spaces.Details
Updated command signature from
uninstall <name>→uninstall <names...>to support variadic argumentsEnhanced
handleUninstallto iterate through all provided extension namesImproved error handling to:
Fully backward compatible with single-extension uninstalls
Added comprehensive test coverage for:
How to Validate
Build the project
Create and install test extensions
mkdir -p /tmp/test-ext-{1,2,3} echo '{"name":"test-1","version":"1.0.0"}' > /tmp/test-ext-1/gemini-extension.json echo '{"name":"test-2","version":"1.0.0"}' > /tmp/test-ext-2/gemini-extension.json echo '{"name":"test-3","version":"1.0.0"}' > /tmp/test-ext-3/gemini-extension.json echo "y" | node bundle/gemini.js extensions link /tmp/test-ext-{1,2,3}Verify extensions are installed
node bundle/gemini.js extensions list # Should list test-1, test-2, test-3Test single uninstall (backward compatibility)
node bundle/gemini.js extensions uninstall test-1 # Expected: Extension "test-1" successfully uninstalled.Test multiple uninstall (new feature)
Verify all extensions are removed
node bundle/gemini.js extensions list # Expected: No extensions installed.Run tests
Pre-Merge Checklist
#13017