Revert "Show /ide enable & /ide disable commands based on connection status" (#6486)
This commit is contained in:
parent
065eb7897d
commit
0215811c4c
|
@ -69,9 +69,6 @@ describe('ideCommand', () => {
|
|||
vi.mocked(mockConfig.getIdeClient).mockReturnValue({
|
||||
getCurrentIde: () => DetectedIde.VSCode,
|
||||
getDetectedIdeDisplayName: () => 'VS Code',
|
||||
getConnectionStatus: () => ({
|
||||
status: core.IDEConnectionStatus.Connected,
|
||||
}),
|
||||
} as ReturnType<Config['getIdeClient']>);
|
||||
const command = ideCommand(mockConfig);
|
||||
expect(command).not.toBeNull();
|
||||
|
@ -164,9 +161,7 @@ describe('ideCommand', () => {
|
|||
vi.mocked(mockConfig.getIdeMode).mockReturnValue(true);
|
||||
vi.mocked(mockConfig.getIdeClient).mockReturnValue({
|
||||
getCurrentIde: () => DetectedIde.VSCode,
|
||||
getConnectionStatus: () => ({
|
||||
status: core.IDEConnectionStatus.Disconnected,
|
||||
}),
|
||||
getConnectionStatus: vi.fn(),
|
||||
getDetectedIdeDisplayName: () => 'VS Code',
|
||||
} as unknown as ReturnType<Config['getIdeClient']>);
|
||||
vi.mocked(core.getIdeInstaller).mockReturnValue({
|
||||
|
|
|
@ -237,8 +237,8 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
|
|||
},
|
||||
};
|
||||
|
||||
const connectionStatus = ideClient.getConnectionStatus().status;
|
||||
if (connectionStatus === IDEConnectionStatus.Connected) {
|
||||
const ideModeEnabled = config.getIdeMode();
|
||||
if (ideModeEnabled) {
|
||||
ideSlashCommand.subCommands = [
|
||||
disableCommand,
|
||||
statusCommand,
|
||||
|
|
Loading…
Reference in New Issue