From bdefd4ab46e878f83fc99ddc5cd83de463fbab3e Mon Sep 17 00:00:00 2001 From: Jordan Janes <jjanes@gitlab.com> Date: Mon, 7 Oct 2024 17:22:08 +0000 Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Jon Glassman <jglassman@gitlab.com> --- .../project/repository/code_suggestions/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/user/project/repository/code_suggestions/index.md b/doc/user/project/repository/code_suggestions/index.md index de080d2c0dec8..e770a439b9b45 100644 --- a/doc/user/project/repository/code_suggestions/index.md +++ b/doc/user/project/repository/code_suggestions/index.md @@ -80,8 +80,11 @@ To use Code Suggestions: 1. Describe the requirements in natural language. Code Suggestions generates functions and code snippets based on the context provided. -1. To accept a suggestion, press <kbd>Tab</kbd>. To reject a suggestion, press <kbd>Esc</kbd>. -1. To ignore a suggestion, keep typing as you usually would. +1. When you receive a suggestion, you can do any of the following: + - To accept a suggestion, press <kbd>Tab</kbd>. + - To accept a partial suggestion, press either <kbd>Control</kbd>+<kbd>Right arrow</kbd> or <kbd>Command</kbd>+<kbd>Right arrow</kbd>. + - To reject a suggestion, press <kbd>Esc</kbd>. + - To ignore a suggestion, keep typing as you usually would. AI is non-deterministic, so you may not get the same suggestion every time with the same input. To generate quality code, write clear, descriptive, specific tasks. @@ -256,12 +259,12 @@ When using Code Suggestions, [code review best practice](../../../../development Code Suggestions is powered by a generative AI model. +- For code completion, suggestions are usually low latency and take less than one second. +- For code generation, algorithms or large code blocks might take more than five seconds to generate. + Your personal access token enables a secure API connection to GitLab.com or to your GitLab instance. This API connection securely transmits a context window from your IDE/editor to the [GitLab AI Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist), a GitLab hosted service. The [gateway](../../../../development/ai_architecture.md) calls the large language model APIs, and then the generated suggestion is transmitted back to your IDE/editor. -- For code completion, suggestions are usually low latency. -- For code generation, algorithms or large code blocks might take more than 10 seconds to generate. - ### Streaming Streaming of Code Generation responses is supported in VS Code, leading to faster average response times. -- GitLab