Correct loading state after failing prompt
What does this MR do and why?
We currently only update the loading state of duo chat after the an assistant message has been sent from the backend.
In the case of banned AI, we actually never get an assistant message, but an error directly in the prompt leading to a indefinite loading state.
Now we double check that if the user message has errors
, we just set
loading to false.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
before | after |
How to set up and validate locally
- have AI working
- enable
Project.find_by_full_path('gitlab-org/gitlab-test').update(duo_features_enabled: false)
- enable
Feature.enable(:duo_features_enabled_setting)
Edited by Lukas Eipert