assistant: Fix inline assist not restarting transformation after pressing retry (#17301)

Release Notes:

- Fixed an issue where the inline assist would be dismissed even when
instructed to regenerate the transformation after an error
This commit is contained in:
Bennet Bo Fenner 2024-09-03 14:33:31 +02:00 committed by GitHub
parent 64a8b14e49
commit 32db140b95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -1794,13 +1794,16 @@ impl PromptEditor {
CodegenStatus::Pending => {
cx.emit(PromptEditorEvent::DismissRequested);
}
CodegenStatus::Done | CodegenStatus::Error(_) => {
CodegenStatus::Done => {
if self.edited_since_done {
cx.emit(PromptEditorEvent::StartRequested);
} else {
cx.emit(PromptEditorEvent::ConfirmRequested);
}
}
CodegenStatus::Error(_) => {
cx.emit(PromptEditorEvent::StartRequested);
}
}
}

View file

@ -805,13 +805,16 @@ impl PromptEditor {
CodegenStatus::Pending => {
cx.emit(PromptEditorEvent::DismissRequested);
}
CodegenStatus::Done | CodegenStatus::Error(_) => {
CodegenStatus::Done => {
if self.edited_since_done {
cx.emit(PromptEditorEvent::StartRequested);
} else {
cx.emit(PromptEditorEvent::ConfirmRequested);
}
}
CodegenStatus::Error(_) => {
cx.emit(PromptEditorEvent::StartRequested);
}
}
}