From cb76b08e31630d41c006323e8de211d7f14aaebd Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Sun, 22 Jun 2025 16:54:10 +0100 Subject: feat: Add /docs command and update UI (#1297) --- packages/cli/src/ui/hooks/slashCommandProcessor.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (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 66dfe213..c78859bc 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -182,6 +182,28 @@ export const useSlashCommandProcessor = ( setShowHelp(true); }, }, + { + name: 'docs', + description: 'open full Gemini CLI documentation in your browser', + action: async (_mainCommand, _subCommand, _args) => { + const docsUrl = + 'https://github.com/google-gemini/gemini-cli/blob/main/docs/index.md'; + if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') { + addMessage({ + type: MessageType.INFO, + content: `Please open the following URL in your browser to view the documentation:\n${docsUrl}`, + timestamp: new Date(), + }); + } else { + addMessage({ + type: MessageType.INFO, + content: `Opening documentation in your browser: ${docsUrl}`, + timestamp: new Date(), + }); + await open(docsUrl); + } + }, + }, { name: 'clear', description: 'clear the screen and conversation history', -- cgit v1.2.3