mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-10 01:50:20 -07:00
feat(cli): add setting to hide shortcuts hint UI (#18562)
This commit is contained in:
@@ -4296,6 +4296,30 @@ describe('InputPrompt', () => {
|
||||
});
|
||||
|
||||
describe('shortcuts help visibility', () => {
|
||||
it('opens shortcuts help with ? on empty prompt even when showShortcutsHint is false', async () => {
|
||||
const setShortcutsHelpVisible = vi.fn();
|
||||
const settings = createMockSettings({
|
||||
ui: { showShortcutsHint: false },
|
||||
});
|
||||
|
||||
const { stdin, unmount } = renderWithProviders(
|
||||
<InputPrompt {...props} />,
|
||||
{
|
||||
settings,
|
||||
uiActions: { setShortcutsHelpVisible },
|
||||
},
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
stdin.write('?');
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(setShortcutsHelpVisible).toHaveBeenCalledWith(true);
|
||||
});
|
||||
unmount();
|
||||
});
|
||||
|
||||
it.each([
|
||||
{
|
||||
name: 'terminal paste event occurs',
|
||||
|
||||
Reference in New Issue
Block a user