From f9ccbb91c5d8c6aa28f0d93c7a6b4eff9ca2063c Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 28 Aug 2025 20:18:16 -0700 Subject: [PATCH] fix: improved /help slash command --- extensions/cli/src/slashCommands.ts | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/extensions/cli/src/slashCommands.ts b/extensions/cli/src/slashCommands.ts index ce25b0091..111b49a46 100644 --- a/extensions/cli/src/slashCommands.ts +++ b/extensions/cli/src/slashCommands.ts @@ -18,16 +18,25 @@ type CommandHandler = ( assistant: AssistantConfig, ) => Promise | SlashCommandResult; -async function handleHelp(args: string[], assistant: AssistantConfig) { - const allCommands = getAllSlashCommands(assistant); +async function handleHelp() { const helpMessage = [ - "Slash commands:", - ...allCommands - .sort((a, b) => a.name.localeCompare(b.name)) - .map( - (cmd) => - `- ${chalk.white(`/${cmd.name}:`)} ${chalk.gray(cmd.description)}`, - ), + chalk.bold("Keyboard Shortcuts:"), + "", + chalk.white("Navigation:"), + ` ${chalk.cyan("↑/↓")} Navigate previous messages`, + ` ${chalk.cyan("Enter")} Submit message`, + ` ${chalk.cyan("\\+Enter")} New line`, + "", + chalk.white("Controls:"), + ` ${chalk.cyan("Ctrl+C")} Clear input`, + ` ${chalk.cyan("Ctrl+D")} Exit application`, + ` ${chalk.cyan("Shift+Tab")} Cycle modes`, + ` ${chalk.cyan("Esc")} Interrupt`, + "", + chalk.white("Special Characters:"), + ` ${chalk.cyan("@")} Attach files`, + ` ${chalk.cyan("/")} Slash commands`, + "", ].join("\n"); posthogService.capture("useSlashCommand", { name: "help" }); return { output: helpMessage };