mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Standardize shell execution on unified exec (#39772)
## What changed - Use `exec_command` and `write_stdin` as the shell tool surface. - Treat legacy `default`, `local`, and `shell_command` model metadata as `unified_exec`. - Remove obsolete shell-selection configuration and runtime paths while preserving the feature and policy gates for zsh fork execution. GitOrigin-RevId: d743cbe598630d73052f1fecad680c4cde17977d
This commit is contained in:
@@ -297,9 +297,7 @@ pub enum ModelVisibility {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum ConfigShellToolType {
|
||||
Default,
|
||||
Local,
|
||||
#[serde(alias = "shell_command")]
|
||||
#[serde(alias = "default", alias = "local", alias = "shell_command")]
|
||||
UnifiedExec,
|
||||
Disabled,
|
||||
}
|
||||
@@ -888,10 +886,13 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn legacy_shell_model_metadata_deserializes_as_unified_exec() {
|
||||
assert_eq!(
|
||||
from_str::<ConfigShellToolType>("\"shell_command\"").expect("legacy shell type"),
|
||||
ConfigShellToolType::UnifiedExec
|
||||
);
|
||||
for legacy_shell_type in ["default", "local", "shell_command"] {
|
||||
assert_eq!(
|
||||
from_str::<ConfigShellToolType>(&format!("\"{legacy_shell_type}\""))
|
||||
.expect("legacy shell type"),
|
||||
ConfigShellToolType::UnifiedExec
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
to_string(&ConfigShellToolType::UnifiedExec).expect("serialize unified shell type"),
|
||||
"\"unified_exec\""
|
||||
|
||||
Reference in New Issue
Block a user