Skip to content

feat: edit and remove queued messages - #109

Merged
danielkov merged 4 commits into
mainfrom
feat/edit-queued-messages
Sep 5, 2026
Merged

feat: edit and remove queued messages#109
danielkov merged 4 commits into
mainfrom
feat/edit-queued-messages

Conversation

@danielkov

@danielkov danielkov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add TUI controls to edit or remove pending injected messages without changing delivered transcript history. Edits preserve the message ID and queue position.

Technical details

Pending-message controls

F2 focuses the queue, arrow keys select a message, Enter opens the editor, and Backspace/Delete requests removal. Empty queues do not capture focus, and the selector closes automatically when the last pending message disappears. After asynchronous closure, stale send/delete keys cannot touch the parked draft until typing, pasting, cursor movement, or Esc acknowledges composer focus; normal typing remains responsive. Saving or cancelling restores the parked composer draft and attachments; newer edits survive late responses.

Mutations run asynchronously with session-generation and request/edit-token checks, keeping rendering and global shortcuts responsive during delivery races. Editing requires session.inject.pending.replace. Messages containing media remain sendable and removable, but the text-only queue editor refuses to edit them rather than discard attachments.

AgentKit integration

Wire session/replace_inject into Kit's ACP v2 server and repin agentkit-acp and agentkit-loop to AgentKit commit 8e4ee26 on feat/acp-v2-session-inject. That commit adds atomic replacement, capability advertisement, content validation, and delivery-race handling. The reviewed pin delta changes no registry packages, dependency versions, or enabled features.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queue focus can prevent bracketed paste from reaching the session rename field when the asynchronous session picker opens after F2.

Comment thread src/tui/mod.rs Outdated
kit-code-agent[bot]
kit-code-agent Bot previously approved these changes Sep 5, 2026

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatic queue closure can reinterpret a queue Enter or Backspace as submission or deletion of the parked composer draft.

Comment thread src/tui/app.rs Outdated

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

@danielkov
danielkov merged commit af4b789 into main Sep 5, 2026
5 checks passed
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