[IDE] Make Duo Chat aware of the current file
Problem to solve
Currently, users have to manually add the current file as context (using /include
) or select lines of code when using Duo Chat in IDEs. This manual process is inefficient and doesn't align with user expectations, especially when frequently switching between different files.
Proposal
Automatically add the context of the current file when a user triggers Duo Chat. If a user selects specific lines within the file, these lines should be prioritized in the context, but the entire file should be included as well. This change aims to streamline the user experience and reduce the need for manual context selection.
- Automatic context addition: when a user opens Duo Chat, the context of the current file is automatically included without requiring manual selection
- Line selection prioritization: if a user selects specific lines within the file, these lines are prioritized in the context provided by Duo Chat
- Full file inclusion: even when specific lines are selected, the entire file is still included in the context
- Show the current file as an included reference so the user understands it's inclusion and can even remove it as a source if they choose
Nice to have
- Also include open tabs as context
Example
Intended users
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Priyanka (Platform Engineer)
- Sidney (Systems Administrator)
- Simone (Software Engineer in Test)
- Allison (Application Ops)
- Amy (Application Security Engineer)
- Isaac (Infrastructure Engineer)
- Alex (Security Operations Engineer)
Feature Usage Metrics
Tracking the usage of the context dropdown list could be a solution.
Does this feature require an audit event?
Edited by 🤖 GitLab Bot 🤖