Skip to content

feat(chat): resend a prompt from its bubble - #560

Merged
edenreich merged 1 commit into
mainfrom
feat/resend-prompt
Nov 13, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/resend-prompt

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

Every user bubble gets a Resend prompt button next to the copy button. Clicking it drops that prompt and everything after it from the conversation and sends the prompt again - what a double Esc restore does in the CLI's TUI. It is the quick way back after a run failed for a reason that has since been fixed.

Depends on inference-gateway/cli#1824, which adds the rewind_conversation frame the session worker answers. Merge and release that first: the e2e suite downloads the latest released infer, so resend-prompt.yaml fails until a release has the frame.

Changes

  • Transcript.tsx: the Resend prompt icon button on a user bubble, disabled while a run is in progress. It is added to the DOM contract in AGENTS.md.
  • store.tsx: resendPrompt asks the worker to rewind, drops the same items from the transcript and sends the prompt through the normal path. A second click while one is in flight is ignored.
  • transcript.ts: promptRef names a prompt by its text and by which of the times the user sent that text it is, since a transcript and the worker's conversation share no message ids. A rewind action drops a prompt and everything after it.
  • workspaces.rs: the rewind_conversation command, registered in generate_handler! and permissions/main-window.toml. An infer from before the frame never answers, which the app reports as an error.
  • e2e/tests/resend-prompt.yaml: deny a write, ask for a screenshot, resend the first prompt - the screenshot turn is gone and the write asks for approval again.

Notes

  • The deletion is permanent and there is no confirmation step, as in the TUI. The button's tooltip says everything after the prompt is dropped.
  • A prompt sent with an @file reference cannot be resent until the chat is reopened, because the worker stores the expanded text. The app shows an error and nothing is deleted.
  • A session on a remote workspace needs an infer with the frame in its pod.

A Resend prompt button next to the copy button drops the prompt and everything after it from the conversation and sends it again, the way the CLI message history does. It asks the session worker to rewind with the rewind_conversation frame, so it needs an infer that has that frame.
@edenreich
edenreich marked this pull request as ready for review November 13, 2026 00:49
@edenreich
edenreich merged commit 6ffdd04 into main Nov 13, 2026
7 checks passed
@edenreich
edenreich deleted the feat/resend-prompt branch November 13, 2026 00:50
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.71.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant