mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
use stable item IDs for Responses API calls
This commit is contained in:
@@ -83,6 +83,7 @@ fn recent_image_fallback_selects_newest_images_in_chronological_order() {
|
||||
call_id: "mcp-call".to_string(),
|
||||
},
|
||||
ResponseItem::FunctionCallOutput {
|
||||
id: None,
|
||||
call_id: "mcp-call".to_string(),
|
||||
output: image_output("mcp"),
|
||||
},
|
||||
@@ -94,6 +95,7 @@ fn recent_image_fallback_selects_newest_images_in_chronological_order() {
|
||||
input: String::new(),
|
||||
},
|
||||
ResponseItem::CustomToolCallOutput {
|
||||
id: None,
|
||||
call_id: "code-mode-call".to_string(),
|
||||
name: Some("exec".to_string()),
|
||||
output: image_output("code-mode"),
|
||||
@@ -105,6 +107,7 @@ fn recent_image_fallback_selects_newest_images_in_chronological_order() {
|
||||
result: "generated".to_string(),
|
||||
},
|
||||
ResponseItem::FunctionCallOutput {
|
||||
id: None,
|
||||
call_id: "orphan-call".to_string(),
|
||||
output: image_output("orphan"),
|
||||
},
|
||||
|
||||
@@ -248,9 +248,9 @@ fn recent_images(history: &[ResponseItem], count: usize) -> Vec<ImageUrl> {
|
||||
ContentItem::InputText { .. } | ContentItem::OutputText { .. } => None,
|
||||
}));
|
||||
}
|
||||
ResponseItem::FunctionCallOutput { call_id, output }
|
||||
if function_call_ids.contains(call_id.as_str()) =>
|
||||
{
|
||||
ResponseItem::FunctionCallOutput {
|
||||
call_id, output, ..
|
||||
} if function_call_ids.contains(call_id.as_str()) => {
|
||||
image_urls.extend(output_image_urls(output));
|
||||
}
|
||||
ResponseItem::CustomToolCallOutput {
|
||||
|
||||
Reference in New Issue
Block a user