diff options
| author | Mo Moadeli <[email protected]> | 2025-08-04 17:20:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-04 21:20:49 +0000 |
| commit | e7b468e122a29341a6e2e2ca67366e6d62014a6d (patch) | |
| tree | ded9f3730d8d66219a0e6a88711e3211b54ae26e /packages/cli/src/ui/commands/mcpCommand.ts | |
| parent | dca040908affc6277884514b4c726365359fd10b (diff) | |
feat(cli): Prevent redundant opening of browser tabs when zero MCP servers are configured (#5367)
Co-authored-by: Allen Hutchison <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/commands/mcpCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/mcpCommand.ts | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/packages/cli/src/ui/commands/mcpCommand.ts b/packages/cli/src/ui/commands/mcpCommand.ts index 709053b6..dc5442cc 100644 --- a/packages/cli/src/ui/commands/mcpCommand.ts +++ b/packages/cli/src/ui/commands/mcpCommand.ts @@ -21,7 +21,6 @@ import { mcpServerRequiresOAuth, getErrorMessage, } from '@google/gemini-cli-core'; -import open from 'open'; const COLOR_GREEN = '\u001b[32m'; const COLOR_YELLOW = '\u001b[33m'; @@ -60,21 +59,11 @@ const getMcpStatus = async ( if (serverNames.length === 0 && blockedMcpServers.length === 0) { const docsUrl = 'https://goo.gle/gemini-cli-docs-mcp'; - if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') { - return { - type: 'message', - messageType: 'info', - content: `No MCP servers configured. Please open the following URL in your browser to view documentation:\n${docsUrl}`, - }; - } else { - // Open the URL in the browser - await open(docsUrl); - return { - type: 'message', - messageType: 'info', - content: `No MCP servers configured. Opening documentation in your browser: ${docsUrl}`, - }; - } + return { + type: 'message', + messageType: 'info', + content: `No MCP servers configured. Please view MCP documentation in your browser: ${docsUrl} or use the cli /docs command`, + }; } // Check if any servers are still connecting |
