fix(patch): cherry-pick 07e2053 to release/v0.36.0-preview.7-pr-24282#24426
Conversation
# Conflicts: # docs/cli/settings.md
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 promotes the planning feature from an experimental status to a stable feature. It involves restructuring the configuration settings to move the plan mode toggle under the general settings category, ensuring proper migration of existing user settings, and updating all relevant documentation, tests, and UI components to support this change. Highlights
Ignored Files
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
|
|
Size Change: +693 B (0%) Total Size: 26.3 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request promotes the 'Plan Mode' feature to stable by migrating its configuration from experimental.plan to general.plan.enabled. The changes encompass updates to documentation, configuration schemas, migration logic, and associated tests. Review feedback identifies two high-severity issues: unresolved merge conflict markers in the settings documentation and a bug in the experimental settings migration logic that could cause data loss by unintentionally clearing agent overrides.
I am having trouble creating individual review comments. Click here to see my feedback.
docs/cli/settings.md (32-39)
The file contains unresolved merge conflict markers. These must be resolved before the pull request can be merged. The incoming changes (from the feature branch) appear to contain the desired updates for the planning feature promotion.
| Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. | `false` |
| Enable Plan Mode | `general.plan.enabled` | Enable Plan Mode for read-only safety during planning. | `true` |
| Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode. | `undefined` |
packages/cli/src/config/settings.ts (1219-1220)
This logic is problematic because the modified flag is shared across all experimental migrations. Since modified is now also set when the plan setting is migrated, this agents update will run even if no agent-related settings were changed.
If agentsOverrides is empty (which happens if no agent experimental settings are found), this assignment will overwrite and clear any existing agents.overrides in the user's configuration, leading to data loss.
Per the general rules, you should use a merge operation (spread syntax) instead of direct assignment, and the update should be guarded to only occur if agent-specific changes were actually made.
if (Object.keys(agentsOverrides).length > 0) {
agentsSettings['overrides'] = {
...((agentsSettings['overrides'] as Record<string, unknown>) || {}),
...agentsOverrides,
};
loadedSettings.setValue(scope, 'agents', agentsSettings);
}|
turns out preview release has not been cut yet, so just stopping this patch |
Pull request was closed
This PR cherry-picks commit 07e2053 to patch version v0.36.0-preview.7 in the preview release to create version 0.36.0-preview.8. This ensures that the planning feature improvements are included in the upcoming preview release.