Scope explain code (ai-genie) component to text files
What does this MR do and why?
Ensures that the explain code (AIGenie) component is only rendered for text file types.
Screenshots or screen recordings
| before | after |
|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Enable the following feature flags:
explain_codeexplain_code_snippetopenai_experimentationai_experimentation_api
- Add an OpenAI API key by following the steps in !116364 (merged)
- Run the following command in the root of your project:
curl https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117636.diff | git apply- This will apply changes from !117636 (merged) on which this MR relies.
- Open a file containing Source Code.
- Highlight some of the Source Code.
- Click on the
(?)button in the gutter to the left of the source code. - Open a file that is not text (Markdown).
- Highlight some of the rendered Markdown content
- Click on the
(?)button in the gutter to the left should not appear.
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.
Relates to #408182 (closed)
Edited by Denys Mishunov



