From ab9eb9377fdfe7823be8ea0c7c394c5368b28951 Mon Sep 17 00:00:00 2001 From: Shreya Keshive Date: Wed, 16 Jul 2025 18:36:14 -0400 Subject: Add /ide status & /ide install commands to manage IDE integration (#4265) --- .../cli/src/ui/hooks/slashCommandProcessor.test.ts | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.test.ts') diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts index 2d7a8ffd..399a923b 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts @@ -153,6 +153,7 @@ describe('useSlashCommandProcessor', () => { getCheckpointingEnabled: vi.fn(() => true), getBugCommand: vi.fn(() => undefined), getSessionId: vi.fn(() => 'test-session-id'), + getIdeMode: vi.fn(() => false), } as unknown as Config; mockCorgiMode = vi.fn(); mockUseSessionStats.mockReturnValue({ @@ -237,7 +238,10 @@ describe('useSlashCommandProcessor', () => { const mockLoader = async () => [newCommand]; // We create the instance outside the mock implementation. - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); // This mock ensures the hook uses our pre-configured instance. vi.mocked(CommandService).mockImplementation( @@ -271,7 +275,10 @@ describe('useSlashCommandProcessor', () => { }); const newCommand: SlashCommand = { name: 'test', action: mockAction }; const mockLoader = async () => [newCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); @@ -301,7 +308,10 @@ describe('useSlashCommandProcessor', () => { }); const newCommand: SlashCommand = { name: 'test', action: mockAction }; const mockLoader = async () => [newCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); @@ -333,7 +343,10 @@ describe('useSlashCommandProcessor', () => { }); const newCommand: SlashCommand = { name: 'test', action: mockAction }; const mockLoader = async () => [newCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); @@ -360,7 +373,10 @@ describe('useSlashCommandProcessor', () => { const newAuthCommand: SlashCommand = { name: 'auth', action: mockAction }; const mockLoader = async () => [newAuthCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); @@ -386,7 +402,10 @@ describe('useSlashCommandProcessor', () => { }); const newCommand: SlashCommand = { name: 'test', action: mockAction }; const mockLoader = async () => [newCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); @@ -414,7 +433,10 @@ describe('useSlashCommandProcessor', () => { }; const mockLoader = async () => [parentCommand]; - const commandServiceInstance = new ActualCommandService(mockLoader); + const commandServiceInstance = new ActualCommandService( + mockConfig, + mockLoader, + ); vi.mocked(CommandService).mockImplementation( () => commandServiceInstance, ); -- cgit v1.2.3