Skip to content

feat(tui): queued follow-up messages (chain feature)#33663

Closed
theprofi wants to merge 1 commit into
anomalyco:devfrom
theprofi:feat/queue-message
Closed

feat(tui): queued follow-up messages (chain feature)#33663
theprofi wants to merge 1 commit into
anomalyco:devfrom
theprofi:feat/queue-message

Conversation

@theprofi

@theprofi theprofi commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Adds the ability to queue follow-up prompts that fire only after the current turn has fully completed (true idle), rather than the default steer behavior which can inject between provider steps.

Three prompt commands:

  • /queue <msg> — plain follow-up in the same session, after the current turn finishes.
  • /queue-com <msg> — compacts the same session first, then answers in place.
  • /queue-new <msg> — opens a brand-new standalone session and answers there.

Queue management:

  • /queue-edit-N — load queued message N into the prompt for editing.
  • /queue-remove-N — remove queued message N from the queue.

Messages chain: each waits its turn, runs to full completion, then the next runs. Mixed permutations of the three variants chain correctly.

Implementation

TUI-only; jobs are ephemeral (in-memory, lost on TUI restart, same as the upstream queue).

  • packages/tui/src/context/chain.tsx — new orchestrator context (ChainProvider / useChain) with a single-flight FIFO pump that threads a head session forward.
  • packages/tui/src/app.tsx — mounts <ChainProvider> above the session route so /queue-new navigation doesn't tear down the queue.
  • packages/tui/src/component/prompt/index.tsx — intercepts the slash commands, edit-mode handling, and renders queued jobs above the input.
  • packages/tui/src/component/prompt/autocomplete.tsx — registers the static and dynamic autocomplete entries.
  • AGENTS.md — documents the feature.

Test plan

  • /queue, /queue-com, /queue-new each fire only after the active turn completes.
  • Multiple queued messages chain in FIFO order.
  • Mixed variants (followup/compact/fresh) chain correctly.
  • /queue-edit-N edits a queued message; Esc cancels; empty input leaves unchanged.
  • /queue-remove-N removes the right job.
  • /queue-new session shows the prompt input (no parentID).

Adds /queue, /queue-com, and /queue-new prompt commands that chain
follow-up messages to fire only after the current turn fully completes,
plus /queue-edit-N and /queue-remove-N for managing the queue.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 24, 2026
@github-actions github-actions Bot closed this Jun 24, 2026
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.

1 participant