Allow for slash commands to opt-out of autocompletion and /help discovery. (#7847)

This commit is contained in:
DeWitt Clinton
2025-09-06 14:16:58 -07:00
committed by GitHub
parent c031f538df
commit 6b4c12eb04
8 changed files with 103 additions and 59 deletions

View File

@@ -65,7 +65,7 @@ export const Help: React.FC<Help> = ({ commands }) => (
Commands:
</Text>
{commands
.filter((command) => command.description)
.filter((command) => command.description && !command.hidden)
.map((command: SlashCommand) => (
<Box key={command.name} flexDirection="column">
<Text color={Colors.Foreground}>
@@ -79,15 +79,17 @@ export const Help: React.FC<Help> = ({ commands }) => (
{command.description && ' - ' + command.description}
</Text>
{command.subCommands &&
command.subCommands.map((subCommand) => (
<Text key={subCommand.name} color={Colors.Foreground}>
<Text bold color={Colors.AccentPurple}>
{' '}
{subCommand.name}
command.subCommands
.filter((subCommand) => !subCommand.hidden)
.map((subCommand) => (
<Text key={subCommand.name} color={Colors.Foreground}>
<Text bold color={Colors.AccentPurple}>
{' '}
{subCommand.name}
</Text>
{subCommand.description && ' - ' + subCommand.description}
</Text>
{subCommand.description && ' - ' + subCommand.description}
</Text>
))}
))}
</Box>
))}
<Text color={Colors.Foreground}>