gitlab-ce/doc/user/project/repository/code_suggestions/saas.md

3.2 KiB

stage group info
Create Code Creation 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

Code Suggestions on GitLab SaaS (FREE SAAS)

Write code more efficiently by using generative AI to suggest code while you're developing.

Usage of GitLab Duo Code Suggestions is governed by the GitLab Testing Agreement. Learn about data usage when using Code Suggestions.

Enable Code Suggestions

A group owner must enable Code Suggestions for your top-level group.

NOTE: If you are having issues enabling Code Suggestions, view the troubleshooting guide.

Use Code Suggestions

Prerequisites:

To use Code Suggestions:

  1. Author your code. As you type, suggestions are displayed. Code Suggestions provide code snippets or complete the current line, depending on the cursor position.
  2. Describe the requirements in natural language. Be concise and specific. Code Suggestions generates functions and code snippets as appropriate.
  3. To accept a suggestion, press Tab.
  4. To ignore a suggestion, keep typing as you usually would.
  5. To explicitly reject a suggestion, press Esc.

Things to remember:

  • AI is non-deterministic, so you may not get the same suggestion every time with the same input.
  • Just like product requirements, writing clear, descriptive, and specific tasks results in quality generated code.

Disable Code Suggestions

Individual users can disable Code Suggestions by disabling the feature in their installed IDE editor extension.