opencode
opencode copied to clipboard
feat(tui): add force push for queued messages
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:
- Press
esctwice to interrupt - Undo the queued message
- Re-enter and submit it
This is quite cumbersome.
Fixes #5770 Related: #5333, #8685
How
Added a force function that:
- Deletes session state before aborting (so the old loop's
defer()cleanup finds nothing) - Aborts the current operation
- 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.