mirror of
https://github.com/openai/codex.git
synced 2026-11-15 22:53:30 +00:00
Support standalone function outputs in turn routing (#40991)
## What changed - Allow `start_or_steer_turn` to accept named `function_call_output` items without a `call_id`, starting a turn when idle or steering the active turn. - Preserve standalone outputs as pending input, assign response item IDs, and record them in conversation history without treating them as user prompts. ## Testing - Cover starting a turn with a standalone output and steering an active turn with one. - Verify passive response items do not signal pending steering activity. GitOrigin-RevId: e32b292106b3c5a5f03577b8ebf67d2d7dee4e5d
This commit is contained in:
1 parent
6e008417bb
commit
b9c4b9a0cf
9 files changed
+178
-61
No files matched your search
@@ -660,7 +660,9 @@ fn turn_user_input(input: &[TurnInput]) -> Vec<UserInput> {
|
||||
.iter()
|
||||
.filter_map(|item| match item {
|
||||
TurnInput::UserInput { content, .. } => Some(content.as_slice()),
|
||||
TurnInput::ResponseItem(_) | TurnInput::InterAgentCommunication(_) => None,
|
||||
TurnInput::ResponseItem(_)
|
||||
| TurnInput::FunctionCallOutput(_)
|
||||
| TurnInput::InterAgentCommunication(_) => None,
|
||||
})
|
||||
.flatten()
|
||||
.cloned()
|
||||
@@ -990,7 +992,9 @@ async fn track_turn_resolved_config_analytics(
|
||||
.iter()
|
||||
.filter_map(|item| match item {
|
||||
TurnInput::UserInput { content, .. } => Some(content.as_slice()),
|
||||
TurnInput::ResponseItem(_) | TurnInput::InterAgentCommunication(_) => None,
|
||||
TurnInput::ResponseItem(_)
|
||||
| TurnInput::FunctionCallOutput(_)
|
||||
| TurnInput::InterAgentCommunication(_) => None,
|
||||
})
|
||||
.flatten()
|
||||
.filter(|item| {
|
||||
|
||||
Reference in new issue
Block a user