[VS] Duo Chat click to open context items within IDE
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Note this will involve duo-ui and VSCode (and other IDEs once they enable context features) changes, so can be converted to an epic when scheduled. The duo-ui changes will need to be completed before IDE changes can be done.
Summary
When a chat message has some pinned context items attached (e.g. a file, MR, issue), there is currently no way to interact with those items natively within the IDE.
What is the current behavior?
When a context item has been selected in Duo chat, it is either not clickable at all (merge requests, issues context categories) or when clicking it opens a modal within the webview for displaying the item content (file, git diff, dependencies).
The webview modal is not a great experience, because
- it is limited in width to the size of the panel, which is often small. This is less than ideal for reading code, viewing a git diff etc
- The user is already in an IDE specifically designed for working with code, diffs etc
😅 and everywhere else files are referenced, clicking them takes you to the actual file in the editor.
What is the expected correct behavior?
Clicking on a context item uses the native IDE feature to display the context item:
-
filecontext item opens the file in the IDE instead of the modal -
issue,merge_requestitems open the existing VSCode webview tab for these items (the same as if you used the Workflow tab to find an issue/MR)
-
local_git(need to research feasibility / options with vscode APIs) - opens the diff in a native vscode diff view -
dependenciesremains unchanged, since this is a custom JSON data structure and there is nothing directly to link to
We still should keep the existing view-in-webview-modal functionality, so that if the new context UI is ever integrated into the gitlab webapp, they have this behaviour where linking to native IDE functionality is not possible. We will need a way to "opt-in" to native features.
