mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 12:34:38 -07:00
feat(cli): enhance tool confirmation UI and selection layout (#24376)
This commit is contained in:
@@ -70,7 +70,7 @@ describe('ToolConfirmationQueue', () => {
|
||||
const confirmingTool = {
|
||||
tool: {
|
||||
callId: 'call-1',
|
||||
name: 'ls',
|
||||
name: 'run_shell_command',
|
||||
description: 'list files',
|
||||
status: CoreToolCallStatus.AwaitingApproval,
|
||||
confirmationDetails: {
|
||||
@@ -98,15 +98,12 @@ describe('ToolConfirmationQueue', () => {
|
||||
);
|
||||
|
||||
const output = lastFrame();
|
||||
expect(output).toContain('Action Required');
|
||||
expect(output).toContain('1 of 3');
|
||||
expect(output).toContain('ls'); // Tool name
|
||||
expect(output).toContain('list files'); // Tool description
|
||||
expect(output).toContain("Allow execution of: 'ls'?");
|
||||
expect(output).toContain('Allow execution of [ls]?');
|
||||
expect(output).toMatchSnapshot();
|
||||
|
||||
const stickyHeaderProps = vi.mocked(StickyHeader).mock.calls[0][0];
|
||||
expect(stickyHeaderProps.borderColor).toBe(theme.status.warning);
|
||||
unmount();
|
||||
});
|
||||
|
||||
@@ -183,7 +180,7 @@ describe('ToolConfirmationQueue', () => {
|
||||
// availableContentHeight = Math.max(9 - 6, 4) = 4
|
||||
// MaxSizedBox in ToolConfirmationMessage will use 4
|
||||
// It should show truncation message
|
||||
await waitFor(() => expect(lastFrame()).toContain('49 hidden (Ctrl+O)'));
|
||||
await waitFor(() => expect(lastFrame()).toContain('48 hidden (Ctrl+O)'));
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user