doc/user/project/repository/code_suggestions/context.md
Different information is available to help GitLab Duo make decisions and offer suggestions.
Information can be available:
The following context is available to Code Suggestions.
.ts and .tsx files), Vue, and YAML..js, .jsx, .ts, .tsx, and .vue file types.[!note] Secrets and sensitive values that match known formats are redacted before they are used to generate code. This applies to files added by using
/include.
For more information about how Code Suggestions uses context in IDEs, see the GitLab Language Server documentation.
You can change whether or not Code Suggestions uses other files as context.
{{< history >}}
advanced_context_resolver. Disabled by default.code_suggestions_context. Disabled by default.advanced_context_resolver and code_suggestions_context enabled on GitLab.com in GitLab 17.2 and on GitLab Self-Managed in GitLab 17.4.code_suggestions_context removed.{{< /history >}}
By default, Code Suggestions uses the open files in your IDE for context when making suggestions. However, you can turn this setting off.
Prerequisites:
To change open files being used as context:
{{< tabs >}}
{{< tab title="Visual Studio Code" >}}
{{< /tab >}}
{{< tab title="JetBrains IDEs" >}}
{{< /tab >}}
{{< /tabs >}}
{{< history >}}
code_suggestions_include_context_imports. Disabled by default.code_suggestions_include_context_imports removed in GitLab 18.0.{{< /history >}}
Use the imported files in your IDE to provide context about your code project. Imported file context is supported for JavaScript and TypeScript files, including .js, .jsx, .ts, .tsx, and .vue file types.