Conversation
Summary of ChangesHello @Adib234, 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 addresses a critical startup crash in the CLI that occurred when the 'plan' approval mode was configured without the corresponding experimental feature being enabled. Instead of an abrupt termination, the application now intelligently defaults to a safe approval mode and logs a warning, significantly improving the user experience and overall stability of the tool under potentially misconfigured settings. Highlights
Changelog
Activity
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
|
|
Size Change: +95 B (0%) Total Size: 24.5 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
The pull request correctly addresses the startup crash that occurred when the "plan" approval mode was requested while the experimental plan feature was disabled. By implementing a graceful fallback to the default approval mode and logging a warning via debugLogger, the CLI now handles configuration mismatches robustly. The implementation in loadCliConfig is consistent with existing patterns for YOLO mode and folder trust overrides. The updated test suite in packages/cli/src/config/config.test.ts effectively verifies the fallback behavior for both command-line arguments and persistent settings. No high or critical issues were identified during the review.
Summary
This PR fixes a startup crash that occurred when the plan approval mode was requested (via settings or command-line flags) while the experimental plan feature was disabled. Instead of throwing a terminal error, the CLI now gracefully falls back to the default approval mode and logs a warning, ensuring the tool remains usable even with configuration mismatches.
Details
Related Issues
Fixes #19272
How to Validate
Turn off plan mode in all settings (user, project, and systems). If default approval mode is set as plan mode in any setting, startup should not crash and should fallback to default mode.
Pre-Merge Checklist