diff options
Diffstat (limited to 'doc/user/gitlab_duo_chat.md')
-rw-r--r-- | doc/user/gitlab_duo_chat.md | 183 |
1 files changed, 152 insertions, 31 deletions
diff --git a/doc/user/gitlab_duo_chat.md b/doc/user/gitlab_duo_chat.md index ebcb4c69e64..deb908444c3 100644 --- a/doc/user/gitlab_duo_chat.md +++ b/doc/user/gitlab_duo_chat.md @@ -4,37 +4,78 @@ group: Duo Chat info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Answer questions with GitLab Duo Chat **(ULTIMATE SAAS BETA)** +# GitLab Duo Chat **(ULTIMATE ALL BETA)** + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117695) as an [Experiment](../policy/experiment-beta-support.md#experiment) for SaaS in GitLab 16.0. +> - Changed to [Beta](../policy/experiment-beta-support.md#beta) for SaaS in GitLab 16.6. +> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/11251) as a [Beta](../policy/experiment-beta-support.md#beta) for self-managed in GitLab 16.8. + +GitLab Duo Chat is your personal AI-powered assistant for boosting productivity. +It can assist various tasks of your daily work with the AI-generated content. +Here are the examples of use cases: + +| Feature | Use case example | Supported interfaces | Supported deployments | +| ------------------------------------- | ---------------- | -------------------------- | --------------------- | +| [Ask about GitLab](#ask-about-gitlab) | I want to know how to create an issue in GitLab. | GitLab, VS Code, and Web IDE | GitLab.com | +| [Ask about a specific issue](#ask-about-a-specific-issue) | I want to summarize this issue. | GitLab, VS Code, and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Ask about a specific epic](#ask-about-a-specific-epic) | I want to summarize this epic. | GitLab, VS Code, and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Ask about code](#ask-about-code) | I want to understand how this code works. | GitLab, VS Code, and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Ask about CI/CD](#ask-about-cicd) | I want to create a new CI/CD pipeline configuration. | GitLab, VS Code, and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Explain code in the IDE](#explain-code-in-the-ide) | I want to understand how this code works. | VS Code and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Refactor code in the IDE](#explain-code-in-the-ide) | I want to write a test for this code. | VS Code and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | +| [Write tests in the IDE](#write-tests-in-the-ide) | I want to refactor this code. | VS Code and Web IDE | GitLab.com, self-managed, and GitLab Dedicated | + +<div class="video-fallback"> + <a href="https://youtu.be/l6vsd1HMaYA?si=etXpFbj1cBvWyj3_">View how to setup and use GitLab Duo Chat</a>. +</div> +<figure class="video-container"> + <iframe src="https://www.youtube-nocookie.com/embed/l6vsd1HMaYA?si=etXpFbj1cBvWyj3_" frameborder="0" allowfullscreen> </iframe> +</figure> -> Introduced in GitLab 16.6 as a [Beta](../policy/experiment-beta-support.md#beta). - -You can get AI-generated support from GitLab Duo Chat about: - -- How to use GitLab. -- The contents of an issue or issue. -- The contents of a code or CI/CD configuration file. - -You can also use GitLab Duo Chat to create code and CI/CD files. +NOTE: +This is a Beta feature. We're continuously extending the capabilities and reliability of the responses. -When you get an answer, you can ask follow-up questions to learn more. +## Features -This is a Beta feature. We're continuously extending the capabilities and reliability of the responses. +### Ask about GitLab -## Ask about GitLab +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117695) for SaaS in GitLab 16.0. You can ask questions about how GitLab works. Things like: - `Explain the concept of a 'fork' in a concise manner.` - `Provide step-by-step instructions on how to reset a user's password.` -## Ask about your work +NOTE: +This feature is not currently supported in self-managed instances. +See [this epic](https://gitlab.com/groups/gitlab-org/-/epics/11600) for more infomation. -You can ask about GitLab issues and epics. For example: +### Ask about a specific issue + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for SaaS in GitLab 16.0. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for self-managed in GitLab 16.8. + +You can ask about a specific GitLab issue. For example: - `Generate a summary for the issue identified via this link: <link to your issue>` -- `Generate a concise summary of the current issue.` +- When you are viewing an issue in GitLab, you can ask `Generate a concise summary of the current issue.` +- `How can I improve the description of <link to your issue> so that readers understand the value and problems to be solved?` + +### Ask about a specific epic + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128487) for SaaS in GitLab 16.3. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128487) for self-managed in GitLab 16.8. + +You can ask about a specific GitLab epic. For example: + +- `Generate a summary for the epic identified via this link: <link to your epic>` +- `Generate a concise summary of the opened epic.` +- `What are the unique use cases raised by commenters in <link to your epic>?` -## Ask about code +### Ask about code + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for SaaS in GitLab 16.1. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for self-managed in GitLab 16.8. You can also ask GitLab Duo Chat to generate code: @@ -45,13 +86,52 @@ And you can ask GitLab Duo Chat to explain code: - `Provide a clear explanation of the given Ruby code: def sum(a, b) a + b end. Describe what this code does and how it works.` -## Ask about CI/CD +### Ask about CI/CD + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/423524) for SaaS in GitLab 16.7. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/423524) for self-managed in GitLab 16.8. You can ask GitLab Duo Chat to create a CI/CD configuration: - `Create a .gitlab-ci.yml configuration file for testing and building a Ruby on Rails application in a GitLab CI/CD pipeline.` -## Ask follow up questions +### Explain code in the IDE + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for SaaS in GitLab 16.7. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for self-managed in GitLab 16.8. + +NOTE: +This feature is available in VS Code and the Web IDE only. + +`/explain` is a special command to explain the selected code in your editor. +You can also add additional instructions to be considered, for example: `/explain the performance` +See [Use GitLab Duo Chat in VS Code](#use-gitlab-duo-chat-in-vs-code) for more information. + +### Refactor code in the IDE + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for SaaS in GitLab 16.7. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for self-managed in GitLab 16.8. + +NOTE: +This feature is available in VS Code and the Web IDE only. + +`/refactor` is a special command to generate a refactoring suggestion for the selected code in your editor. +You can also add additional instructions to be considered, for example: `/refactor with ActiveRecord` +See [Use GitLab Duo Chat in the VS Code](#use-gitlab-duo-chat-in-vs-code) for more information. + +### Write tests in the IDE + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for SaaS in GitLab 16.7. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for self-managed in GitLab 16.8. + +NOTE: +This feature is available in VS Code and the Web IDE only. + +`/tests` is a special command to generate a testing suggestion for the selected code in your editor. +You can also add additional instructions to be considered, for example: `/tests using the Boost.Test framework` +See [Use GitLab Duo Chat in the VS Code](#use-gitlab-duo-chat-in-vs-code) for more information. + +### Ask follow up questions You can ask follow-up questions to delve deeper into the topic or task at hand. This helps you get more detailed and precise responses tailored to your specific needs, @@ -63,10 +143,43 @@ A follow-up to the question `Write a Ruby function that prints 'Hello, World!' w ## Enable GitLab Duo Chat +### For SaaS users + To use this feature, at least one group you're a member of must have the [experiment and beta features setting](group/manage.md#enable-experiment-and-beta-features) enabled. -## Use GitLab Duo Chat +### For self-managed users + +NOTE: +Usage of GitLab Duo Chat is governed by the [GitLab Testing Agreement](https://about.gitlab.com/handbook/legal/testing-agreement/). +Learn about [data usage when using GitLab Duo Chat](ai_features.md#data-usage). + +Prerequisites: + +- You are using GitLab version 16.8 or later. +- The Ultimate license is activated in your GitLab instance by using [cloud Licensing](https://about.gitlab.com/pricing/licensing-faq/cloud-licensing/). +- All of the users in your instance have the latest version of their IDE extension. +- You are an administrator. + +To enable GitLab Duo Chat for your self-managed GitLab instance: + +1. On the left sidebar, at the bottom, select **Admin Area**. +1. Select **Settings > General**. +1. Expand **AI-powered features** and select **Enable Experiment and Beta AI-powered features**. +1. Select **Save changes**. +1. To make sure GitLab Duo Chat works immediately, you must + [manually synchronize your subscription](#manually-synchronize-your-subscription). + +#### Manually synchronize your subscription + +You must [manually synchronize your subscription](../subscriptions/self_managed/index.md#manually-synchronize-your-subscription-details) if either: + +- You have just purchased a subscription for the Ultimate tier and have upgraded to GitLab 16.8. +- You already have a subscription for the Ultimate tier and have upgraded to GitLab 16.8. + +Without the manual synchronization, it might take up to 24 hours to activate GitLab Duo Chat on your instance. + +## Use GitLab Duo Chat in the GitLab UI 1. In the lower-left corner, select the **Help** icon. The [new left sidebar must be enabled](../tutorials/left_sidebar/index.md). @@ -84,13 +197,11 @@ To delete all previous conversations: 1. In the text box, type `/clean` and select **Send**. -## Use GitLab Duo Chat in the Web IDE and VS Code **(ULTIMATE SAAS EXPERIMENT)** +## Use GitLab Duo Chat in the Web IDE **(ULTIMATE EXPERIMENT)** > Introduced in GitLab 16.6 as an [EXPERIMENT](../policy/experiment-beta-support.md#experiment). -### Web IDE - -To use GitLab Duo Chat in the Web IDE on GitLab.com: +To use GitLab Duo Chat in the Web IDE on GitLab: 1. Open the Web IDE: 1. On the left sidebar, select **Search or go to** and find your project. @@ -107,9 +218,11 @@ To use GitLab Duo Chat in the Web IDE on GitLab.com: If you have selected code in the editor, this selection is sent along with your question to the AI. This way you can ask questions about this code selection. For instance, `Could you simplify this?`. -### GitLab Workflow extension for VS Code +## Use GitLab Duo Chat in VS Code **(ULTIMATE EXPERIMENT)** + +> Introduced in GitLab 16.6 as an [EXPERIMENT](../policy/experiment-beta-support.md#experiment). -To use GitLab Duo Chat in VS Code: +To use GitLab Duo Chat in GitLab Workflow extension for VS Code: 1. Install and set up the Workflow extension for VS Code: 1. In VS Code, download and Install the [GitLab Workflow extension for VS Code](../editor_extensions/visual_studio_code/index.md#download-the-extension). @@ -125,18 +238,26 @@ To use GitLab Duo Chat in VS Code: If you have selected code in the editor, this selection is sent along with your question to the AI. This way you can ask questions about this code selection. For instance, `Could you simplify this?`. -### Disable Chat in Web IDE and VS Code +### Perform standard task in the IDE from the context menu or by using slash commands + +Get code explained, code refactored or get tests generated for code. To do so: + +1. Select code in your editor in VS Code or in the Web IDE. +1. Type one the following slash commands into the chat field: [`/explain`](#explain-code-in-the-ide), [`/refactor`](#refactor-code-in-the-ide) or [`/tests`](#write-tests-in-the-ide). Alternatively, use the context menu to perform these tasks. -To disable GitLab Duo Chat in the Web IDE and VS Code: +When you use one of the slash commands you can also add additional instructions to be considered, for example: `/tests using the Boost.Test framework` + +### Disable Chat in VS Code + +To disable GitLab Duo Chat in VS Code: 1. Go to **Settings > Extensions > GitLab Workflow (GitLab VSCode Extension)**. 1. Clear the **Enable GitLab Duo Chat assistant** checkbox. ## Give feedback -Your feedback is important to us as we continually enhance your GitLab Duo Chat experience: - -- **Enhance Your Experience**: Leaving feedback helps us customize the Chat for your needs and improve its performance for everyone. +Your feedback is important to us as we continually enhance your GitLab Duo Chat experience. +Leaving feedback helps us customize the Chat for your needs and improve its performance for everyone. To give feedback about a specific response, use the feedback buttons in the response message. Or, you can add a comment in the [feedback issue](https://gitlab.com/gitlab-org/gitlab/-/issues/430124). |