Skip to content

Cancel a queued message before the agent consumes it #968

Description

@realtonyyoung

What happens

A message sent while the agent is mid-turn is queued and shown in the "queued" banner above the composer in the desktop chat pane. There is no way to take it back: the banner lists queued and unconfirmed messages but offers no remove action, and nothing in the app, the local control IPC or the server hub withdraws a dispatched input.

Where it comes from

ChatTabViewModel keeps QueuedMessages (each a QueuedChatMessage, with an unconfirmed state until the lane acknowledges it) and mirrors the server's queue through PendingInputUpdate / QueuedInputItem, which carries a dispatch_id. The banner in ChatTabView.axaml renders that list read-only.

Expected

Each queued message gets a cancel control that removes it before the agent consumes it:

  • Server lane: a hub method that withdraws a queued input by dispatch_id (server change, with PendingInputChanged pushing the shrunken queue back).
  • Local lane: a new local-control frame that removes an item from the daemon's input queue, appended to FrameType and advertised through LocalControlCapabilities so an older daemon reports no such capability and the control hides.
  • Desktop: an "x" on each queued item, disabled once the item is no longer cancellable, and a clear result when the cancel lost the race with delivery.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions