mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Reuse LocalImageAttachment throughout the TUI composer (#58260)
## What changed Replace the duplicate `AttachedImage` type with `LocalImageAttachment`. Return borrowed attachment slices and move attachment vectors directly when taking submissions or capturing history-search drafts, avoiding conversion and cloning. Use `local_image_paths()` in request-user-input and MCP elicitation drafts to copy only the paths they need. GitOrigin-RevId: b19451f633a479893fc97b8e2b51eb6b38838235
This commit is contained in:
@@ -701,7 +701,7 @@ impl ChatWidget {
|
||||
args,
|
||||
text_elements,
|
||||
pending_pastes: self.bottom_pane.composer_pending_pastes(),
|
||||
local_images: self.bottom_pane.composer_local_images(),
|
||||
local_images: self.bottom_pane.composer_local_images().to_vec(),
|
||||
remote_image_urls: self.bottom_pane.remote_image_urls(),
|
||||
mention_bindings: Vec::new(),
|
||||
source: SlashCommandDispatchSource::Live,
|
||||
|
||||
Reference in New Issue
Block a user