Skip to content

Introduced chat capabilities to Explain Code

Denys Mishunov requested to merge 406678-explain-code-chat into master

What does this MR do and why?

This MR introduces the next step in Explain Code functionality (introduced in Integrated the AIGenie component into the blob_... (!116876 - merged)) by allowing users to ask the follow-up questions after the initial code explanation and, eventually, convert the discussion into a continuous chat experience

Screenshots or screen recordings

Screenshot Video
Screenshot_2023-04-25_at_01.43.14 explain-code-chat-final

How to set up and validate locally

  1. Enable the following feature flags:
    • explain_code
    • explain_code_snippet
    • explain_code_chat this is the flag that works separately from all others and only controls the chat
    • openai_experimentation
    • ai_experimentation_api
  2. Add an OpenAI API key by following the steps in !116364 (merged)
  3. 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.
  4. Open a file containing Source Code (Note, this file should not be from the GitLab codebase).
  5. Highlight some of the Source Code.
  6. Click on the (?) button in the gutter to the left of the source code.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #407567

Edited by Denys Mishunov

Merge request reports