fix(cli): deduplicate startup extension warnings in terminal UI#23178
fix(cli): deduplicate startup extension warnings in terminal UI#23178moisgobg wants to merge 19 commits intofeat/builtin-conductorfrom
Conversation
- Introduce support for bundled 'builtin' extensions in ExtensionManager - Migrate conductor extension to packages/core/src/extensions/builtin/conductor - Add automatic migration logic to cleanup manual conductor installations - Make extension versioning optional for built-ins, defaulting to CLI version - Update build and bundle scripts to include builtin extensions - Enhance documentation to highlight conductor as a core feature
…on TOML commands (#22681)
This replaces the manual regex for ${extensionPath} with the standardized
hydrateString utility, automatically enabling support for other variables
like ${workspacePath} and ${/} in custom extension commands.
Added a test case to verify ${workspacePath} hydration.
- Renamed built-in extension 'Conductor' to 'Spec-Driven Development (SDD)'. - Updated commands from '/conductor:<action>' to '/spec <action>'. - Migrated default artifact storage from 'conductor/' to '.gemini/specs/'. - Updated documentation, security policies, and internal references. - Refactored FileCommandLoader to use standardized variable hydration. - Replaced automatic Conductor deletion with a non-destructive migration prompt. - Added step in setup to ensure .gemini/specs/ is exempted from .gitignore.
…rt package-lock.json
…t handling - Renamed 'Conductor' to 'Spec-Driven Development (SDD)'. - Migrated artifact storage to '.gemini/specs/'. - Updated commands to '/spec <action>'. - Added Plan Mode and SDD workflow notes to README. - Replaced automatic extension migration with a warning prompt to preserve user files. - Added .gitignore exemption for .gemini/specs/ in setup.
|
Hi @moisgobg, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
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 addresses two distinct areas: it resolves an issue causing redundant startup warnings in the CLI by introducing a deduplication set, and it undertakes a significant refactoring of the Spec-Driven Development (SDD) framework. The SDD refactor involves a comprehensive terminology update, replacing 'track' with 'spec' throughout its commands and policies, alongside implementing migration paths for older directory structures. 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 addresses the issue of duplicate startup extension warnings in the terminal UI by introducing a deduplication mechanism. It also updates terminology from "track" to "spec" and "conductor" to "sdd" across various configuration and documentation files within the SDD extension. The terminology changes improve consistency and reflect the updated naming conventions.
| import { themeManager } from '../ui/themes/theme-manager.js'; | ||
| import { getFormattedSettingValue } from '../commands/extensions/utils.js'; | ||
|
|
||
| const emittedWarnings = new Set<string>(); |
There was a problem hiding this comment.
The emittedWarnings Set is declared at the module level, making it a global state. While this effectively deduplicates warnings within a single process run, it introduces a dependency on the module's lifecycle. If the ExtensionManager were ever to be instantiated multiple times within a long-running process, or if the CLI supports distinct, isolated contexts where warnings should be unique per context, this global state could lead to unintended suppression of warnings or persistence of warnings across unrelated operations. Consider scoping emittedWarnings to the ExtensionManager instance (e.g., this.emittedWarnings = new Set<string>(); in the constructor) and ensuring proper lifecycle management (e.g., clearing it on re-initialization if applicable). This would improve modularity and prevent potential issues in more complex application scenarios.
There was a problem hiding this comment.
This is correct, the module-level state is generally an anti-pattern. This is a tactical hotfix to resolve the immediate UX issue for users. The proper architectural fix is tracked in #23171. Once that refactor is complete, this module-level state will be removed entirely.
This change introduces a module-level Set to deduplicate warning messages emitted by the ExtensionManager. This prevents identical warnings (like missing settings or built-in replacements) from being displayed twice due to loadCliConfig being invoked multiple times during startup. Fixes #23175 See also #23171 for the planned long-term refactor.
02e8892 to
6bc2f89
Compare
c0bf255 to
15bb451
Compare
15bb451 to
c879453
Compare
Background
During startup,
loadCliConfigis called twice (once for initial settings and again after auth/admin policy fetch). This leads toExtensionManagerbeing instantiated and loaded twice, causing duplicate warnings in the UI.Changes
Introduces a module-level
emittedWarningsSet inExtensionManager.tsto deduplicate identical warning strings within a single process run.Long-term solution
A full refactor to avoid double-loading extensions is tracked in #23171.
Fixes #23175