Repository navigation
feat(chat): resend a prompt from its bubble - #560
Merged
Merged
Conversation
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.
Contributor
|
🎉 This PR is included in version 0.71.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_conversationframe the session worker answers. Merge and release that first: the e2e suite downloads the latest releasedinfer, soresend-prompt.yamlfails until a release has the frame.Changes
Transcript.tsx: theResend prompticon button on a user bubble, disabled while a run is in progress. It is added to the DOM contract inAGENTS.md.store.tsx:resendPromptasks 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:promptRefnames 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. Arewindaction drops a prompt and everything after it.workspaces.rs: therewind_conversationcommand, registered ingenerate_handler!andpermissions/main-window.toml. Aninferfrom 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
@filereference cannot be resent until the chat is reopened, because the worker stores the expanded text. The app shows an error and nothing is deleted.inferwith the frame in its pod.