mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-06 11:21:15 -07:00
feat(ui): Show waiting MCP servers in ConfigInitDisplay (#13721)
This commit is contained in:
@@ -21,12 +21,28 @@ export const ConfigInitDisplay = () => {
|
||||
return;
|
||||
}
|
||||
let connected = 0;
|
||||
for (const client of clients.values()) {
|
||||
const connecting: string[] = [];
|
||||
for (const [name, client] of clients.entries()) {
|
||||
if (client.getStatus() === MCPServerStatus.CONNECTED) {
|
||||
connected++;
|
||||
} else {
|
||||
connecting.push(name);
|
||||
}
|
||||
}
|
||||
setMessage(`Connecting to MCP servers... (${connected}/${clients.size})`);
|
||||
|
||||
if (connecting.length > 0) {
|
||||
const maxDisplay = 3;
|
||||
const displayedServers = connecting.slice(0, maxDisplay).join(', ');
|
||||
const remaining = connecting.length - maxDisplay;
|
||||
const suffix = remaining > 0 ? `, +${remaining} more` : '';
|
||||
setMessage(
|
||||
`Connecting to MCP servers... (${connected}/${clients.size}) - Waiting for: ${displayedServers}${suffix}`,
|
||||
);
|
||||
} else {
|
||||
setMessage(
|
||||
`Connecting to MCP servers... (${connected}/${clients.size})`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
appEvents.on(AppEvent.McpClientUpdate, onChange);
|
||||
|
||||
Reference in New Issue
Block a user