mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-14 23:31:13 -07:00
feat(shell): enable interactive commands with virtual terminal (#6694)
This commit is contained in:
@@ -56,6 +56,7 @@ export enum Command {
|
||||
REVERSE_SEARCH = 'reverseSearch',
|
||||
SUBMIT_REVERSE_SEARCH = 'submitReverseSearch',
|
||||
ACCEPT_SUGGESTION_REVERSE_SEARCH = 'acceptSuggestionReverseSearch',
|
||||
TOGGLE_SHELL_INPUT_FOCUS = 'toggleShellInputFocus',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,4 +163,5 @@ export const defaultKeyBindings: KeyBindingConfig = {
|
||||
// Note: original logic ONLY checked ctrl=false, ignored meta/shift/paste
|
||||
[Command.SUBMIT_REVERSE_SEARCH]: [{ key: 'return', ctrl: false }],
|
||||
[Command.ACCEPT_SUGGESTION_REVERSE_SEARCH]: [{ key: 'tab' }],
|
||||
[Command.TOGGLE_SHELL_INPUT_FOCUS]: [{ key: 'f', ctrl: true }],
|
||||
};
|
||||
|
||||
@@ -106,6 +106,8 @@ const MIGRATION_MAP: Record<string, string> = {
|
||||
sandbox: 'tools.sandbox',
|
||||
selectedAuthType: 'security.auth.selectedType',
|
||||
shouldUseNodePtyShell: 'tools.usePty',
|
||||
shellPager: 'tools.shell.pager',
|
||||
shellShowColor: 'tools.shell.showColor',
|
||||
skipNextSpeakerCheck: 'model.skipNextSpeakerCheck',
|
||||
summarizeToolOutput: 'model.summarizeToolOutput',
|
||||
telemetry: 'telemetry',
|
||||
|
||||
@@ -649,6 +649,36 @@ const SETTINGS_SCHEMA = {
|
||||
'Use node-pty for shell command execution. Fallback to child_process still applies.',
|
||||
showInDialog: true,
|
||||
},
|
||||
shell: {
|
||||
type: 'object',
|
||||
label: 'Shell',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Settings for shell execution.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
pager: {
|
||||
type: 'string',
|
||||
label: 'Pager',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: 'cat' as string | undefined,
|
||||
description:
|
||||
'The pager command to use for shell output. Defaults to `cat`.',
|
||||
showInDialog: false,
|
||||
},
|
||||
showColor: {
|
||||
type: 'boolean',
|
||||
label: 'Show Color',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Show color in shell output.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
autoAccept: {
|
||||
type: 'boolean',
|
||||
label: 'Auto Accept',
|
||||
|
||||
Reference in New Issue
Block a user