ctrl+v image + @file accepts images (#1695)

allow ctrl+v in TUI for images + @file that are images are appended as
raw files (and read by the model) rather than pasted as a path that
cannot be read by the model.

Re-used components and same interface we're using for copying pasted
content in
72504f1d9c.
@aibrahim-oai as you've implemented this, mind having a look at this
one?


https://github.com/user-attachments/assets/c6c1153b-6b32-4558-b9a2-f8c57d2be710

---------

Co-authored-by: easong-openai <easong@openai.com>
Co-authored-by: Daniel Edrisian <dedrisian@openai.com>
Co-authored-by: Michael Bolin <mbolin@openai.com>
This commit is contained in:
pap-openai
2025-08-22 18:05:43 +01:00
committed by GitHub
parent 59f6b1654f
commit c5d21a4564
9 changed files with 728 additions and 14 deletions

View File

@@ -22,6 +22,7 @@ workspace = true
[dependencies]
anyhow = "1"
arboard = "3"
async-stream = "0.3.6"
base64 = "0.22.1"
chrono = { version = "0.4", features = ["serde"] }
@@ -41,7 +42,10 @@ codex-protocol = { path = "../protocol" }
color-eyre = "0.6.3"
crossterm = { version = "0.28.1", features = ["bracketed-paste", "event-stream"] }
diffy = "0.4.2"
image = { version = "^0.25.6", default-features = false, features = ["jpeg"] }
image = { version = "^0.25.6", default-features = false, features = [
"jpeg",
"png",
] }
lazy_static = "1"
mcp-types = { path = "../mcp-types" }
once_cell = "1"
@@ -61,6 +65,7 @@ shlex = "1.3.0"
strum = "0.27.2"
strum_macros = "0.27.2"
supports-color = "3.0.2"
tempfile = "3"
textwrap = "0.16.2"
tokio = { version = "1", features = [
"io-std",