Improve key binding names and descriptions (#16529)

This commit is contained in:
Tommaso Sciortino
2026-01-13 12:07:55 -08:00
committed by GitHub
parent 91fcca3b1c
commit e931ebe581
5 changed files with 31 additions and 36 deletions

View File

@@ -1277,7 +1277,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
return newValue;
});
} else if (
keyMatchers[Command.TOGGLE_IDE_CONTEXT_DETAIL](key) &&
keyMatchers[Command.SHOW_IDE_CONTEXT_DETAIL](key) &&
config.getIdeMode() &&
ideContextState
) {
@@ -1289,7 +1289,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
) {
setConstrainHeight(false);
} else if (
keyMatchers[Command.TOGGLE_SHELL_INPUT_FOCUS_OUT](key) &&
keyMatchers[Command.UNFOCUS_SHELL_INPUT](key) &&
activePtyId &&
embeddedShellFocused
) {

View File

@@ -829,7 +829,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
return;
}
if (keyMatchers[Command.TOGGLE_SHELL_INPUT_FOCUS_IN](key)) {
if (keyMatchers[Command.FOCUS_SHELL_INPUT](key)) {
// If we got here, Autocomplete didn't handle the key (e.g. no suggestions).
if (activePtyId) {
setEmbeddedShellFocused(true);

View File

@@ -289,7 +289,7 @@ describe('keyMatchers', () => {
negative: [createKey('t'), createKey('e', { ctrl: true })],
},
{
command: Command.TOGGLE_IDE_CONTEXT_DETAIL,
command: Command.SHOW_IDE_CONTEXT_DETAIL,
positive: [createKey('g', { ctrl: true })],
negative: [createKey('g'), createKey('t', { ctrl: true })],
},
@@ -336,7 +336,7 @@ describe('keyMatchers', () => {
negative: [createKey('return'), createKey('space')],
},
{
command: Command.TOGGLE_SHELL_INPUT_FOCUS_IN,
command: Command.FOCUS_SHELL_INPUT,
positive: [createKey('tab')],
negative: [createKey('f', { ctrl: true }), createKey('f')],
},