fix(patch): cherry-pick 12a5490 to release/v0.26.0-preview.3-pr-17395 [CONFLICTS]#17424
Conversation
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/core/src/tools/mcp-client-manager.ts
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 integrates a new mechanism for handling user input during the initialization of Multi-Client Proxy (MCP) servers. It introduces a dedicated React hook to track MCP readiness and modifies the application's query submission flow to queue user prompts when MCP is not yet ready, improving the user experience by preventing blocked inputs and providing clear feedback. Slash commands, however, remain immediately executable. 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
|
There was a problem hiding this comment.
Code Review
This pull request cherry-picks a commit to allow prompt queueing during MCP initialization. The changes refactor the MCP status handling into a new useMcpStatus hook and update useMessageQueue to hold prompts until MCP is ready. This is a good improvement. However, the cherry-pick has resulted in several merge conflicts that have been committed with conflict markers. These must be resolved before merging. I've left comments on the locations of the conflicts.
| <<<<<<< HEAD | ||
| import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js'; | ||
| ======= | ||
| import { useMcpStatus } from './hooks/useMcpStatus.js'; | ||
| import { useApprovalModeIndicator } from './hooks/useApprovalModeIndicator.js'; | ||
| >>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395)) |
There was a problem hiding this comment.
There are unresolved merge conflict markers in this file. Please resolve them. It seems like you need to decide which imports to keep. useMcpStatus is needed for the new MCP readiness logic, and it seems like useAutoAcceptIndicator from HEAD and useApprovalModeIndicator from the cherry-picked commit might be related or one replaces the other. Please investigate and resolve.
| <<<<<<< HEAD | ||
| import { useInactivityTimer } from './hooks/useInactivityTimer.js'; | ||
| ======= | ||
| import { isSlashCommand } from './utils/commandUtils.js'; | ||
| >>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395)) |
| <<<<<<< HEAD | ||
| ======= | ||
| if (Object.keys(servers).length === 0) { | ||
| this.discoveryState = MCPDiscoveryState.COMPLETED; | ||
| this.eventEmitter?.emit('mcp-client-update', this.clients); | ||
| return; | ||
| } | ||
|
|
||
| // Set state synchronously before any await yields control | ||
| if (!this.discoveryPromise) { | ||
| this.discoveryState = MCPDiscoveryState.IN_PROGRESS; | ||
| } | ||
|
|
||
| >>>>>>> 12a5490bc (Allow prompt queueing during MCP initialization (#17395)) |
There was a problem hiding this comment.
This file contains merge conflict markers that need to be resolved. The logic from the cherry-picked commit seems to handle cases where no MCP servers are configured and sets the discovery state synchronously, which appears to be important for the new prompt queueing feature. Please resolve the conflict, likely by keeping the new logic.
|
Size Change: +1.68 kB (+0.01%) Total Size: 23.2 MB
ℹ️ View Unchanged
|
| return; | ||
| } | ||
|
|
||
| // Set state synchronously before any await yields control |
There was a problem hiding this comment.
Lines below seem to be a part of this PR #16299, I'll go ahead and remove it
There was a problem hiding this comment.
You are correct. This PR is a cherry-pick of changes that were originally introduced in #16299. The purpose of this cherry-pick is to apply those changes to the release/v0.26.0-preview.3-pr-17395 branch, which is a common practice for backporting fixes or features to release branches.
This PR automatically cherry-picks commit 12a5490 to patch version v0.26.0-preview.3 in the preview release to create version 0.26.0-preview.4.
This cherry-pick resulted in merge conflicts that need manual resolution.
🔧 Next Steps:
📋 Files with conflicts:
The commit has been created with conflict markers for easier manual resolution.
🚨 Important: