mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
Merge branch 'etraut/next-turn-state-input-op-consolidation' into etraut/next-turn-state-remove-override-context
# Conflicts: # codex-rs/core/src/codex_thread.rs # codex-rs/core/src/session/tests.rs # codex-rs/protocol/src/protocol.rs
This commit is contained in:
@@ -396,9 +396,9 @@ pub struct ConversationTextParams {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
/// Persistent turn-context overrides that can be applied before user input.
|
||||
/// Persistent thread-settings overrides that can be applied before user input.
|
||||
#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq, JsonSchema)]
|
||||
pub struct TurnContextOverrides {
|
||||
pub struct ThreadSettingsOverrides {
|
||||
/// Updated `cwd` for sandbox/tool calls.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cwd: Option<PathBuf>,
|
||||
@@ -499,7 +499,7 @@ pub enum Op {
|
||||
/// Request the list of voices supported by realtime conversation streams.
|
||||
RealtimeConversationListVoices,
|
||||
|
||||
/// User input, optionally with turn-context overrides applied first.
|
||||
/// User input, optionally with thread-settings overrides applied first.
|
||||
UserInput {
|
||||
/// User input items, see `InputItem`
|
||||
items: Vec<UserInput>,
|
||||
@@ -513,9 +513,9 @@ pub enum Op {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
responsesapi_client_metadata: Option<HashMap<String, String>>,
|
||||
|
||||
/// Persistent turn-context overrides to apply before the input.
|
||||
/// Persistent thread-settings overrides to apply before the input.
|
||||
#[serde(default, flatten)]
|
||||
turn_context: TurnContextOverrides,
|
||||
thread_settings: ThreadSettingsOverrides,
|
||||
},
|
||||
|
||||
/// Inter-agent communication that should be recorded as assistant history
|
||||
@@ -644,7 +644,7 @@ impl From<Vec<UserInput>> for Op {
|
||||
items: value,
|
||||
final_output_json_schema: None,
|
||||
responsesapi_client_metadata: None,
|
||||
turn_context: TurnContextOverrides::default(),
|
||||
thread_settings: ThreadSettingsOverrides::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4884,7 +4884,7 @@ mod tests {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: None,
|
||||
responsesapi_client_metadata: None,
|
||||
turn_context: Default::default(),
|
||||
thread_settings: Default::default(),
|
||||
};
|
||||
|
||||
let json_op = serde_json::to_value(op)?;
|
||||
@@ -4904,7 +4904,7 @@ mod tests {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: None,
|
||||
responsesapi_client_metadata: None,
|
||||
turn_context: Default::default(),
|
||||
thread_settings: Default::default(),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -4926,7 +4926,7 @@ mod tests {
|
||||
items: Vec::new(),
|
||||
final_output_json_schema: Some(schema.clone()),
|
||||
responsesapi_client_metadata: None,
|
||||
turn_context: Default::default(),
|
||||
thread_settings: Default::default(),
|
||||
};
|
||||
|
||||
let json_op = serde_json::to_value(op)?;
|
||||
@@ -4952,7 +4952,7 @@ mod tests {
|
||||
"fiber_run_id".to_string(),
|
||||
"fiber-123".to_string(),
|
||||
)])),
|
||||
turn_context: Default::default(),
|
||||
thread_settings: Default::default(),
|
||||
};
|
||||
|
||||
let json_op = serde_json::to_value(&op)?;
|
||||
|
||||
Reference in New Issue
Block a user