diff --git a/src/ViewModels/AIAssistant.cs b/src/ViewModels/AIAssistant.cs index 66160067..d6eff19d 100644 --- a/src/ViewModels/AIAssistant.cs +++ b/src/ViewModels/AIAssistant.cs @@ -57,11 +57,16 @@ namespace SourceGit.ViewModels } catch (OperationCanceledException) { - // Do nothing + // Do nothing and leave `IsGenerating` to current (may already changed), so that the UI can update accordingly. + return; } catch (Exception e) { - App.RaiseException(_repo, e.Message); + builder + .AppendLine() + .AppendLine("[ERROR]") + .Append(e.Message); + Text = builder.ToString(); } IsGenerating = false;