Skip to content

feat(chat): run a stopped or failed last turn again - #1289

Merged
leookun merged 1 commit into
mainfrom
feat/retry-turn
Nov 24, 2026
Merged

leookun merged 1 commit into
mainfrom
feat/retry-turn

Conversation

@leookun

@leookun leookun commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

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_test pass; aside_test failures are the existing #1004.

🤖 Generated with BaoCode

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>
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.

建议增加一个恢复按钮

2 participants