mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Remove legacy turn context environment fields
Switch TurnContext to carry only the selected environment list and explicit-selection marker. Preserve the no-list rollout path by representing the default environment internally with no environment id while keeping multi-environment tool rendering disabled unless explicit selections are present. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -956,6 +956,9 @@ pub struct SearchToolCallParams {
|
||||
#[derive(Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
pub struct ShellToolCallParams {
|
||||
pub command: Vec<String>,
|
||||
#[serde(default, alias = "environmentId")]
|
||||
#[ts(optional)]
|
||||
pub environment_id: Option<String>,
|
||||
pub workdir: Option<String>,
|
||||
|
||||
/// This is the maximum time in milliseconds that the command is allowed to run.
|
||||
@@ -980,6 +983,9 @@ pub struct ShellToolCallParams {
|
||||
#[derive(Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
pub struct ShellCommandToolCallParams {
|
||||
pub command: String,
|
||||
#[serde(default, alias = "environmentId")]
|
||||
#[ts(optional)]
|
||||
pub environment_id: Option<String>,
|
||||
pub workdir: Option<String>,
|
||||
|
||||
/// Whether to run the shell with login shell semantics
|
||||
@@ -2021,6 +2027,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
ShellToolCallParams {
|
||||
command: vec!["ls".to_string(), "-l".to_string()],
|
||||
environment_id: None,
|
||||
workdir: Some("/tmp".to_string()),
|
||||
timeout_ms: Some(1000),
|
||||
sandbox_permissions: None,
|
||||
|
||||
Reference in New Issue
Block a user