Add insert-code-snippet button in code blocks
What does this MR do and why?
This merge requests introduces the insert code snippet button in the highlighted code blocks. This is aimed at the support to insert code directly in the editor from a Duo Chat message.
This support for this tag as only been added in the GitLab UI library in the Duo Chat component used by editor extensions.
This merge request unblocks work for the JetBrains and VSCode extension.
- [JetBrains] Allow inserting a generated code sn... (gitlab-org/editor-extensions/gitlab-jetbrains-plugin#560 - closed)
- [VS Code] Allow inserting a generated code snip... (gitlab-vscode-extension#1422 - closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Enable Duo Chat locally.
- Enable the
enableCodeInsertion
flag on the Duo Chat component. - Send a message that should result in a response with a code block.
- Validate that the insert in code editor button is present when hovering the code block.
- Validate in notes or issues where code snippet are allowed that the button does not show up.
Edited by Jean-Gabriel Doyon