fix(cli)#21297: clear skills consent dialog before reload#26431
fix(cli)#21297: clear skills consent dialog before reload#26431scidomino merged 2 commits intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello, 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 improves the user experience of the CLI's interactive workspace skills linking flow. By ensuring the consent dialog is properly cleared and the UI state is reset immediately after user confirmation, it prevents the dialog from remaining stuck on the screen and allows the user to continue interacting with the CLI without manual intervention. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to clear active confirmation requests in the interactive consent flow. It updates the requestConsentInteractive and promptForConsentInteractive functions to accept an optional cleanup callback, which is now utilized in the skillsCommand to reset the UI state. Corresponding unit tests have been added to verify the clearing logic and the integration within the skills command. The CommandContext interface was also updated to allow setConfirmationRequest to accept null. I have no feedback to provide.
google-gemini#26431) Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Summary
This PR fixes the interactive
/skills link --scope workspaceflow so the consent dialog is cleared before skills are reloaded. After confirming the prompt, the CLI returns to a usable input state immediately instead of leaving the Yes/No dialog stuck on screen.Details
requestConsentInteractiveto support an optional cleanup callback before resolving the confirmation promise.setImmediate(...)so Ink can render the dialog dismissal before the follow-up reload work starts.setConfirmationRequestcan explicitly acceptnull./skills linkcommand wiring.Related Issues
Fixes #21297
How to Validate
npm test --workspace @google/gemini-cli -- consent.test.ts skillsCommand.test.ts/skills link <path_to_skill> --scope workspacePre-Merge Checklist