mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
fix(shell): update shell setting from usePty to enableInteractiveShell (#8726)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -633,7 +633,7 @@ export async function loadCliConfig(
|
||||
interactive,
|
||||
trustedFolder,
|
||||
useRipgrep: settings.tools?.useRipgrep,
|
||||
shouldUseNodePtyShell: settings.tools?.usePty,
|
||||
shouldUseNodePtyShell: settings.tools?.shell?.enableInteractiveShell,
|
||||
skipNextSpeakerCheck: settings.model?.skipNextSpeakerCheck,
|
||||
enablePromptCompletion: settings.general?.enablePromptCompletion ?? false,
|
||||
truncateToolOutputThreshold: settings.tools?.truncateToolOutputThreshold,
|
||||
|
||||
@@ -107,7 +107,7 @@ const MIGRATION_MAP: Record<string, string> = {
|
||||
preferredEditor: 'general.preferredEditor',
|
||||
sandbox: 'tools.sandbox',
|
||||
selectedAuthType: 'security.auth.selectedType',
|
||||
shouldUseNodePtyShell: 'tools.usePty',
|
||||
shouldUseNodePtyShell: 'tools.shell.enableInteractiveShell',
|
||||
shellPager: 'tools.shell.pager',
|
||||
shellShowColor: 'tools.shell.showColor',
|
||||
skipNextSpeakerCheck: 'model.skipNextSpeakerCheck',
|
||||
|
||||
@@ -639,16 +639,6 @@ const SETTINGS_SCHEMA = {
|
||||
'Sandbox execution environment (can be a boolean or a path string).',
|
||||
showInDialog: false,
|
||||
},
|
||||
usePty: {
|
||||
type: 'boolean',
|
||||
label: 'Use node-pty for Shell Execution',
|
||||
category: 'Tools',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description:
|
||||
'Use node-pty for shell command execution. Fallback to child_process still applies.',
|
||||
showInDialog: true,
|
||||
},
|
||||
shell: {
|
||||
type: 'object',
|
||||
label: 'Shell',
|
||||
@@ -658,6 +648,16 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Settings for shell execution.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enableInteractiveShell: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Interactive Shell',
|
||||
category: 'Tools',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description:
|
||||
'Use node-pty for an interactive shell experience. Fallback to child_process still applies.',
|
||||
showInDialog: true,
|
||||
},
|
||||
pager: {
|
||||
type: 'string',
|
||||
label: 'Pager',
|
||||
|
||||
@@ -1262,7 +1262,7 @@ describe('SettingsDialog', () => {
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
usePty: true,
|
||||
enableInteractiveShell: true,
|
||||
autoAccept: true,
|
||||
useRipgrep: true,
|
||||
},
|
||||
@@ -1375,7 +1375,7 @@ describe('SettingsDialog', () => {
|
||||
},
|
||||
tools: {
|
||||
useRipgrep: true,
|
||||
usePty: false,
|
||||
enableInteractiveShell: false,
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -1449,7 +1449,7 @@ describe('SettingsDialog', () => {
|
||||
it('should render with tools and security settings', () => {
|
||||
const settings = createMockSettings({
|
||||
tools: {
|
||||
usePty: true,
|
||||
enableInteractiveShell: true,
|
||||
autoAccept: false,
|
||||
useRipgrep: true,
|
||||
truncateToolOutputThreshold: 25000,
|
||||
@@ -1508,7 +1508,7 @@ describe('SettingsDialog', () => {
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
usePty: false,
|
||||
enableInteractiveShell: false,
|
||||
autoAccept: false,
|
||||
useRipgrep: false,
|
||||
},
|
||||
|
||||
@@ -238,7 +238,7 @@ describe('useShellCommandProcessor', () => {
|
||||
'/test/dir',
|
||||
expect.any(Function),
|
||||
expect.any(Object),
|
||||
false, // usePty
|
||||
false, // enableInteractiveShell
|
||||
expect.any(Object),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user