Skip to content

feat(composer): send images and text files with steers and follow-ups - #214

Merged
kahme247 merged 4 commits into
kahme247:mainfrom
andrebrait:feat/queue-attachments
Oct 5, 2026
Merged

kahme247 merged 4 commits into
kahme247:mainfrom
andrebrait:feat/queue-attachments

Conversation

@andrebrait

@andrebrait andrebrait commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

omp's steer, follow_up, and prompt with streamingBehavior RPC commands accept images, and omp delivers them with the queued message. omp-web blocked attachments for the whole run and refused to queue a message that had any, so images could only be sent while the agent was idle.

  • Attaching through + (file or Paste image), paste, or drag and drop now works while the agent runs.
  • Steer and follow-up (Enter, Queue, dictation's send/queue choice, queued web slash commands) carry the attached images. Text files are folded into the message exactly as an idle send does.
  • With only attachments in the composer, Stop becomes Queue.
  • Edit on an image-only queued message no longer puts omp's [Image] label into the composer.
  • Removed the now-dead queueAllowsAttachments predicate and the attachmentsDisabled, dictationKeptWithAttachments, and imagesCannotQueue strings.

The server path needed no change: lib/rpc-manager.ts already validates images on steer and follow_up, and useAgentSession already forwards them.

Known limits

  • Images return to the composer from Stop (abort_and_restore_queue) and Edit (remove_queued_message) only with an omp carrying feat(rpc): added abort_and_restore_queue command can1357/oh-my-pi#14179, which adds both. Older omp returns only the text. A queue RPC that fails (steer, follow-up, queued slash prompt) restores its images on any omp.
  • Queue actions match messages by text, so two image-only queued messages (both [Image]) are indistinguishable to Delete, Edit, and Steer. This is the existing behavior for identical texts.

Testing

  • components/ChatInput.queue-attachments.test.mjs attaches an image and a text file during a run, then checks the steer from Enter, the follow-up from Queue with attachments only, and an expanded /goal queued with attachments. It fails on main because attaching is refused during a run.
  • npm test: 1133 passed, 0 failed. tsc --noEmit and npm run lint show no errors.
  • RPC smoke against omp 18.6.2 (--mode rpc, gemini-3.5-flash-lite), using the command shapes omp-web sends: two follow_up commands with a red PNG (one with text, one image-only) were sent while the agent was streaming. queue_update listed the text and [Image]; each delivered user message contained image/webp content, and the model answered "Red" both times.

Follow-up commit: images come back

  • A failed steer/follow-up/queued prompt, Edit on a queued message, and Stop now return images to the draft (recoverDraft in lib/draft-store.ts carries images). omp's [Image] label is never restored as text.
  • Tests: composer test for a refused follow-up; navigation Edit tests now assert the returned images survive draft-key changes and remounts; hook tests assert remove_queued_message images are parsed and Stop restores images from abort_and_restore_queue. npm test: 1134 passed, 0 failed.
  • RPC smoke against the #14179 branch (bun packages/coding-agent/src/cli.ts --mode rpc): while streaming, queued two image follow-ups and an image steer; remove_queued_message returned {removed:true, images:[1 image]}, and abort_and_restore_queue returned the steer with its image and the image-only follow-up as [Image] with its image.

omp's steer, follow_up and prompt+streamingBehavior RPC commands accept
images, so queued messages no longer need to be text-only. Allow
attaching (+ menu, paste, drag and drop) while the agent runs, fold text
files into the queued message as an idle send does, and let attachments
alone turn Stop into Queue. Edit no longer restores omp's "[Image]"
placeholder for an image-only queued message.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (da7eb34) onto upstream/main.
…ueing

A steer or follow-up omp refuses, a queued message taken back by Edit,
and the queue Stop withdraws now return their images to the draft, not
just their text. Draft recovery (recoverDraft) carries images; Stop reads
them from abort_and_restore_queue and Edit from remove_queued_message
(can1357/oh-my-pi#14179). omp's "[Image]" label is never restored as text.
The stale "queued messages remain text-only" changelog note is removed.
The composer now puts a refused steer, follow-up or queued prompt back
into the draft it was sent from, text and images together. The hook's
insertIfEmpty only restored the text, skipped it when the composer had
new typing, and could land in another session after navigation.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (453ea58) onto upstream/main.
Edit and Stop drop omp's "[Image]" label only when the entry carries
images, so a message that literally reads "[Image]" survives. Recovered
images are no longer truncated at the attachment cap; sending still
enforces it, so the user picks which to keep.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (40683b2) onto upstream/main.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (40683b2) onto upstream/main.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (40683b2) onto upstream/main.
andrebrait added a commit to andrebrait/ompweb that referenced this pull request Oct 5, 2026
…rs and follow-ups

Squashed from origin/feat/queue-attachments (40683b2) onto upstream/main.
@kahme247
kahme247 merged commit bfa0ebc into kahme247:main Oct 5, 2026
3 checks passed
kahme247 added a commit that referenced this pull request Oct 5, 2026
@andrebrait
andrebrait deleted the feat/queue-attachments branch October 6, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants