feat: fallback unified_exec to shell_command (#8075)

This commit is contained in:
jif-oai
2025-12-17 10:29:45 +00:00
committed by GitHub
parent 4897efcced
commit 813bdb9010
4 changed files with 59 additions and 1 deletions

View File

@@ -43,7 +43,12 @@ impl ToolsConfig {
let shell_type = if !features.enabled(Feature::ShellTool) {
ConfigShellToolType::Disabled
} else if features.enabled(Feature::UnifiedExec) {
ConfigShellToolType::UnifiedExec
// If ConPTY not supported (for old Windows versions), fallback on ShellCommand.
if codex_utils_pty::conpty_supported() {
ConfigShellToolType::UnifiedExec
} else {
ConfigShellToolType::ShellCommand
}
} else {
model_family.shell_type
};