opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Easy Message Unqueue with /unqueue

Open will-marella opened this issue 1 month ago • 1 comments

Summary

Adds /unqueue slash command to remove queued messages without affecting the current assistant response.

Problem

Oftentimes after queueing a message, I decide I want to rewrite it or ask something else altogether. In these cases, I’d like to remove all queued messages from the queue.

Solution

The /unqueue command:

  • Removes queued user messages
  • Deletes them from persistent storage (clean conversation history)
  • Rejects in-memory callbacks (messages never execute)
  • Silent operation (no UI clutter)

Demo

https://github.com/user-attachments/assets/cff67730-dc3c-490e-917f-e8079e5af323


I experimented with introducing an interactable button in the TUI. (Imagine hovering over the QUEUED button and it prompts you to UNQUEUE) But this approach keeps the implementation simple and focused

will-marella avatar Dec 30 '25 00:12 will-marella

Neat. There's no way I'm typing a long command name like that by hand, though, I would want the ability to bind it to a key (although the default bindings should be "none", allowing users to bind it to a key it they so choose). Likely only requires adding a couple of lines.

ariane-emory avatar Dec 30 '25 00:12 ariane-emory

Neat. There's no way I'm typing a long command name like that by hand, though, I would want the ability to bind it to a key (although the default bindings should be "none", allowing users to bind it to a key it they so choose). Likely only requires adding a couple of lines.

You're right, that should be supported. I've updated the PR.

will-marella avatar Dec 30 '25 02:12 will-marella

this will fix #4821

Mishkun avatar Dec 30 '25 10:12 Mishkun