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:
Eric Traut
2026-10-30 06:36:20 +00:00
committed by copyberry
parent 582a8812e0
commit d5cbb90b72
8 changed files with 40 additions and 81 deletions
@@ -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,