Do not store chat messages by default
What does this MR do and why?
Related issue: #419596 (closed)
We no longer want to store and show AI messages on the chat, if not
explicitly enabled by the feature. It is now only enabled for the chat
AI action.
We do this by setting skip_cache = true
by default.
It also fixes a bug where the skip_cache
was not passed along properly
to the GraphqlSubscriptionResponseService.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Enable AI features https://docs.gitlab.com/ee/development/ai_features.html#test-ai-features-locally
Feature.enable(:gitlab_duo, true)
- Go to a page that has AI features, e.g. Vulnerabilities, or an Issue.
- Use the AI feature, e.g. summarize issues or Explain Vulnerabilities
- Refresh the browser and Open the GitLab Duo chat
- This is a necessity to test the feature, because right now, the chat listens on the AiCompletionResponseSubscription - and adds it to the chat, regardless of the action performed. This is another problem that needs to be tackled, also see #413600 (comment 1485444913)
- Before: You'd see the answer from the AI in the chat, Now: You no longer see the response because we don't store the message for the chat.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nicolas Dular