From 003609239fe81c8a2920ed0c63b7f5142bb4f7e5 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Fri, 18 Jul 2025 15:38:04 -0700 Subject: Add /background commands (when background agent is configured) (#4407) Co-authored-by: Bryan Morgan --- packages/cli/src/services/CommandService.test.ts | 1 + packages/cli/src/services/CommandService.ts | 2 ++ 2 files changed, 3 insertions(+) (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 d03bf988..5945e3f6 100644 --- a/packages/cli/src/services/CommandService.test.ts +++ b/packages/cli/src/services/CommandService.test.ts @@ -96,6 +96,7 @@ describe('CommandService', () => { mockConfig = { getIdeMode: vi.fn(), getCheckpointingEnabled: vi.fn(), + getBackgroundAgentManager: vi.fn(), } as unknown as Mocked; vi.mocked(ideCommand).mockReturnValue(null); vi.mocked(restoreCommand).mockReturnValue(null); diff --git a/packages/cli/src/services/CommandService.ts b/packages/cli/src/services/CommandService.ts index def8cfcc..9db4e9e6 100644 --- a/packages/cli/src/services/CommandService.ts +++ b/packages/cli/src/services/CommandService.ts @@ -7,6 +7,7 @@ import { Config } from '@google/gemini-cli-core'; import { SlashCommand } from '../ui/commands/types.js'; import { memoryCommand } from '../ui/commands/memoryCommand.js'; +import { backgroundCommand } from '../ui/commands/backgroundCommand.js'; import { helpCommand } from '../ui/commands/helpCommand.js'; import { clearCommand } from '../ui/commands/clearCommand.js'; import { corgiCommand } from '../ui/commands/corgiCommand.js'; @@ -33,6 +34,7 @@ const loadBuiltInCommands = async ( const allCommands = [ aboutCommand, authCommand, + backgroundCommand(config), bugCommand, chatCommand, clearCommand, -- cgit v1.2.3