From 9588aa6ef971918b8acfeefdad4f6a33f93349cf Mon Sep 17 00:00:00 2001 From: Shreya Keshive Date: Tue, 19 Aug 2025 10:24:58 -0700 Subject: feat: Show /ide subcommands based on connection status instead of ideMode boolean (#6496) --- packages/cli/src/ui/commands/ideCommand.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'packages/cli/src/ui/commands/ideCommand.ts') diff --git a/packages/cli/src/ui/commands/ideCommand.ts b/packages/cli/src/ui/commands/ideCommand.ts index b7cbea3d..49766b8d 100644 --- a/packages/cli/src/ui/commands/ideCommand.ts +++ b/packages/cli/src/ui/commands/ideCommand.ts @@ -237,13 +237,11 @@ export const ideCommand = (config: Config | null): SlashCommand | null => { }, }; - const ideModeEnabled = config.getIdeMode(); - if (ideModeEnabled) { - ideSlashCommand.subCommands = [ - disableCommand, - statusCommand, - installCommand, - ]; + const { status } = ideClient.getConnectionStatus(); + const isConnected = status === IDEConnectionStatus.Connected; + + if (isConnected) { + ideSlashCommand.subCommands = [statusCommand, disableCommand]; } else { ideSlashCommand.subCommands = [ enableCommand, -- cgit v1.2.3