summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
diff options
context:
space:
mode:
authorShreya Keshive <[email protected]>2025-07-16 18:36:14 -0400
committerGitHub <[email protected]>2025-07-16 22:36:14 +0000
commitab9eb9377fdfe7823be8ea0c7c394c5368b28951 (patch)
treead7f0ebf45902513d129d4eb09897a5345cad195 /packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
parent69a8ae6a89918f4255304975f8653ff808264bc8 (diff)
Add /ide status & /ide install commands to manage IDE integration (#4265)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.test.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.test.ts36
1 files changed, 29 insertions, 7 deletions
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,
);