opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(tui): add force push for queued messages

Open shubh73 opened this issue 22 hours ago • 1 comments

Why

When a message is queued while the session is busy, there's no way to force it to process immediately. The only workaround is to:

  1. Press esc twice to interrupt
  2. Undo the queued message
  3. Re-enter and submit it

This is quite cumbersome.

Fixes #5770 Related: #5333, #8685

How

Added a force function that:

  1. Deletes session state before aborting (so the old loop's defer() cleanup finds nothing)
  2. Aborts the current operation
  3. Starts a fresh loop that picks up the queued user message from the database

The UI shows an "enter force" hint when a queued message exists, and pressing Enter triggers the force.

Test Plan

https://github.com/user-attachments/assets/66e0d3b1-7e39-4774-b7b0-df399f6ace3a

[!NOTE]
This PR was written entirely using AI.

shubh73 avatar Jan 18 '26 12:01 shubh73