mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
Record local image inputs on completed image-generation items (#54420)
## What changed Add optional `inputImages` metadata containing each referenced local image's path and SHA-256 hash of the bytes read before normalization. Compute the hash from the same bytes used to prepare the edit request. Preserve this metadata through completion events, persisted thread history, resume, and legacy rollout migration. Update app-server schemas and generated TypeScript and Python types; older items continue to deserialize without the field. ## Testing Add coverage for input ordering, changed contents at the same path, unreadable or invalid references, serialization, persisted history and resume, and legacy migration. GitOrigin-RevId: 522be8ec1e39c9b2bbe5b9ccb37ea67d17f0e21a
This commit is contained in:
+24
@@ -681,6 +681,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ImageGenerationInputImage": {
|
||||
"description": "A local image file successfully read for this exact image-generation request.",
|
||||
"properties": {
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
},
|
||||
"sha256": {
|
||||
"description": "Lowercase SHA-256 of the file bytes read before image normalization.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path",
|
||||
"sha256"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"LegacyAppPathString": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2173,6 +2190,13 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"inputImages": {
|
||||
"description": "Observed local inputs for a completed generation, absent on older items.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ImageGenerationInputImage"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"revisedPrompt": {
|
||||
"type": [
|
||||
"string",
|
||||
|
||||
Reference in New Issue
Block a user