From 99a6dc026708d91bb628873a769c615640a2c0ea Mon Sep 17 00:00:00 2001 From: Billy Biggs Date: Sat, 21 Jun 2025 12:15:43 -0700 Subject: Update memory and context summary UI for multiple context filenames (#1282) --- .../cli/src/ui/hooks/slashCommandProcessor.test.ts | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 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 03f8cc9c..31105509 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts @@ -62,14 +62,15 @@ import { } from './slashCommandProcessor.js'; import { MessageType } from '../types.js'; import { - type Config, - MCPServerStatus, - getMCPServerStatus, + Config, MCPDiscoveryState, + MCPServerStatus, getMCPDiscoveryState, + getMCPServerStatus, GeminiClient, } from '@gemini-cli/core'; import { useSessionStats } from '../contexts/SessionContext.js'; +import { LoadedSettings } from '../../config/settings.js'; vi.mock('@gemini-code/core', async (importOriginal) => { const actual = await importOriginal(); @@ -161,10 +162,16 @@ describe('useSlashCommandProcessor', () => { process.env = { ...globalThis.process.env }; }); - const getProcessorHook = (showToolDescriptions: boolean = false) => - renderHook(() => + const getProcessorHook = (showToolDescriptions: boolean = false) => { + const settings = { + merged: { + contextFileName: 'GEMINI.md', + }, + } as LoadedSettings; + return renderHook(() => useSlashCommandProcessor( mockConfig, + settings, [], mockAddItem, mockClearItems, @@ -181,6 +188,7 @@ describe('useSlashCommandProcessor', () => { mockSetQuittingMessages, ), ); + }; const getProcessor = (showToolDescriptions: boolean = false) => getProcessorHook(showToolDescriptions).result.current; @@ -253,7 +261,11 @@ describe('useSlashCommandProcessor', () => { }); expect( ShowMemoryCommandModule.createShowMemoryAction, - ).toHaveBeenCalledWith(mockConfig, expect.any(Function)); + ).toHaveBeenCalledWith( + mockConfig, + expect.any(Object), + expect.any(Function), + ); expect(mockReturnedShowAction).toHaveBeenCalled(); expect(commandResult).toBe(true); }); -- cgit v1.2.3