mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
fix(core): complete MCP discovery when configured servers are skipped (#18586)
Co-authored-by: christine betts <chrstn@uw.edu> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -337,6 +337,15 @@ export class McpClientManager {
|
||||
this.maybeDiscoverMcpServer(name, config),
|
||||
),
|
||||
);
|
||||
|
||||
// If every configured server was skipped (for example because all are
|
||||
// disabled by user settings), no discovery promise is created. In that
|
||||
// case we must still mark discovery complete or the UI will wait forever.
|
||||
if (this.discoveryState === MCPDiscoveryState.IN_PROGRESS) {
|
||||
this.discoveryState = MCPDiscoveryState.COMPLETED;
|
||||
this.eventEmitter?.emit('mcp-client-update', this.clients);
|
||||
}
|
||||
|
||||
await this.cliConfig.refreshMcpContext();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user