summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/Help.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/components/Help.tsx')
-rw-r--r--packages/cli/src/ui/components/Help.tsx26
1 files changed, 19 insertions, 7 deletions
diff --git a/packages/cli/src/ui/components/Help.tsx b/packages/cli/src/ui/components/Help.tsx
index 3a3d7bd1..5a04514a 100644
--- a/packages/cli/src/ui/components/Help.tsx
+++ b/packages/cli/src/ui/components/Help.tsx
@@ -7,7 +7,7 @@
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
-import { SlashCommand } from '../hooks/slashCommandProcessor.js';
+import { SlashCommand } from '../commands/types.js';
interface Help {
commands: SlashCommand[];
@@ -67,13 +67,25 @@ export const Help: React.FC<Help> = ({ commands }) => (
{commands
.filter((command) => command.description)
.map((command: SlashCommand) => (
- <Text key={command.name} color={Colors.Foreground}>
- <Text bold color={Colors.AccentPurple}>
- {' '}
- /{command.name}
+ <Box key={command.name} flexDirection="column">
+ <Text color={Colors.Foreground}>
+ <Text bold color={Colors.AccentPurple}>
+ {' '}
+ /{command.name}
+ </Text>
+ {command.description && ' - ' + command.description}
</Text>
- {command.description && ' - ' + command.description}
- </Text>
+ {command.subCommands &&
+ command.subCommands.map((subCommand) => (
+ <Text key={subCommand.name} color={Colors.Foreground}>
+ <Text> </Text>
+ <Text bold color={Colors.AccentPurple}>
+ {subCommand.name}
+ </Text>
+ {subCommand.description && ' - ' + subCommand.description}
+ </Text>
+ ))}
+ </Box>
))}
<Text color={Colors.Foreground}>
<Text bold color={Colors.AccentPurple}>