From fd58d3267ed50d25bb068678376dddf86aa007d8 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Mon, 23 Jun 2025 22:35:23 +0100 Subject: feat: Open MCP docs if no MCPs are configured (#1325) --- packages/cli/src/ui/hooks/slashCommandProcessor.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts') diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 2bc84a10..397c6e3c 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -291,11 +291,21 @@ export const useSlashCommandProcessor = ( const serverNames = Object.keys(mcpServers); if (serverNames.length === 0) { - addMessage({ - type: MessageType.INFO, - content: 'No MCP servers configured.', - timestamp: new Date(), - }); + const docsUrl = 'https://goo.gle/gemini-cli-docs-mcp'; + if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') { + addMessage({ + type: MessageType.INFO, + content: `No MCP servers configured. Please open the following URL in your browser to view documentation:\n${docsUrl}`, + timestamp: new Date(), + }); + } else { + addMessage({ + type: MessageType.INFO, + content: `No MCP servers configured. Opening documentation in your browser: ${docsUrl}`, + timestamp: new Date(), + }); + await open(docsUrl); + } return; } -- cgit v1.2.3