Proposal : Code Suggestions context first iteration

Problem to solve

Currently, we don't have a way in the UI to manage context for Code Suggestions in the IDE. There are a variety of contexts we want to support, and they're a mix of automatic and manual context sources.

Proposal

As a first step for the AI Context task force, while UX is iterating on the long term solution, we can try a combination of the current UX for injected files context to manage the two categories of context for code suggestions (manual and automatic). We should provide the ability to manage files manually as well as the ability to let the user select which types of automatic context are enabled.

Today, we only support open tabs as automatic context, but eventually we'll support dependencies, import resolutions, symbols / code snippets, and possibly more.

The sketch below proposes an initial approach that can support this functionality behind a feature flag, and is intended to unblock the task force by providing an area to manage these settings. The management area would live in the Duo Chat panel, behind a "Code Suggestions" tab, which would contain the requisite settings.

image.png

Edited by 🤖 GitLab Bot 🤖