From 01e66bb12392c3e8cd0222dc495c8dc61ebe4fba Mon Sep 17 00:00:00 2001 From: Harold Mciver Date: Wed, 16 Jul 2025 21:46:35 -0400 Subject: update `/bug` to new slash command arch (#4246) Co-authored-by: Abhi Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com> --- packages/cli/src/services/CommandService.test.ts | 8 +++++++- packages/cli/src/services/CommandService.ts | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'packages/cli/src/services') diff --git a/packages/cli/src/services/CommandService.test.ts b/packages/cli/src/services/CommandService.test.ts index b94e265b..8f5b1421 100644 --- a/packages/cli/src/services/CommandService.test.ts +++ b/packages/cli/src/services/CommandService.test.ts @@ -24,6 +24,7 @@ import { toolsCommand } from '../ui/commands/toolsCommand.js'; 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'; // Mock the command modules to isolate the service from the command implementations. vi.mock('../ui/commands/memoryCommand.js', () => ({ @@ -71,9 +72,12 @@ vi.mock('../ui/commands/mcpCommand.js', () => ({ vi.mock('../ui/commands/editorCommand.js', () => ({ editorCommand: { name: 'editor', description: 'Mock Editor' }, })); +vi.mock('../ui/commands/bugCommand.js', () => ({ + bugCommand: { name: 'bug', description: 'Mock Bug' }, +})); describe('CommandService', () => { - const subCommandLen = 15; + const subCommandLen = 16; let mockConfig: Mocked; beforeEach(() => { @@ -110,6 +114,7 @@ describe('CommandService', () => { const commandNames = tree.map((cmd) => cmd.name); expect(commandNames).toContain('auth'); + expect(commandNames).toContain('bug'); expect(commandNames).toContain('memory'); expect(commandNames).toContain('help'); expect(commandNames).toContain('clear'); @@ -167,6 +172,7 @@ describe('CommandService', () => { expect(loadedTree).toEqual([ aboutCommand, authCommand, + bugCommand, chatCommand, clearCommand, compressCommand, diff --git a/packages/cli/src/services/CommandService.ts b/packages/cli/src/services/CommandService.ts index acd73dd9..31914556 100644 --- a/packages/cli/src/services/CommandService.ts +++ b/packages/cli/src/services/CommandService.ts @@ -22,6 +22,7 @@ import { extensionsCommand } from '../ui/commands/extensionsCommand.js'; 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'; const loadBuiltInCommands = async ( config: Config | null, @@ -29,6 +30,7 @@ const loadBuiltInCommands = async ( const allCommands = [ aboutCommand, authCommand, + bugCommand, chatCommand, clearCommand, compressCommand, -- cgit v1.2.3