mirror of
https://github.com/openai/codex.git
synced 2026-04-30 01:16:54 +00:00
Feat/restore image generation history (#15223)
Restore image generation items in resumed thread history
This commit is contained in:
@@ -3751,7 +3751,12 @@ async fn handle_output_item_done_records_image_save_history_message() {
|
||||
image_output_path.display(),
|
||||
))
|
||||
.into();
|
||||
assert_eq!(history.raw_items(), &[save_message, item]);
|
||||
let copy_message: ResponseItem = DeveloperInstructions::new(
|
||||
"If you need to use a generated image at another path, copy it and leave the original in place unless the user explicitly asks you to delete it."
|
||||
.to_string(),
|
||||
)
|
||||
.into();
|
||||
assert_eq!(history.raw_items(), &[save_message, copy_message, item]);
|
||||
assert_eq!(
|
||||
std::fs::read(&expected_saved_path).expect("saved file"),
|
||||
b"foo"
|
||||
|
||||
Reference in New Issue
Block a user