mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Merge branch 'etraut/next-turn-state-remove-user-input-with-context' into etraut/next-turn-state-input-op-consolidation
# Conflicts: # codex-rs/core/src/session/handlers.rs # codex-rs/core/tests/common/test_codex.rs # codex-rs/core/tests/suite/request_permissions.rs # codex-rs/core/tests/suite/unified_exec.rs # codex-rs/protocol/src/protocol.rs
This commit is contained in:
@@ -2741,8 +2741,6 @@ pub struct TurnContextNetworkItem {
|
||||
pub struct TurnContextItem {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub turn_id: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub trace_id: Option<String>,
|
||||
pub cwd: PathBuf,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub current_date: Option<String>,
|
||||
@@ -2765,15 +2763,11 @@ pub struct TurnContextItem {
|
||||
pub realtime_active: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub effort: Option<ReasoningEffortConfig>,
|
||||
// Compatibility-only field written with a default value so older Codex
|
||||
// versions can deserialize turn-context rollout items. It is no longer
|
||||
// read by context reconstruction and should be removed in a future schema
|
||||
// cleanup.
|
||||
pub summary: ReasoningSummaryConfig,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub user_instructions: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub developer_instructions: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub final_output_json_schema: Option<Value>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub truncation_policy: Option<TruncationPolicy>,
|
||||
}
|
||||
|
||||
impl TurnContextItem {
|
||||
@@ -3478,6 +3472,8 @@ impl<'de> Deserialize<'de> for SessionConfiguredEvent {
|
||||
pub enum ThreadGoalStatus {
|
||||
Active,
|
||||
Paused,
|
||||
Blocked,
|
||||
UsageLimited,
|
||||
BudgetLimited,
|
||||
Complete,
|
||||
}
|
||||
@@ -5165,7 +5161,6 @@ mod tests {
|
||||
"summary": "auto",
|
||||
}))?;
|
||||
|
||||
assert_eq!(item.trace_id, None);
|
||||
assert_eq!(item.network, None);
|
||||
assert_eq!(item.file_system_sandbox_policy, None);
|
||||
Ok(())
|
||||
@@ -5175,7 +5170,6 @@ mod tests {
|
||||
fn turn_context_item_serializes_network_when_present() -> Result<()> {
|
||||
let item = TurnContextItem {
|
||||
turn_id: None,
|
||||
trace_id: None,
|
||||
cwd: test_path_buf("/tmp"),
|
||||
current_date: None,
|
||||
timezone: None,
|
||||
@@ -5200,10 +5194,6 @@ mod tests {
|
||||
realtime_active: None,
|
||||
effort: None,
|
||||
summary: ReasoningSummaryConfig::Auto,
|
||||
user_instructions: None,
|
||||
developer_instructions: None,
|
||||
final_output_json_schema: None,
|
||||
truncation_policy: None,
|
||||
};
|
||||
|
||||
let value = serde_json::to_value(item)?;
|
||||
@@ -5227,6 +5217,7 @@ mod tests {
|
||||
}]
|
||||
})
|
||||
);
|
||||
assert_eq!(value["summary"], json!("auto"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user