From 19bdc441d6c928aa8c63a3718a469b4d750bd9d4 Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Tue, 29 Apr 2025 22:48:40 +0000 Subject: [PATCH] Add /help --- .../cli/src/ui/hooks/slashCommandProcessor.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 852f64ce..400597e3 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -41,6 +41,21 @@ export const useSlashCommandProcessor = ( setHistory((_) => []); }, }, + { + name: 'help', + description: '/help for help on gemini-code', + action: (_value: PartListUnion) => { + const helpText = + 'I am an interactive CLI tool assistant designed to ' + + 'help with software engineering tasks. I can use tools to read ' + + 'and write files, search code, execute bash commands, and more ' + + 'to assist with development workflows. I will explain commands ' + + 'and ask for permission before running them and will not ' + + 'commit changes unless explicitly instructed.'; + const timestamp = getNextMessageId(Date.now()); + addHistoryItem(setHistory, { type: 'info', text: helpText }, timestamp); + }, + }, { name: 'exit', description: 'Exit gemini-code',