diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rs index bedd7e610f656fedf5f0973fd0f22ed4c44c4971..87bccee8ea6213800da7d6ad9c564ed17abe9ee0 100644 --- a/crates/assistant/src/inline_assistant.rs +++ b/crates/assistant/src/inline_assistant.rs @@ -1219,7 +1219,8 @@ impl EventEmitter for PromptEditor {} impl Render for PromptEditor { fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement { let gutter_dimensions = *self.gutter_dimensions.lock(); - let buttons = match &self.codegen.read(cx).status { + let status = &self.codegen.read(cx).status; + let buttons = match status { CodegenStatus::Idle => { vec![ IconButton::new("cancel", IconName::Close) @@ -1272,7 +1273,7 @@ impl Render for PromptEditor { .on_click( cx.listener(|_, _, cx| cx.emit(PromptEditorEvent::CancelRequested)), ), - if self.edited_since_done { + if self.edited_since_done || matches!(status, CodegenStatus::Error(_)) { IconButton::new("restart", IconName::RotateCw) .icon_color(Color::Info) .shape(IconButtonShape::Square)