fix(patch): cherry-pick 467a305 to release/v0.9.0-preview.0-pr-10661 to patch version v0.9.0-preview.0 and create version 0.9.0-preview.1#10817
Conversation
Summary of ChangesHello @gemini-cli-robot, 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 is an automated patch release, updating the preview version from 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
|
|
Size Change: +17 B (0%) Total Size: 17.7 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request refactors the shouldUseNodePtyShell configuration to enableInteractiveShell and changes its default value to true. The changes are mostly correct, but I've found two issues. First, a critical issue in the settings migration map that breaks backward compatibility for users with the old setting. Second, a high-severity issue regarding an inconsistent default value for the new setting in the core Config class, which could lead to incorrect behavior. I've provided suggestions to fix both issues.
| sandbox: 'tools.sandbox', | ||
| selectedAuthType: 'security.auth.selectedType', | ||
| shouldUseNodePtyShell: 'tools.shell.enableInteractiveShell', | ||
| enableInteractiveShell: 'tools.shell.enableInteractiveShell', |
There was a problem hiding this comment.
This change breaks settings migration for users with the old shouldUseNodePtyShell setting. MIGRATION_MAP is used for migrating old settings to the new nested format (V1 to V2) and for determining the key name when saving back to the flat format (V2 to V1).
By replacing shouldUseNodePtyShell with enableInteractiveShell as the key, you've removed the logic that migrates existing user settings.
To support both migrating the old setting and using the new name when saving, both keys should be present in the map. The old key ensures migration, and the new key (as the last entry for this path) will be used by the reverse map for saving.
| enableInteractiveShell: 'tools.shell.enableInteractiveShell', | |
| shouldUseNodePtyShell: 'tools.shell.enableInteractiveShell', | |
| enableInteractiveShell: 'tools.shell.enableInteractiveShell', |
| this.trustedFolder = params.trustedFolder; | ||
| this.useRipgrep = params.useRipgrep ?? true; | ||
| this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? false; | ||
| this.enableInteractiveShell = params.enableInteractiveShell ?? false; |
There was a problem hiding this comment.
The default value for enableInteractiveShell is inconsistent across the codebase. Here in the Config constructor, it defaults to false (?? false), while the schema (packages/cli/src/config/settingsSchema.ts) and the CLI config loader (packages/cli/src/config/config.ts) now default to true. This could lead to unexpected behavior where the interactive shell is disabled when it should be enabled by default. To ensure consistency, the default value should be true here as well.
| this.enableInteractiveShell = params.enableInteractiveShell ?? false; | |
| this.enableInteractiveShell = params.enableInteractiveShell ?? true; |
c5d5603
into
release/v0.9.0-preview.0-pr-10661
This PR automatically cherry-picks commit 467a305 to patch version v0.9.0-preview.0 in the preview release to create version 0.9.0-preview.1.