diff options
| author | Shreya Keshive <[email protected]> | 2025-08-19 10:24:58 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-19 17:24:58 +0000 |
| commit | 9588aa6ef971918b8acfeefdad4f6a33f93349cf (patch) | |
| tree | b72ff1f169eb88b832059cd824c58c132463771e /packages/cli/src/ui/commands/ideCommand.ts | |
| parent | fde5511c270ace148c6328b03fa61d917850f6d3 (diff) | |
feat: Show /ide subcommands based on connection status instead of ideMode boolean (#6496)
Diffstat (limited to 'packages/cli/src/ui/commands/ideCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/ideCommand.ts | 12 |
1 files changed, 5 insertions, 7 deletions
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, |
