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:
Gal Zahavi
2025-09-18 13:05:01 -07:00
committed by Sandy Tao
parent e20d7f1e99
commit a2356b0230
7 changed files with 27 additions and 25 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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',
+10 -10
View File
@@ -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),
);