summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/commands
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/commands')
-rw-r--r--packages/cli/src/ui/commands/ideCommand.test.ts11
-rw-r--r--packages/cli/src/ui/commands/ideCommand.ts2
2 files changed, 4 insertions, 9 deletions
diff --git a/packages/cli/src/ui/commands/ideCommand.test.ts b/packages/cli/src/ui/commands/ideCommand.test.ts
index 10a97e2a..8576320b 100644
--- a/packages/cli/src/ui/commands/ideCommand.test.ts
+++ b/packages/cli/src/ui/commands/ideCommand.test.ts
@@ -40,7 +40,6 @@ describe('ideCommand', () => {
} as unknown as CommandContext;
mockConfig = {
- getIdeModeFeature: vi.fn(),
getIdeMode: vi.fn(),
getIdeClient: vi.fn(() => ({
reconnect: vi.fn(),
@@ -60,14 +59,12 @@ describe('ideCommand', () => {
vi.restoreAllMocks();
});
- it('should return null if ideModeFeature is not enabled', () => {
- vi.mocked(mockConfig.getIdeModeFeature).mockReturnValue(false);
- const command = ideCommand(mockConfig);
+ it('should return null if config is not provided', () => {
+ const command = ideCommand(null);
expect(command).toBeNull();
});
- it('should return the ide command if ideModeFeature is enabled', () => {
- vi.mocked(mockConfig.getIdeModeFeature).mockReturnValue(true);
+ it('should return the ide command', () => {
vi.mocked(mockConfig.getIdeMode).mockReturnValue(true);
vi.mocked(mockConfig.getIdeClient).mockReturnValue({
getCurrentIde: () => DetectedIde.VSCode,
@@ -85,7 +82,6 @@ describe('ideCommand', () => {
describe('status subcommand', () => {
const mockGetConnectionStatus = vi.fn();
beforeEach(() => {
- vi.mocked(mockConfig.getIdeModeFeature).mockReturnValue(true);
vi.mocked(mockConfig.getIdeClient).mockReturnValue({
getConnectionStatus: mockGetConnectionStatus,
getCurrentIde: () => DetectedIde.VSCode,
@@ -162,7 +158,6 @@ describe('ideCommand', () => {
describe('install subcommand', () => {
const mockInstall = vi.fn();
beforeEach(() => {
- vi.mocked(mockConfig.getIdeModeFeature).mockReturnValue(true);
vi.mocked(mockConfig.getIdeMode).mockReturnValue(true);
vi.mocked(mockConfig.getIdeClient).mockReturnValue({
getCurrentIde: () => DetectedIde.VSCode,
diff --git a/packages/cli/src/ui/commands/ideCommand.ts b/packages/cli/src/ui/commands/ideCommand.ts
index 23af2e48..2dfad33c 100644
--- a/packages/cli/src/ui/commands/ideCommand.ts
+++ b/packages/cli/src/ui/commands/ideCommand.ts
@@ -115,7 +115,7 @@ async function getIdeStatusMessageWithFiles(ideClient: IdeClient): Promise<{
}
export const ideCommand = (config: Config | null): SlashCommand | null => {
- if (!config || !config.getIdeModeFeature()) {
+ if (!config) {
return null;
}
const ideClient = config.getIdeClient();