Integrated the AIGenie component into the blob_content_viewer
What does this MR do and why?
The MR integrates the AIGenie component introduced in Added the AiGenie component (!116875 - merged) The integration happens with protection of the two flags, introduced in Added the licenced `explain_code` flag (!117376 - merged):
- licensed to Ultimate tier feature
explain_code, and - feature flag
explain_code_snippet
Screenshots or screen recordings
| Tier | explain_code_snippet: false |
explain_code_snippet: true |
|---|---|---|
| FOSS | ![]() |
![]() |
| Premium | ![]() |
![]() |
| Ultimate | ![]() |
![]() |
How to set up and validate locally
Ultimate tier:
- Make sure to add a license to your local GDK
- Open a blob (
/flightjs/Flight/-/blob/master/lib/debug.js, for example) - Select some content within the blob. Note that there are no changes in the viewer's gutter except for the icons alignment
- Enable the
explain_code_snippetfeature flag:
pry(main)> Feature.enable(:explain_code_snippet)
- Reload the blob page and select the code block again
- Note the
❓ icon in the viewer's gutter aligned with the top line of the selected content
-
[Optional]: If you have OpenAI API key supplied to your local setup, you could:
- Enable a couple of feature flags to enable connection to Experimentation API locally:
pry(main)> Feature.enable(:ai_experimentation_api) pry(main)> Feature.enable(:openai_experimentation)- click the icon and get the explanation of the selected piece of code
Free tier:
- To simulate the Free tier, follow the instructions
- Follow the same steps as above. No matter whether you have
explain_code_snippetflag enabled or not, the❓ icon should not be available to you.
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.
Related to #403727
Edited by Denys Mishunov


