diff options
Diffstat (limited to 'packages/cli/src/services')
| -rw-r--r-- | packages/cli/src/services/CommandService.test.ts | 8 | ||||
| -rw-r--r-- | packages/cli/src/services/CommandService.ts | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/cli/src/services/CommandService.test.ts b/packages/cli/src/services/CommandService.test.ts index 8f5b1421..084f603b 100644 --- a/packages/cli/src/services/CommandService.test.ts +++ b/packages/cli/src/services/CommandService.test.ts @@ -25,6 +25,7 @@ import { compressCommand } from '../ui/commands/compressCommand.js'; import { mcpCommand } from '../ui/commands/mcpCommand.js'; import { editorCommand } from '../ui/commands/editorCommand.js'; import { bugCommand } from '../ui/commands/bugCommand.js'; +import { quitCommand } from '../ui/commands/quitCommand.js'; // Mock the command modules to isolate the service from the command implementations. vi.mock('../ui/commands/memoryCommand.js', () => ({ @@ -75,9 +76,12 @@ vi.mock('../ui/commands/editorCommand.js', () => ({ vi.mock('../ui/commands/bugCommand.js', () => ({ bugCommand: { name: 'bug', description: 'Mock Bug' }, })); +vi.mock('../ui/commands/quitCommand.js', () => ({ + quitCommand: { name: 'quit', description: 'Mock Quit' }, +})); describe('CommandService', () => { - const subCommandLen = 16; + const subCommandLen = 17; let mockConfig: Mocked<Config>; beforeEach(() => { @@ -144,6 +148,7 @@ describe('CommandService', () => { const commandNames = tree.map((cmd) => cmd.name); expect(commandNames).toContain('ide'); expect(commandNames).toContain('editor'); + expect(commandNames).toContain('quit'); }); it('should overwrite any existing commands when called again', async () => { @@ -183,6 +188,7 @@ describe('CommandService', () => { mcpCommand, memoryCommand, privacyCommand, + quitCommand, statsCommand, themeCommand, toolsCommand, diff --git a/packages/cli/src/services/CommandService.ts b/packages/cli/src/services/CommandService.ts index 31914556..773f5b31 100644 --- a/packages/cli/src/services/CommandService.ts +++ b/packages/cli/src/services/CommandService.ts @@ -23,6 +23,7 @@ import { toolsCommand } from '../ui/commands/toolsCommand.js'; import { compressCommand } from '../ui/commands/compressCommand.js'; import { ideCommand } from '../ui/commands/ideCommand.js'; import { bugCommand } from '../ui/commands/bugCommand.js'; +import { quitCommand } from '../ui/commands/quitCommand.js'; const loadBuiltInCommands = async ( config: Config | null, @@ -42,6 +43,7 @@ const loadBuiltInCommands = async ( mcpCommand, memoryCommand, privacyCommand, + quitCommand, statsCommand, themeCommand, toolsCommand, |
