Repository navigation
feat(chat): run a stopped or failed last turn again - #1289
Merged
Merged
Conversation
The last turn, stopped or ended on an error, has a button beside its copy and fork ones (Run this turn again): the conversation goes back to its message and sends it again as it was, as an unchanged edit would, without a "continue" message of the user's in between. The model can be changed first. As with an edit, the user is asked whether the files the turn changed go back. Fixes #1251 Co-Authored-By: BaoCode <noreply@baocode.dev>
Closed
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.
Fixes #1251
When the conversation's last turn was stopped (
lastTurnInterrupted) or ended with an error notice, its footer gets a Run this turn again (重试本轮) button next to copy/fork. It rewinds to that turn's user message and resends it unchanged through the existing edit path (ChatSession.editMessage→rewind_conversation), so no extra "continue" message appears. The user can switch models before pressing it. The files prompt is the same as for an edit (askRewindFiles). Only shown when the kernel can rewind and nothing is running.Tests: new
test/chat/retry_turn_test.dart(no button after a finished turn; after a stop the button rewinds to that message and resends it, leaving['first', 'second']).turn_footer_test,item_appear_testpass;aside_testfailures are the existing #1004.🤖 Generated with BaoCode