mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 21:32:56 -07:00
feat: Implement background shell commands (#14849)
This commit is contained in:
@@ -15,8 +15,14 @@ import type { TextBuffer } from './shared/text-buffer.js';
|
||||
|
||||
// Mock child components to simplify testing
|
||||
vi.mock('./ContextSummaryDisplay.js', () => ({
|
||||
ContextSummaryDisplay: (props: { skillCount: number }) => (
|
||||
<Text>Mock Context Summary Display (Skills: {props.skillCount})</Text>
|
||||
ContextSummaryDisplay: (props: {
|
||||
skillCount: number;
|
||||
backgroundProcessCount: number;
|
||||
}) => (
|
||||
<Text>
|
||||
Mock Context Summary Display (Skills: {props.skillCount}, Shells:{' '}
|
||||
{props.backgroundProcessCount})
|
||||
</Text>
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -41,6 +47,7 @@ const createMockUIState = (overrides: UIStateOverrides = {}): UIState =>
|
||||
ideContextState: null,
|
||||
geminiMdFileCount: 0,
|
||||
contextFileNames: [],
|
||||
backgroundShellCount: 0,
|
||||
buffer: { text: '' },
|
||||
history: [{ id: 1, type: 'user', text: 'test' }],
|
||||
...overrides,
|
||||
@@ -227,4 +234,15 @@ describe('StatusDisplay', () => {
|
||||
);
|
||||
expect(lastFrame()).toBe('');
|
||||
});
|
||||
|
||||
it('passes backgroundShellCount to ContextSummaryDisplay', () => {
|
||||
const uiState = createMockUIState({
|
||||
backgroundShellCount: 3,
|
||||
});
|
||||
const { lastFrame } = renderStatusDisplay(
|
||||
{ hideContextSummary: false },
|
||||
uiState,
|
||||
);
|
||||
expect(lastFrame()).toContain('Shells: 3');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user