From 950183b853f3ccc899beefd707659cf5f98a0f97 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 15 Sep 2023 12:36:50 +0200 Subject: [PATCH] Don't dismiss inline assistant when an error occurs (#2971) Release Notes: - Fixed a bug that was preventing errors from being shown in the inline assistant when it was still deployed. (preview-only) --- crates/ai/src/assistant.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/ai/src/assistant.rs b/crates/ai/src/assistant.rs index 6d4fce2f6d09de085f2e78e8f10aeaad8c0bd16c..8704d4366566a95ee72d4b9a5e60f25afc48627d 100644 --- a/crates/ai/src/assistant.rs +++ b/crates/ai/src/assistant.rs @@ -386,10 +386,12 @@ impl AssistantPanel { ); }) } + + this.finish_inline_assist(inline_assist_id, false, cx); } + } else { + this.finish_inline_assist(inline_assist_id, false, cx); } - - this.finish_inline_assist(inline_assist_id, false, cx); } }), ], @@ -2837,6 +2839,7 @@ impl InlineAssistant { cx, ); } else { + self.confirmed = false; editor.set_read_only(false); editor.set_field_editor_style( Some(Arc::new(|theme| theme.assistant.inline.editor.clone())),