UI for code snippets in the GitLab Duo
What does this MR do and why?
The MR introduces several things related to presenting the code snippets in particular and messages in general in GitLab Duo Chat. The whole presentation of the Markdown is now delegated to the single component (ai_genie_chat_message
) to keep the architecture DRY and easier maintainable.
Screenshots or screen recordings
Before | After | |
---|---|---|
GitLab Duo Chat | ||
Explain Code |
How to set up and validate locally
- Follow the instructions to enable the AI features in your local GDK
- Follow the instructions on setting up the GitLab chat locally
- Enable the
:super_sidebar_nav
feature flag (Feature.enable(:anthropic_experimentation)
in your rails console - Enable the new super sidebar in your settings via the web interface:
- Open the GitLab chat in Help -> Ask GitLab Chat
- Ask a question that intends a response with a code snippet in it. For example:
I have a function:
```javascript
function(a) {
return a +2;
};
```
Write Jest test spec for it
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 #413210
Edited by Denys Mishunov