mirror of
https://github.com/openai/codex.git
synced 2026-05-22 20:14:17 +00:00
Compare commits
3 Commits
rust-v0.13
...
pr21238
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15660b5b8a | ||
|
|
0f623c575a | ||
|
|
18d6bc2d2f |
@@ -1289,6 +1289,13 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"LargeContentMode": {
|
||||
"enum": [
|
||||
"inline",
|
||||
"deferred"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ListMcpServerStatusParams": {
|
||||
"properties": {
|
||||
"cursor": {
|
||||
|
||||
@@ -1932,6 +1932,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ItemCompletedNotification": {
|
||||
"properties": {
|
||||
"completedAtMs": {
|
||||
@@ -3823,6 +3919,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -9892,6 +9892,102 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"InputModality": {
|
||||
"description": "Canonical user-input modality tags advertised by a model.",
|
||||
"oneOf": [
|
||||
@@ -10063,6 +10159,13 @@
|
||||
"title": "ItemStartedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"LargeContentMode": {
|
||||
"enum": [
|
||||
"inline",
|
||||
"deferred"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ListMcpServerStatusParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
@@ -16150,6 +16253,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -6392,6 +6392,102 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"InitializeCapabilities": {
|
||||
"description": "Client-declared capabilities negotiated during initialize.",
|
||||
"properties": {
|
||||
@@ -6612,6 +6708,13 @@
|
||||
"title": "ItemStartedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"LargeContentMode": {
|
||||
"enum": [
|
||||
"inline",
|
||||
"deferred"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ListMcpServerStatusParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
@@ -13974,6 +14077,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -285,6 +285,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1035,6 +1131,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -285,6 +285,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1035,6 +1131,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -422,6 +422,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1179,6 +1275,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -756,6 +756,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -2014,6 +2110,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -215,6 +215,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"LargeContentMode": {
|
||||
"enum": [
|
||||
"inline",
|
||||
"deferred"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"LocalShellAction": {
|
||||
"oneOf": [
|
||||
{
|
||||
|
||||
@@ -756,6 +756,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -2014,6 +2110,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -756,6 +756,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -2014,6 +2110,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -448,6 +448,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1471,6 +1567,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -422,6 +422,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1179,6 +1275,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -422,6 +422,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1179,6 +1275,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -422,6 +422,102 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageGenerationContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"dataBase64": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"inline"
|
||||
],
|
||||
"title": "InlineImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"dataBase64",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "InlineImageGenerationContent",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"byteLength": {
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"contentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"deferred"
|
||||
],
|
||||
"title": "DeferredImageGenerationContentType",
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"format": "uint32",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"byteLength",
|
||||
"contentId",
|
||||
"mimeType",
|
||||
"type"
|
||||
],
|
||||
"title": "DeferredImageGenerationContent",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"McpToolCallError": {
|
||||
"properties": {
|
||||
"message": {
|
||||
@@ -1179,6 +1275,17 @@
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"content": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImageGenerationContent"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
5
codex-rs/app-server-protocol/schema/typescript/v2/ImageGenerationContent.ts
generated
Normal file
5
codex-rs/app-server-protocol/schema/typescript/v2/ImageGenerationContent.ts
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ImageGenerationContent = { "type": "inline", mimeType: string, dataBase64: string, byteLength: bigint, width: number | null, height: number | null, } | { "type": "deferred", contentId: string, mimeType: string, byteLength: bigint, width: number | null, height: number | null, };
|
||||
5
codex-rs/app-server-protocol/schema/typescript/v2/LargeContentMode.ts
generated
Normal file
5
codex-rs/app-server-protocol/schema/typescript/v2/LargeContentMode.ts
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LargeContentMode = "inline" | "deferred";
|
||||
@@ -15,6 +15,7 @@ import type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputCo
|
||||
import type { DynamicToolCallStatus } from "./DynamicToolCallStatus";
|
||||
import type { FileUpdateChange } from "./FileUpdateChange";
|
||||
import type { HookPromptFragment } from "./HookPromptFragment";
|
||||
import type { ImageGenerationContent } from "./ImageGenerationContent";
|
||||
import type { McpToolCallError } from "./McpToolCallError";
|
||||
import type { McpToolCallResult } from "./McpToolCallResult";
|
||||
import type { McpToolCallStatus } from "./McpToolCallStatus";
|
||||
@@ -98,4 +99,4 @@ reasoningEffort: ReasoningEffort | null,
|
||||
/**
|
||||
* Last known status of the target agents, when available.
|
||||
*/
|
||||
agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: AbsolutePathBuf, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, savedPath?: AbsolutePathBuf, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, };
|
||||
agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: AbsolutePathBuf, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, content: ImageGenerationContent | null, result: string, savedPath?: AbsolutePathBuf, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, };
|
||||
|
||||
@@ -164,10 +164,12 @@ export type { HookTrustStatus } from "./HookTrustStatus";
|
||||
export type { HooksListEntry } from "./HooksListEntry";
|
||||
export type { HooksListParams } from "./HooksListParams";
|
||||
export type { HooksListResponse } from "./HooksListResponse";
|
||||
export type { ImageGenerationContent } from "./ImageGenerationContent";
|
||||
export type { ItemCompletedNotification } from "./ItemCompletedNotification";
|
||||
export type { ItemGuardianApprovalReviewCompletedNotification } from "./ItemGuardianApprovalReviewCompletedNotification";
|
||||
export type { ItemGuardianApprovalReviewStartedNotification } from "./ItemGuardianApprovalReviewStartedNotification";
|
||||
export type { ItemStartedNotification } from "./ItemStartedNotification";
|
||||
export type { LargeContentMode } from "./LargeContentMode";
|
||||
export type { ListMcpServerStatusParams } from "./ListMcpServerStatusParams";
|
||||
export type { ListMcpServerStatusResponse } from "./ListMcpServerStatusResponse";
|
||||
export type { LoginAccountParams } from "./LoginAccountParams";
|
||||
|
||||
@@ -588,6 +588,13 @@ client_request_definitions! {
|
||||
serialization: None,
|
||||
response: v2::ThreadTurnsItemsListResponse,
|
||||
},
|
||||
#[experimental("thread/item/content/read")]
|
||||
ThreadItemContentRead => "thread/item/content/read" {
|
||||
params: v2::ThreadItemContentReadParams,
|
||||
// Explicitly concurrent: this primarily reads append-only rollout storage.
|
||||
serialization: None,
|
||||
response: v2::ThreadItemContentReadResponse,
|
||||
},
|
||||
/// Append raw Responses API items to the thread history without starting a user turn.
|
||||
ThreadInjectItems => "thread/inject_items" {
|
||||
params: v2::ThreadInjectItemsParams,
|
||||
@@ -1875,6 +1882,7 @@ mod tests {
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
},
|
||||
};
|
||||
assert_eq!(thread_turns_list.serialization_scope(), None);
|
||||
@@ -1887,6 +1895,7 @@ mod tests {
|
||||
cursor: None,
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
large_content: None,
|
||||
},
|
||||
};
|
||||
assert_eq!(thread_turns_items_list.serialization_scope(), None);
|
||||
|
||||
@@ -586,6 +586,13 @@ impl ThreadHistoryBuilder {
|
||||
id: payload.call_id.clone(),
|
||||
status: String::new(),
|
||||
revised_prompt: None,
|
||||
content: Some(crate::protocol::v2::ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: String::new(),
|
||||
byte_length: 0,
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: String::new(),
|
||||
saved_path: None,
|
||||
};
|
||||
@@ -597,6 +604,13 @@ impl ThreadHistoryBuilder {
|
||||
id: payload.call_id.clone(),
|
||||
status: payload.status.clone(),
|
||||
revised_prompt: payload.revised_prompt.clone(),
|
||||
content: Some(crate::protocol::v2::ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: payload.result.clone(),
|
||||
byte_length: crate::protocol::v2::image_generation_byte_length(&payload.result),
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: payload.result.clone(),
|
||||
saved_path: payload.saved_path.clone(),
|
||||
};
|
||||
@@ -1469,6 +1483,13 @@ mod tests {
|
||||
id: "ig_123".into(),
|
||||
status: "completed".into(),
|
||||
revised_prompt: Some("final prompt".into()),
|
||||
content: Some(crate::protocol::v2::ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".into(),
|
||||
data_base64: "Zm9v".into(),
|
||||
byte_length: 3,
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: "Zm9v".into(),
|
||||
saved_path: Some(test_path_buf("/tmp/ig_123.png").abs()),
|
||||
},
|
||||
|
||||
@@ -345,6 +345,8 @@ pub enum ThreadItem {
|
||||
id: String,
|
||||
status: String,
|
||||
revised_prompt: Option<String>,
|
||||
#[serde(default)]
|
||||
content: Option<ImageGenerationContent>,
|
||||
result: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
@@ -361,6 +363,40 @@ pub enum ThreadItem {
|
||||
ContextCompaction { id: String },
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(tag = "type", rename_all = "camelCase")]
|
||||
#[ts(tag = "type", export_to = "v2/")]
|
||||
pub enum ImageGenerationContent {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase")]
|
||||
Inline {
|
||||
mime_type: String,
|
||||
data_base64: String,
|
||||
byte_length: u64,
|
||||
width: Option<u32>,
|
||||
height: Option<u32>,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase")]
|
||||
Deferred {
|
||||
content_id: String,
|
||||
mime_type: String,
|
||||
byte_length: u64,
|
||||
width: Option<u32>,
|
||||
height: Option<u32>,
|
||||
},
|
||||
}
|
||||
|
||||
pub(crate) fn image_generation_byte_length(data_base64: &str) -> u64 {
|
||||
let padding_len = data_base64
|
||||
.as_bytes()
|
||||
.iter()
|
||||
.rev()
|
||||
.take_while(|byte| **byte == b'=')
|
||||
.count();
|
||||
((data_base64.len() / 4) * 3).saturating_sub(padding_len) as u64
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase", export_to = "v2/")]
|
||||
@@ -822,6 +858,13 @@ impl From<CoreTurnItem> for ThreadItem {
|
||||
id: image.id,
|
||||
status: image.status,
|
||||
revised_prompt: image.revised_prompt,
|
||||
content: Some(ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: image.result.clone(),
|
||||
byte_length: image_generation_byte_length(&image.result),
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: image.result,
|
||||
saved_path: image.saved_path,
|
||||
},
|
||||
|
||||
@@ -118,6 +118,7 @@ fn thread_turns_items_list_round_trips() {
|
||||
cursor: Some("cursor_1".to_string()),
|
||||
limit: Some(50),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
large_content: None,
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
@@ -128,6 +129,7 @@ fn thread_turns_items_list_round_trips() {
|
||||
"cursor": "cursor_1",
|
||||
"limit": 50,
|
||||
"sortDirection": "asc",
|
||||
"largeContent": null,
|
||||
})
|
||||
);
|
||||
let response = ThreadTurnsItemsListResponse {
|
||||
@@ -148,6 +150,147 @@ fn thread_turns_items_list_round_trips() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_generation_accepts_missing_content_for_legacy_payloads() {
|
||||
let item: ThreadItem = serde_json::from_value(json!({
|
||||
"type": "imageGeneration",
|
||||
"id": "ig_123",
|
||||
"status": "completed",
|
||||
"revisedPrompt": null,
|
||||
"result": "Zm9v",
|
||||
"savedPath": null
|
||||
}))
|
||||
.expect("legacy image generation item should deserialize");
|
||||
|
||||
assert_eq!(
|
||||
item,
|
||||
ThreadItem::ImageGeneration {
|
||||
id: "ig_123".to_string(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt: None,
|
||||
content: None,
|
||||
result: "Zm9v".to_string(),
|
||||
saved_path: None,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_generation_serializes_missing_content_as_null() {
|
||||
let item = ThreadItem::ImageGeneration {
|
||||
id: "ig_123".to_string(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt: None,
|
||||
content: None,
|
||||
result: "Zm9v".to_string(),
|
||||
saved_path: None,
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
serde_json::to_value(item).expect("image generation item should serialize"),
|
||||
json!({
|
||||
"type": "imageGeneration",
|
||||
"id": "ig_123",
|
||||
"status": "completed",
|
||||
"revisedPrompt": null,
|
||||
"content": null,
|
||||
"result": "Zm9v",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_generation_inline_content_round_trips() {
|
||||
let item = ThreadItem::ImageGeneration {
|
||||
id: "ig_inline".to_string(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt: Some("final prompt".to_string()),
|
||||
content: Some(ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: "Zm9v".to_string(),
|
||||
byte_length: 3,
|
||||
width: Some(512),
|
||||
height: Some(512),
|
||||
}),
|
||||
result: "Zm9v".to_string(),
|
||||
saved_path: None,
|
||||
};
|
||||
|
||||
let serialized =
|
||||
serde_json::to_value(&item).expect("inline image generation item should serialize");
|
||||
|
||||
assert_eq!(
|
||||
serialized,
|
||||
json!({
|
||||
"type": "imageGeneration",
|
||||
"id": "ig_inline",
|
||||
"status": "completed",
|
||||
"revisedPrompt": "final prompt",
|
||||
"content": {
|
||||
"type": "inline",
|
||||
"mimeType": "image/png",
|
||||
"dataBase64": "Zm9v",
|
||||
"byteLength": 3,
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
},
|
||||
"result": "Zm9v",
|
||||
})
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
serde_json::from_value::<ThreadItem>(serialized)
|
||||
.expect("inline image generation item should deserialize"),
|
||||
item
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_generation_deferred_content_round_trips() {
|
||||
let item = ThreadItem::ImageGeneration {
|
||||
id: "ig_deferred".to_string(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt: None,
|
||||
content: Some(ImageGenerationContent::Deferred {
|
||||
content_id: "content_123".to_string(),
|
||||
mime_type: "image/png".to_string(),
|
||||
byte_length: 3,
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: String::new(),
|
||||
saved_path: None,
|
||||
};
|
||||
|
||||
let serialized =
|
||||
serde_json::to_value(&item).expect("deferred image generation item should serialize");
|
||||
|
||||
assert_eq!(
|
||||
serialized,
|
||||
json!({
|
||||
"type": "imageGeneration",
|
||||
"id": "ig_deferred",
|
||||
"status": "completed",
|
||||
"revisedPrompt": null,
|
||||
"content": {
|
||||
"type": "deferred",
|
||||
"contentId": "content_123",
|
||||
"mimeType": "image/png",
|
||||
"byteLength": 3,
|
||||
"width": null,
|
||||
"height": null,
|
||||
},
|
||||
"result": "",
|
||||
})
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
serde_json::from_value::<ThreadItem>(serialized)
|
||||
.expect("deferred image generation item should deserialize"),
|
||||
item
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_list_params_accepts_single_cwd() {
|
||||
let params = serde_json::from_value::<ThreadListParams>(json!({
|
||||
|
||||
@@ -293,6 +293,11 @@ pub struct ThreadResumeParams {
|
||||
#[experimental("thread/resume.excludeTurns")]
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub exclude_turns: bool,
|
||||
/// Controls whether large item payloads are embedded in returned turns or
|
||||
/// replaced with deferred-content metadata.
|
||||
#[experimental("thread/resume.largeContent")]
|
||||
#[ts(optional = nullable)]
|
||||
pub large_content: Option<LargeContentMode>,
|
||||
/// Deprecated and ignored by app-server. Kept only so older clients can
|
||||
/// continue sending the field while rollout persistence always uses the
|
||||
/// limited history policy.
|
||||
@@ -901,6 +906,15 @@ pub enum SortDirection {
|
||||
Desc,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS, Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub enum LargeContentMode {
|
||||
#[default]
|
||||
Inline,
|
||||
Deferred,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
@@ -1010,6 +1024,10 @@ pub struct ThreadTurnsListParams {
|
||||
/// How much item detail to include for each returned turn; defaults to summary.
|
||||
#[ts(optional = nullable)]
|
||||
pub items_view: Option<TurnItemsView>,
|
||||
/// Controls whether large item payloads are embedded in returned turns or
|
||||
/// replaced with deferred-content metadata.
|
||||
#[ts(optional = nullable)]
|
||||
pub large_content: Option<LargeContentMode>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
@@ -1042,6 +1060,10 @@ pub struct ThreadTurnsItemsListParams {
|
||||
/// Optional item pagination direction; defaults to ascending.
|
||||
#[ts(optional = nullable)]
|
||||
pub sort_direction: Option<SortDirection>,
|
||||
/// Controls whether large item payloads are embedded in returned items or
|
||||
/// replaced with deferred-content metadata.
|
||||
#[ts(optional = nullable)]
|
||||
pub large_content: Option<LargeContentMode>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
@@ -1057,6 +1079,25 @@ pub struct ThreadTurnsItemsListResponse {
|
||||
pub backwards_cursor: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadItemContentReadParams {
|
||||
pub thread_id: String,
|
||||
pub turn_id: String,
|
||||
pub item_id: String,
|
||||
pub content_id: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadItemContentReadResponse {
|
||||
pub mime_type: String,
|
||||
pub data_base64: String,
|
||||
pub byte_length: u64,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
||||
@@ -143,14 +143,15 @@ Example with notification opt-out:
|
||||
## API Overview
|
||||
|
||||
- `thread/start` — create a new thread; emits `thread/started` (including the current `thread.status`) and auto-subscribes you to turn/item events for that thread. When the request includes a `cwd` and the resolved sandbox is `workspace-write` or full access, app-server also marks that project as trusted in the user `config.toml`. Pass `sessionStartSource: "clear"` when starting a replacement thread after clearing the current session so `SessionStart` hooks receive `source: "clear"` instead of the default `"startup"`. For permissions, prefer experimental `permissions` profile selection; the legacy `sandbox` shorthand is still accepted but cannot be combined with `permissions`. Experimental `environments` selects the sticky execution environments for turns on the thread; omit it to use the server default, pass `[]` to disable environments, or pass explicit environment ids with per-environment `cwd`.
|
||||
- `thread/resume` — reopen an existing thread by id so subsequent `turn/start` calls append to it. Accepts the same permission override rules as `thread/start`.
|
||||
- `thread/resume` — reopen an existing thread by id so subsequent `turn/start` calls append to it. Accepts the same permission override rules as `thread/start`. Experimental clients can pass `largeContent: "deferred"` to replace large item payloads such as generated-image bytes with metadata placeholders.
|
||||
- `thread/fork` — fork an existing thread into a new thread id by copying the stored history; if the source thread is currently mid-turn, the fork records the same interruption marker as `turn/interrupt` instead of inheriting an unmarked partial turn suffix. The returned `thread.forkedFromId` points at the source thread when known. Accepts `ephemeral: true` for an in-memory temporary fork, emits `thread/started` (including the current `thread.status`), and auto-subscribes you to turn/item events for the new thread. Experimental clients can pass `excludeTurns: true` when they plan to page fork history via `thread/turns/list` instead of receiving the full turn array immediately. Accepts the same permission override rules as `thread/start`.
|
||||
- `thread/start`, `thread/resume`, and `thread/fork` responses include the legacy `sandbox` compatibility projection. Experimental clients can read response `permissionProfile` for the exact active runtime permissions and `activePermissionProfile` for the named or implicit built-in profile identity/provenance when known.
|
||||
- `thread/list` — page through stored rollouts; supports cursor-based pagination and optional `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filters. Each returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded.
|
||||
- `thread/loaded/list` — list the thread ids currently loaded in memory.
|
||||
- `thread/read` — read a stored thread by id without resuming it; optionally include turns via `includeTurns`. The returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded.
|
||||
- `thread/turns/list` — experimental; page through a stored thread’s turn history without resuming it; supports cursor-based pagination with `sortDirection`, `itemsView`, `nextCursor`, and `backwardsCursor`.
|
||||
- `thread/turns/items/list` — experimental; reserved for paging full items for one turn. The API shape is present, but app-server currently returns an unsupported-method JSON-RPC error.
|
||||
- `thread/turns/list` — experimental; page through a stored thread’s turn history without resuming it; supports cursor-based pagination with `sortDirection`, `itemsView`, `nextCursor`, and `backwardsCursor`, plus `largeContent: "deferred"` for generated-image payloads.
|
||||
- `thread/turns/items/list` — experimental; page through one stored turn’s items with the same cursor model and optional `largeContent: "deferred"` handling.
|
||||
- `thread/item/content/read` — experimental; fetch deferred large-content bytes for one stored item.
|
||||
- `thread/metadata/update` — patch stored thread metadata in sqlite; currently supports updating persisted `gitInfo` fields and returns the refreshed `thread`.
|
||||
- `thread/memoryMode/set` — experimental; set a thread’s persisted memory eligibility to `"enabled"` or `"disabled"` for either a loaded thread or a stored rollout; returns `{}` on success.
|
||||
- `memory/reset` — experimental; clear the current `CODEX_HOME/memories` directory and reset persisted memory stage data in sqlite while preserving existing thread memory modes; returns `{}` on success.
|
||||
@@ -442,19 +443,51 @@ Every returned `Turn` includes `itemsView`, which tells clients whether the `ite
|
||||
} }
|
||||
```
|
||||
|
||||
`thread/turns/items/list` is the planned hydration API for fetching full items for one turn:
|
||||
### Example: Defer generated-image content (experimental)
|
||||
|
||||
Pass `largeContent: "deferred"` when listing a turn's items to keep generated-image bytes out of the page response. Deferred `imageGeneration` items retain the legacy `result` field as an empty string and expose a structured `content` descriptor that can be loaded separately. For a just-completed live turn, callers may need to retry a content read briefly while rollout persistence catches up with the live turn view.
|
||||
|
||||
```json
|
||||
{ "method": "thread/turns/items/list", "id": 25, "params": {
|
||||
"threadId": "thr_123",
|
||||
"turnId": "turn_456",
|
||||
"limit": 100,
|
||||
"sortDirection": "asc"
|
||||
"sortDirection": "asc",
|
||||
"largeContent": "deferred"
|
||||
} }
|
||||
{ "id": 25, "result": {
|
||||
"data": [{
|
||||
"type": "imageGeneration",
|
||||
"id": "ig_789",
|
||||
"status": "completed",
|
||||
"revisedPrompt": null,
|
||||
"content": {
|
||||
"type": "deferred",
|
||||
"contentId": "result",
|
||||
"mimeType": "image/png",
|
||||
"byteLength": 1234567,
|
||||
"width": null,
|
||||
"height": null
|
||||
},
|
||||
"result": "",
|
||||
"savedPath": null
|
||||
}],
|
||||
"nextCursor": null,
|
||||
"backwardsCursor": "newer-items-cursor-or-null"
|
||||
} }
|
||||
{ "method": "thread/item/content/read", "id": 26, "params": {
|
||||
"threadId": "thr_123",
|
||||
"turnId": "turn_456",
|
||||
"itemId": "ig_789",
|
||||
"contentId": "result"
|
||||
} }
|
||||
{ "id": 26, "result": {
|
||||
"mimeType": "image/png",
|
||||
"dataBase64": "...",
|
||||
"byteLength": 1234567
|
||||
} }
|
||||
```
|
||||
|
||||
This method currently returns JSON-RPC `-32601` with message `thread/turns/items/list is not supported yet`.
|
||||
|
||||
### Example: Update stored thread metadata
|
||||
|
||||
Use `thread/metadata/update` to patch sqlite-backed metadata for a thread without resuming it. Today this supports persisted `gitInfo`; omitted fields are left unchanged, while explicit `null` clears a stored value.
|
||||
|
||||
@@ -1051,6 +1051,9 @@ impl MessageProcessor {
|
||||
ClientRequest::ThreadTurnsItemsList { params, .. } => {
|
||||
self.thread_processor.thread_turns_items_list(params).await
|
||||
}
|
||||
ClientRequest::ThreadItemContentRead { params, .. } => {
|
||||
self.thread_processor.thread_item_content_read(params).await
|
||||
}
|
||||
ClientRequest::ThreadShellCommand { params, .. } => {
|
||||
self.thread_processor
|
||||
.thread_shell_command(&request_id, params)
|
||||
|
||||
@@ -71,9 +71,11 @@ use codex_app_server_protocol::GitInfo as ApiGitInfo;
|
||||
use codex_app_server_protocol::HookMetadata;
|
||||
use codex_app_server_protocol::HooksListParams;
|
||||
use codex_app_server_protocol::HooksListResponse;
|
||||
use codex_app_server_protocol::ImageGenerationContent;
|
||||
use codex_app_server_protocol::InitializeParams;
|
||||
use codex_app_server_protocol::InitializeResponse;
|
||||
use codex_app_server_protocol::JSONRPCErrorError;
|
||||
use codex_app_server_protocol::LargeContentMode;
|
||||
use codex_app_server_protocol::ListMcpServerStatusParams;
|
||||
use codex_app_server_protocol::ListMcpServerStatusResponse;
|
||||
use codex_app_server_protocol::LoginAccountParams;
|
||||
@@ -183,6 +185,8 @@ use codex_app_server_protocol::ThreadIncrementElicitationResponse;
|
||||
use codex_app_server_protocol::ThreadInjectItemsParams;
|
||||
use codex_app_server_protocol::ThreadInjectItemsResponse;
|
||||
use codex_app_server_protocol::ThreadItem;
|
||||
use codex_app_server_protocol::ThreadItemContentReadParams;
|
||||
use codex_app_server_protocol::ThreadItemContentReadResponse;
|
||||
use codex_app_server_protocol::ThreadListCwdFilter;
|
||||
use codex_app_server_protocol::ThreadListParams;
|
||||
use codex_app_server_protocol::ThreadListResponse;
|
||||
@@ -220,6 +224,7 @@ use codex_app_server_protocol::ThreadStartResponse;
|
||||
use codex_app_server_protocol::ThreadStartedNotification;
|
||||
use codex_app_server_protocol::ThreadStatus;
|
||||
use codex_app_server_protocol::ThreadTurnsItemsListParams;
|
||||
use codex_app_server_protocol::ThreadTurnsItemsListResponse;
|
||||
use codex_app_server_protocol::ThreadTurnsListParams;
|
||||
use codex_app_server_protocol::ThreadTurnsListResponse;
|
||||
use codex_app_server_protocol::ThreadUnarchiveParams;
|
||||
|
||||
@@ -547,6 +547,7 @@ pub(super) async fn handle_pending_thread_resume_request(
|
||||
active_turn.as_ref(),
|
||||
);
|
||||
}
|
||||
super::thread_processor::apply_large_content_mode_to_thread(&mut thread, pending.large_content);
|
||||
|
||||
let thread_status = thread_watch_manager
|
||||
.loaded_status_for_thread(&thread.id)
|
||||
|
||||
@@ -597,11 +597,20 @@ impl ThreadRequestProcessor {
|
||||
|
||||
pub(crate) async fn thread_turns_items_list(
|
||||
&self,
|
||||
_params: ThreadTurnsItemsListParams,
|
||||
params: ThreadTurnsItemsListParams,
|
||||
) -> Result<Option<ClientResponsePayload>, JSONRPCErrorError> {
|
||||
Err(method_not_found(
|
||||
"thread/turns/items/list is not supported yet",
|
||||
))
|
||||
self.thread_turns_items_list_response_inner(params)
|
||||
.await
|
||||
.map(|response| Some(response.into()))
|
||||
}
|
||||
|
||||
pub(crate) async fn thread_item_content_read(
|
||||
&self,
|
||||
params: ThreadItemContentReadParams,
|
||||
) -> Result<Option<ClientResponsePayload>, JSONRPCErrorError> {
|
||||
self.thread_item_content_read_response_inner(params)
|
||||
.await
|
||||
.map(|response| Some(response.into()))
|
||||
}
|
||||
|
||||
pub(crate) async fn thread_shell_command(
|
||||
@@ -2087,6 +2096,7 @@ impl ThreadRequestProcessor {
|
||||
limit,
|
||||
sort_direction,
|
||||
items_view,
|
||||
large_content,
|
||||
} = params;
|
||||
let items_view = items_view.unwrap_or(TurnItemsView::Summary);
|
||||
|
||||
@@ -2102,21 +2112,7 @@ impl ThreadRequestProcessor {
|
||||
// every request. Rollback and compaction events can change earlier turns, so
|
||||
// the server has to rebuild the full turn list until turn metadata is indexed
|
||||
// separately.
|
||||
let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok();
|
||||
let has_live_running_thread = match loaded_thread.as_ref() {
|
||||
Some(thread) => matches!(thread.agent_status().await, AgentStatus::Running),
|
||||
None => false,
|
||||
};
|
||||
let active_turn = if loaded_thread.is_some() {
|
||||
// Persisted history may not yet include the currently running turn. The
|
||||
// app-server listener has already projected live turn events into ThreadState,
|
||||
// so merge that in-memory snapshot before paginating.
|
||||
let thread_state = self.thread_state_manager.thread_state(thread_uuid).await;
|
||||
let state = thread_state.lock().await;
|
||||
state.active_turn_snapshot()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let (has_live_running_thread, active_turn) = self.live_turn_read_context(thread_uuid).await;
|
||||
let mut turns = reconstruct_thread_turns_for_turns_list(
|
||||
&items,
|
||||
self.thread_watch_manager
|
||||
@@ -2160,6 +2156,7 @@ impl ThreadRequestProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
apply_large_content_mode_to_turns(&mut turns, large_content.unwrap_or_default());
|
||||
let page = paginate_thread_turns(
|
||||
turns,
|
||||
cursor.as_deref(),
|
||||
@@ -2173,6 +2170,129 @@ impl ThreadRequestProcessor {
|
||||
})
|
||||
}
|
||||
|
||||
async fn thread_turns_items_list_response_inner(
|
||||
&self,
|
||||
params: ThreadTurnsItemsListParams,
|
||||
) -> Result<ThreadTurnsItemsListResponse, JSONRPCErrorError> {
|
||||
let ThreadTurnsItemsListParams {
|
||||
thread_id,
|
||||
turn_id,
|
||||
cursor,
|
||||
limit,
|
||||
sort_direction,
|
||||
large_content,
|
||||
} = params;
|
||||
|
||||
let thread_uuid = ThreadId::from_string(&thread_id)
|
||||
.map_err(|err| invalid_request(format!("invalid thread id: {err}")))?;
|
||||
let items = self
|
||||
.load_thread_turns_list_history(thread_uuid)
|
||||
.await
|
||||
.map_err(thread_read_view_error)?;
|
||||
let (has_live_running_thread, active_turn) = self.live_turn_read_context(thread_uuid).await;
|
||||
let turns = reconstruct_thread_turns_for_turns_list(
|
||||
&items,
|
||||
self.thread_watch_manager
|
||||
.loaded_status_for_thread(&thread_uuid.to_string())
|
||||
.await,
|
||||
has_live_running_thread,
|
||||
active_turn,
|
||||
);
|
||||
let mut turn_items = turns
|
||||
.into_iter()
|
||||
.find(|turn| turn.id == turn_id)
|
||||
.ok_or_else(|| invalid_request(format!("turn not found: {turn_id}")))?
|
||||
.items;
|
||||
apply_large_content_mode_to_items(&mut turn_items, large_content.unwrap_or_default());
|
||||
let page = paginate_thread_items(
|
||||
turn_items,
|
||||
cursor.as_deref(),
|
||||
limit,
|
||||
sort_direction.unwrap_or(SortDirection::Asc),
|
||||
)?;
|
||||
Ok(ThreadTurnsItemsListResponse {
|
||||
data: page.items,
|
||||
next_cursor: page.next_cursor,
|
||||
backwards_cursor: page.backwards_cursor,
|
||||
})
|
||||
}
|
||||
|
||||
async fn thread_item_content_read_response_inner(
|
||||
&self,
|
||||
params: ThreadItemContentReadParams,
|
||||
) -> Result<ThreadItemContentReadResponse, JSONRPCErrorError> {
|
||||
let ThreadItemContentReadParams {
|
||||
thread_id,
|
||||
turn_id,
|
||||
item_id,
|
||||
content_id,
|
||||
} = params;
|
||||
|
||||
let thread_uuid = ThreadId::from_string(&thread_id)
|
||||
.map_err(|err| invalid_request(format!("invalid thread id: {err}")))?;
|
||||
let items = self
|
||||
.load_thread_turns_list_history(thread_uuid)
|
||||
.await
|
||||
.map_err(thread_read_view_error)?;
|
||||
let (has_live_running_thread, active_turn) = self.live_turn_read_context(thread_uuid).await;
|
||||
let turns = reconstruct_thread_turns_for_turns_list(
|
||||
&items,
|
||||
self.thread_watch_manager
|
||||
.loaded_status_for_thread(&thread_uuid.to_string())
|
||||
.await,
|
||||
has_live_running_thread,
|
||||
active_turn,
|
||||
);
|
||||
let turn = turns
|
||||
.into_iter()
|
||||
.find(|turn| turn.id == turn_id)
|
||||
.ok_or_else(|| invalid_request(format!("turn not found: {turn_id}")))?;
|
||||
let item = turn
|
||||
.items
|
||||
.into_iter()
|
||||
.find(|item| item.id() == item_id)
|
||||
.ok_or_else(|| invalid_request(format!("item not found: {item_id}")))?;
|
||||
let ThreadItem::ImageGeneration {
|
||||
content, result, ..
|
||||
} = item
|
||||
else {
|
||||
return Err(invalid_request(format!(
|
||||
"item {item_id} does not contain deferred content"
|
||||
)));
|
||||
};
|
||||
if content_id != IMAGE_GENERATION_RESULT_CONTENT_ID {
|
||||
return Err(invalid_request(format!("content not found: {content_id}")));
|
||||
}
|
||||
let Some(ImageGenerationContent::Inline {
|
||||
mime_type,
|
||||
byte_length,
|
||||
..
|
||||
}) = content
|
||||
else {
|
||||
return Err(internal_error(format!(
|
||||
"image generation item {item_id} does not have readable inline content"
|
||||
)));
|
||||
};
|
||||
Ok(ThreadItemContentReadResponse {
|
||||
mime_type,
|
||||
data_base64: result,
|
||||
byte_length,
|
||||
})
|
||||
}
|
||||
|
||||
async fn live_turn_read_context(&self, thread_id: ThreadId) -> (bool, Option<Turn>) {
|
||||
let Ok(thread) = self.thread_manager.get_thread(thread_id).await else {
|
||||
return (false, None);
|
||||
};
|
||||
let has_live_running_thread = matches!(thread.agent_status().await, AgentStatus::Running);
|
||||
// Persisted history may not yet include the currently running turn. The
|
||||
// app-server listener has already projected live turn events into ThreadState,
|
||||
// so merge that in-memory snapshot when serving history reads.
|
||||
let thread_state = self.thread_state_manager.thread_state(thread_id).await;
|
||||
let state = thread_state.lock().await;
|
||||
(has_live_running_thread, state.active_turn_snapshot())
|
||||
}
|
||||
|
||||
async fn load_thread_turns_list_history(
|
||||
&self,
|
||||
thread_id: ThreadId,
|
||||
@@ -2375,6 +2495,7 @@ impl ThreadRequestProcessor {
|
||||
developer_instructions,
|
||||
personality,
|
||||
exclude_turns,
|
||||
large_content,
|
||||
persist_extended_history: _persist_extended_history,
|
||||
} = params;
|
||||
let include_turns = !exclude_turns;
|
||||
@@ -2504,6 +2625,7 @@ impl ThreadRequestProcessor {
|
||||
.await
|
||||
.thread_source
|
||||
.map(Into::into);
|
||||
apply_large_content_mode_to_thread(&mut thread, large_content.unwrap_or_default());
|
||||
|
||||
self.thread_watch_manager
|
||||
.upsert_thread(thread.clone())
|
||||
@@ -2738,6 +2860,7 @@ impl ThreadRequestProcessor {
|
||||
emit_thread_goal_update,
|
||||
thread_goal_state_db,
|
||||
include_turns: !params.exclude_turns,
|
||||
large_content: params.large_content.unwrap_or_default(),
|
||||
}),
|
||||
);
|
||||
if listener_command_tx.send(command).is_err() {
|
||||
@@ -3389,6 +3512,9 @@ fn xcode_26_4_mcp_elicitations_auto_deny(
|
||||
|
||||
const THREAD_TURNS_DEFAULT_LIMIT: usize = 25;
|
||||
const THREAD_TURNS_MAX_LIMIT: usize = 100;
|
||||
const THREAD_ITEMS_DEFAULT_LIMIT: usize = 100;
|
||||
const THREAD_ITEMS_MAX_LIMIT: usize = 500;
|
||||
const IMAGE_GENERATION_RESULT_CONTENT_ID: &str = "result";
|
||||
|
||||
fn thread_backwards_cursor_for_sort_key(
|
||||
thread: &StoredThread,
|
||||
@@ -3414,6 +3540,12 @@ struct ThreadTurnsPage {
|
||||
pub(super) backwards_cursor: Option<String>,
|
||||
}
|
||||
|
||||
struct ThreadItemsPage {
|
||||
pub(super) items: Vec<ThreadItem>,
|
||||
pub(super) next_cursor: Option<String>,
|
||||
pub(super) backwards_cursor: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct ThreadTurnsCursor {
|
||||
@@ -3421,6 +3553,13 @@ struct ThreadTurnsCursor {
|
||||
include_anchor: bool,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct ThreadItemsCursor {
|
||||
item_id: String,
|
||||
include_anchor: bool,
|
||||
}
|
||||
|
||||
fn paginate_thread_turns(
|
||||
turns: Vec<Turn>,
|
||||
cursor: Option<&str>,
|
||||
@@ -3515,6 +3654,141 @@ fn parse_thread_turns_cursor(cursor: &str) -> Result<ThreadTurnsCursor, JSONRPCE
|
||||
serde_json::from_str(cursor).map_err(|_| invalid_request(format!("invalid cursor: {cursor}")))
|
||||
}
|
||||
|
||||
fn paginate_thread_items(
|
||||
items: Vec<ThreadItem>,
|
||||
cursor: Option<&str>,
|
||||
limit: Option<u32>,
|
||||
sort_direction: SortDirection,
|
||||
) -> Result<ThreadItemsPage, JSONRPCErrorError> {
|
||||
if items.is_empty() {
|
||||
return Ok(ThreadItemsPage {
|
||||
items: Vec::new(),
|
||||
next_cursor: None,
|
||||
backwards_cursor: None,
|
||||
});
|
||||
}
|
||||
|
||||
let anchor = cursor.map(parse_thread_items_cursor).transpose()?;
|
||||
let page_size = limit
|
||||
.map(|value| value as usize)
|
||||
.unwrap_or(THREAD_ITEMS_DEFAULT_LIMIT)
|
||||
.clamp(1, THREAD_ITEMS_MAX_LIMIT);
|
||||
|
||||
let anchor_index = anchor
|
||||
.as_ref()
|
||||
.and_then(|anchor| items.iter().position(|item| item.id() == anchor.item_id));
|
||||
if anchor.is_some() && anchor_index.is_none() {
|
||||
return Err(invalid_request(
|
||||
"invalid cursor: anchor item is no longer present",
|
||||
));
|
||||
}
|
||||
|
||||
let mut keyed_items: Vec<_> = items.into_iter().enumerate().collect();
|
||||
match sort_direction {
|
||||
SortDirection::Asc => {
|
||||
if let (Some(anchor), Some(anchor_index)) = (anchor.as_ref(), anchor_index) {
|
||||
keyed_items.retain(|(index, _)| {
|
||||
if anchor.include_anchor {
|
||||
*index >= anchor_index
|
||||
} else {
|
||||
*index > anchor_index
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
SortDirection::Desc => {
|
||||
keyed_items.reverse();
|
||||
if let (Some(anchor), Some(anchor_index)) = (anchor.as_ref(), anchor_index) {
|
||||
keyed_items.retain(|(index, _)| {
|
||||
if anchor.include_anchor {
|
||||
*index <= anchor_index
|
||||
} else {
|
||||
*index < anchor_index
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let more_items_available = keyed_items.len() > page_size;
|
||||
keyed_items.truncate(page_size);
|
||||
let backwards_cursor = keyed_items
|
||||
.first()
|
||||
.map(|(_, item)| serialize_thread_items_cursor(item.id(), /*include_anchor*/ true))
|
||||
.transpose()?;
|
||||
let next_cursor = if more_items_available {
|
||||
keyed_items
|
||||
.last()
|
||||
.map(|(_, item)| {
|
||||
serialize_thread_items_cursor(item.id(), /*include_anchor*/ false)
|
||||
})
|
||||
.transpose()?
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let items = keyed_items.into_iter().map(|(_, item)| item).collect();
|
||||
|
||||
Ok(ThreadItemsPage {
|
||||
items,
|
||||
next_cursor,
|
||||
backwards_cursor,
|
||||
})
|
||||
}
|
||||
|
||||
fn serialize_thread_items_cursor(
|
||||
item_id: &str,
|
||||
include_anchor: bool,
|
||||
) -> Result<String, JSONRPCErrorError> {
|
||||
serde_json::to_string(&ThreadItemsCursor {
|
||||
item_id: item_id.to_string(),
|
||||
include_anchor,
|
||||
})
|
||||
.map_err(|err| internal_error(format!("failed to serialize cursor: {err}")))
|
||||
}
|
||||
|
||||
fn parse_thread_items_cursor(cursor: &str) -> Result<ThreadItemsCursor, JSONRPCErrorError> {
|
||||
serde_json::from_str(cursor).map_err(|_| invalid_request(format!("invalid cursor: {cursor}")))
|
||||
}
|
||||
|
||||
pub(super) fn apply_large_content_mode_to_thread(thread: &mut Thread, mode: LargeContentMode) {
|
||||
apply_large_content_mode_to_turns(&mut thread.turns, mode);
|
||||
}
|
||||
|
||||
fn apply_large_content_mode_to_turns(turns: &mut [Turn], mode: LargeContentMode) {
|
||||
for turn in turns {
|
||||
apply_large_content_mode_to_items(&mut turn.items, mode);
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_large_content_mode_to_items(items: &mut [ThreadItem], mode: LargeContentMode) {
|
||||
if matches!(mode, LargeContentMode::Inline) {
|
||||
return;
|
||||
}
|
||||
|
||||
for item in items {
|
||||
if let ThreadItem::ImageGeneration {
|
||||
content, result, ..
|
||||
} = item
|
||||
&& let Some(ImageGenerationContent::Inline {
|
||||
mime_type,
|
||||
byte_length,
|
||||
width,
|
||||
height,
|
||||
..
|
||||
}) = content
|
||||
{
|
||||
*content = Some(ImageGenerationContent::Deferred {
|
||||
content_id: IMAGE_GENERATION_RESULT_CONTENT_ID.to_string(),
|
||||
mime_type: mime_type.clone(),
|
||||
byte_length: *byte_length,
|
||||
width: *width,
|
||||
height: *height,
|
||||
});
|
||||
result.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn reconstruct_thread_turns_for_turns_list(
|
||||
items: &[RolloutItem],
|
||||
loaded_status: ThreadStatus,
|
||||
|
||||
@@ -639,6 +639,7 @@ mod thread_processor_behavior_tests {
|
||||
developer_instructions: None,
|
||||
personality: None,
|
||||
exclude_turns: false,
|
||||
large_content: None,
|
||||
persist_extended_history: false,
|
||||
};
|
||||
let config_snapshot = ThreadConfigSnapshot {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::outgoing_message::ConnectionId;
|
||||
use crate::outgoing_message::ConnectionRequestId;
|
||||
use codex_app_server_protocol::LargeContentMode;
|
||||
use codex_app_server_protocol::RequestId;
|
||||
use codex_app_server_protocol::ThreadGoal;
|
||||
use codex_app_server_protocol::ThreadHistoryBuilder;
|
||||
@@ -34,6 +35,7 @@ pub(crate) struct PendingThreadResumeRequest {
|
||||
pub(crate) emit_thread_goal_update: bool,
|
||||
pub(crate) thread_goal_state_db: Option<StateDbHandle>,
|
||||
pub(crate) include_turns: bool,
|
||||
pub(crate) large_content: LargeContentMode,
|
||||
}
|
||||
|
||||
// ThreadListenerCommand is used to perform operations in the context of the thread listener, for serialization purposes.
|
||||
|
||||
@@ -74,6 +74,7 @@ use codex_app_server_protocol::ThreadArchiveParams;
|
||||
use codex_app_server_protocol::ThreadCompactStartParams;
|
||||
use codex_app_server_protocol::ThreadForkParams;
|
||||
use codex_app_server_protocol::ThreadInjectItemsParams;
|
||||
use codex_app_server_protocol::ThreadItemContentReadParams;
|
||||
use codex_app_server_protocol::ThreadListParams;
|
||||
use codex_app_server_protocol::ThreadLoadedListParams;
|
||||
use codex_app_server_protocol::ThreadMemoryModeSetParams;
|
||||
@@ -532,6 +533,15 @@ impl McpProcess {
|
||||
self.send_request("thread/turns/items/list", params).await
|
||||
}
|
||||
|
||||
/// Send a `thread/item/content/read` JSON-RPC request.
|
||||
pub async fn send_thread_item_content_read_request(
|
||||
&mut self,
|
||||
params: ThreadItemContentReadParams,
|
||||
) -> anyhow::Result<i64> {
|
||||
let params = Some(serde_json::to_value(params)?);
|
||||
self.send_request("thread/item/content/read", params).await
|
||||
}
|
||||
|
||||
/// Send a `model/list` JSON-RPC request.
|
||||
pub async fn send_list_models_request(
|
||||
&mut self,
|
||||
|
||||
@@ -9,16 +9,20 @@ use codex_app_server::in_process;
|
||||
use codex_app_server::in_process::InProcessStartArgs;
|
||||
use codex_app_server_protocol::ClientInfo;
|
||||
use codex_app_server_protocol::ClientRequest;
|
||||
use codex_app_server_protocol::ImageGenerationContent;
|
||||
use codex_app_server_protocol::InitializeCapabilities;
|
||||
use codex_app_server_protocol::InitializeParams;
|
||||
use codex_app_server_protocol::JSONRPCError;
|
||||
use codex_app_server_protocol::JSONRPCResponse;
|
||||
use codex_app_server_protocol::LargeContentMode;
|
||||
use codex_app_server_protocol::RequestId;
|
||||
use codex_app_server_protocol::SessionSource;
|
||||
use codex_app_server_protocol::SortDirection;
|
||||
use codex_app_server_protocol::ThreadForkParams;
|
||||
use codex_app_server_protocol::ThreadForkResponse;
|
||||
use codex_app_server_protocol::ThreadItem;
|
||||
use codex_app_server_protocol::ThreadItemContentReadParams;
|
||||
use codex_app_server_protocol::ThreadItemContentReadResponse;
|
||||
use codex_app_server_protocol::ThreadListParams;
|
||||
use codex_app_server_protocol::ThreadListResponse;
|
||||
use codex_app_server_protocol::ThreadNameUpdatedNotification;
|
||||
@@ -32,6 +36,7 @@ use codex_app_server_protocol::ThreadStartParams;
|
||||
use codex_app_server_protocol::ThreadStartResponse;
|
||||
use codex_app_server_protocol::ThreadStatus;
|
||||
use codex_app_server_protocol::ThreadTurnsItemsListParams;
|
||||
use codex_app_server_protocol::ThreadTurnsItemsListResponse;
|
||||
use codex_app_server_protocol::ThreadTurnsListParams;
|
||||
use codex_app_server_protocol::ThreadTurnsListResponse;
|
||||
use codex_app_server_protocol::TurnItemsView;
|
||||
@@ -226,6 +231,7 @@ async fn thread_turns_list_can_page_backward_and_forward() -> Result<()> {
|
||||
limit: Some(2),
|
||||
sort_direction: Some(SortDirection::Desc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_resp: JSONRPCResponse = timeout(
|
||||
@@ -253,6 +259,7 @@ async fn thread_turns_list_can_page_backward_and_forward() -> Result<()> {
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Desc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_resp: JSONRPCResponse = timeout(
|
||||
@@ -272,6 +279,7 @@ async fn thread_turns_list_can_page_backward_and_forward() -> Result<()> {
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_resp: JSONRPCResponse = timeout(
|
||||
@@ -353,6 +361,120 @@ async fn thread_turns_list_supports_requested_items_view() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn thread_turn_items_list_defers_image_generation_content_and_reads_it_back() -> Result<()> {
|
||||
let server = create_mock_responses_server_repeating_assistant("Done").await;
|
||||
let codex_home = TempDir::new()?;
|
||||
create_config_toml(codex_home.path(), &server.uri())?;
|
||||
|
||||
let filename_ts = "2025-01-05T12-00-00";
|
||||
let conversation_id = create_fake_rollout_with_text_elements(
|
||||
codex_home.path(),
|
||||
filename_ts,
|
||||
"2025-01-05T12:00:00Z",
|
||||
"make an image",
|
||||
vec![],
|
||||
Some("mock_provider"),
|
||||
/*git_info*/ None,
|
||||
)?;
|
||||
let rollout_path = rollout_path(codex_home.path(), filename_ts, &conversation_id);
|
||||
append_image_generation_end(
|
||||
rollout_path.as_path(),
|
||||
"2025-01-05T12:00:01Z",
|
||||
"ig_123",
|
||||
"Zm9v",
|
||||
)?;
|
||||
|
||||
let mut mcp = McpProcess::new(codex_home.path()).await?;
|
||||
timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??;
|
||||
|
||||
let turns_list_id = mcp
|
||||
.send_thread_turns_list_request(ThreadTurnsListParams {
|
||||
thread_id: conversation_id.clone(),
|
||||
cursor: None,
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view: Some(TurnItemsView::Full),
|
||||
large_content: Some(LargeContentMode::Deferred),
|
||||
})
|
||||
.await?;
|
||||
let turns_list_resp: JSONRPCResponse = timeout(
|
||||
DEFAULT_READ_TIMEOUT,
|
||||
mcp.read_stream_until_response_message(RequestId::Integer(turns_list_id)),
|
||||
)
|
||||
.await??;
|
||||
let ThreadTurnsListResponse { data, .. } =
|
||||
to_response::<ThreadTurnsListResponse>(turns_list_resp)?;
|
||||
let turn = data.first().expect("expected one turn");
|
||||
let turn_id = turn.id.clone();
|
||||
let deferred_item = turn
|
||||
.items
|
||||
.iter()
|
||||
.find(|item| item.id() == "ig_123")
|
||||
.expect("expected deferred image generation item");
|
||||
assert_eq!(
|
||||
deferred_item,
|
||||
&ThreadItem::ImageGeneration {
|
||||
id: "ig_123".to_string(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt: None,
|
||||
content: Some(ImageGenerationContent::Deferred {
|
||||
content_id: "result".to_string(),
|
||||
mime_type: "image/png".to_string(),
|
||||
byte_length: 3,
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: String::new(),
|
||||
saved_path: None,
|
||||
}
|
||||
);
|
||||
|
||||
let items_list_id = mcp
|
||||
.send_thread_turns_items_list_request(ThreadTurnsItemsListParams {
|
||||
thread_id: conversation_id.clone(),
|
||||
turn_id: turn_id.clone(),
|
||||
cursor: None,
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
large_content: Some(LargeContentMode::Deferred),
|
||||
})
|
||||
.await?;
|
||||
let items_list_resp: JSONRPCResponse = timeout(
|
||||
DEFAULT_READ_TIMEOUT,
|
||||
mcp.read_stream_until_response_message(RequestId::Integer(items_list_id)),
|
||||
)
|
||||
.await??;
|
||||
let ThreadTurnsItemsListResponse { data, .. } =
|
||||
to_response::<ThreadTurnsItemsListResponse>(items_list_resp)?;
|
||||
assert!(data.contains(deferred_item));
|
||||
|
||||
let content_read_id = mcp
|
||||
.send_thread_item_content_read_request(ThreadItemContentReadParams {
|
||||
thread_id: conversation_id,
|
||||
turn_id,
|
||||
item_id: "ig_123".to_string(),
|
||||
content_id: "result".to_string(),
|
||||
})
|
||||
.await?;
|
||||
let content_read_resp: JSONRPCResponse = timeout(
|
||||
DEFAULT_READ_TIMEOUT,
|
||||
mcp.read_stream_until_response_message(RequestId::Integer(content_read_id)),
|
||||
)
|
||||
.await??;
|
||||
let content = to_response::<ThreadItemContentReadResponse>(content_read_resp)?;
|
||||
assert_eq!(
|
||||
content,
|
||||
ThreadItemContentReadResponse {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: "Zm9v".to_string(),
|
||||
byte_length: 3,
|
||||
}
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn thread_turns_list_reads_store_history_without_rollout_path() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
@@ -408,6 +530,7 @@ async fn thread_turns_list_reads_store_history_without_rollout_path() -> Result<
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
},
|
||||
})
|
||||
.await?
|
||||
@@ -658,6 +781,7 @@ async fn thread_turns_list_rejects_cursor_when_anchor_turn_is_rolled_back() -> R
|
||||
limit: Some(2),
|
||||
sort_direction: Some(SortDirection::Desc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_resp: JSONRPCResponse = timeout(
|
||||
@@ -683,6 +807,7 @@ async fn thread_turns_list_rejects_cursor_when_anchor_turn_is_rolled_back() -> R
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_err: JSONRPCError = timeout(
|
||||
@@ -1040,6 +1165,7 @@ async fn thread_turns_list_rejects_unmaterialized_loaded_thread() -> Result<()>
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_err: JSONRPCError = timeout(
|
||||
@@ -1060,39 +1186,6 @@ async fn thread_turns_list_rejects_unmaterialized_loaded_thread() -> Result<()>
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn thread_turns_items_list_returns_unsupported() -> Result<()> {
|
||||
let server = create_mock_responses_server_repeating_assistant("Done").await;
|
||||
let codex_home = TempDir::new()?;
|
||||
create_config_toml(codex_home.path(), &server.uri())?;
|
||||
|
||||
let mut mcp = McpProcess::new(codex_home.path()).await?;
|
||||
timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??;
|
||||
|
||||
let read_id = mcp
|
||||
.send_thread_turns_items_list_request(ThreadTurnsItemsListParams {
|
||||
thread_id: "thr_123".to_string(),
|
||||
turn_id: "turn_456".to_string(),
|
||||
cursor: None,
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
})
|
||||
.await?;
|
||||
let read_err: JSONRPCError = timeout(
|
||||
DEFAULT_READ_TIMEOUT,
|
||||
mcp.read_stream_until_error_message(RequestId::Integer(read_id)),
|
||||
)
|
||||
.await??;
|
||||
|
||||
assert_eq!(read_err.error.code, -32601);
|
||||
assert_eq!(
|
||||
read_err.error.message,
|
||||
"thread/turns/items/list is not supported yet"
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn thread_read_reports_system_error_idle_flag_after_failed_turn() -> Result<()> {
|
||||
let server = responses::start_mock_server().await;
|
||||
@@ -1196,6 +1289,29 @@ fn append_agent_message(path: &Path, timestamp: &str, text: &str) -> anyhow::Res
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn append_image_generation_end(
|
||||
path: &Path,
|
||||
timestamp: &str,
|
||||
call_id: &str,
|
||||
result: &str,
|
||||
) -> std::io::Result<()> {
|
||||
let mut file = std::fs::OpenOptions::new().append(true).open(path)?;
|
||||
writeln!(
|
||||
file,
|
||||
"{}",
|
||||
json!({
|
||||
"timestamp": timestamp,
|
||||
"type":"event_msg",
|
||||
"payload": {
|
||||
"type":"image_generation_end",
|
||||
"call_id": call_id,
|
||||
"status": "completed",
|
||||
"result": result
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
fn append_thread_rollback(path: &Path, timestamp: &str, num_turns: u32) -> std::io::Result<()> {
|
||||
let mut file = std::fs::OpenOptions::new().append(true).open(path)?;
|
||||
writeln!(
|
||||
@@ -1224,6 +1340,7 @@ async fn read_single_turn_items_view(
|
||||
limit: Some(10),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let read_resp: JSONRPCResponse = timeout(
|
||||
|
||||
@@ -152,6 +152,7 @@ async fn thread_shell_command_history_responses_exclude_persisted_command_execut
|
||||
limit: None,
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
items_view: None,
|
||||
large_content: None,
|
||||
})
|
||||
.await?;
|
||||
let turns_list_resp: JSONRPCResponse = timeout(
|
||||
|
||||
@@ -706,6 +706,13 @@ pub(super) fn handle_image_generation_end(
|
||||
id: call_id.into(),
|
||||
status: "completed".to_string(),
|
||||
revised_prompt,
|
||||
content: Some(codex_app_server_protocol::ImageGenerationContent::Inline {
|
||||
mime_type: "image/png".to_string(),
|
||||
data_base64: String::new(),
|
||||
byte_length: 0,
|
||||
width: None,
|
||||
height: None,
|
||||
}),
|
||||
result: String::new(),
|
||||
saved_path,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user