feat(core): Add configurable inactivity timeout for shell commands (#13531)

This commit is contained in:
Gal Zahavi
2025-11-26 13:43:33 -08:00
committed by GitHub
parent 87edeb4e32
commit 0d29385e1b
9 changed files with 124 additions and 7 deletions

View File

@@ -643,6 +643,7 @@ export async function loadCliConfig(
useRipgrep: settings.tools?.useRipgrep,
enableInteractiveShell:
settings.tools?.shell?.enableInteractiveShell ?? true,
shellToolInactivityTimeout: settings.tools?.shell?.inactivityTimeout,
skipNextSpeakerCheck: settings.model?.skipNextSpeakerCheck,
enablePromptCompletion: settings.general?.enablePromptCompletion ?? false,
truncateToolOutputThreshold: settings.tools?.truncateToolOutputThreshold,

View File

@@ -116,6 +116,7 @@ const MIGRATION_MAP: Record<string, string> = {
enableInteractiveShell: 'tools.shell.enableInteractiveShell',
shellPager: 'tools.shell.pager',
shellShowColor: 'tools.shell.showColor',
shellInactivityTimeout: 'tools.shell.inactivityTimeout',
skipNextSpeakerCheck: 'model.skipNextSpeakerCheck',
summarizeToolOutput: 'model.summarizeToolOutput',
telemetry: 'telemetry',

View File

@@ -930,6 +930,16 @@ const SETTINGS_SCHEMA = {
description: 'Show color in shell output.',
showInDialog: true,
},
inactivityTimeout: {
type: 'number',
label: 'Inactivity Timeout',
category: 'Tools',
requiresRestart: false,
default: 300,
description:
'The maximum time in seconds allowed without output from the shell command. Defaults to 5 minutes.',
showInDialog: false,
},
},
},
autoAccept: {