[go: up one dir, main page]

Skip to content

[IDE] Revisit Duo context menu for IDE

Problem to solve

The current context menu has a few friction points such as requiring typing /include to open the menu and not supporting inline tokens while typing a prompt. There's also several quality of life opportunities around keyboard workflows and the default menu list.

For Who: Code Author job performer
Job performer Code author
Main job Develop improvements for my application (e.g., performance, reliability, security, user experience)
Outcome Minimize the time it takes to generate or complete code using AI assistance
Methods Provide shortcuts for common actions

Where: Duo Chat in the IDE. This won't be used in Duo Chat for web.

Why: Selecting context is a frequent workflow so even small improvements will have good ROI for developer productivity and UX.

Example of current state
Current Example (May 2025)
  • No button to open menu, must type /include
  • File category only shows current file tabs and also requires user manually add sources (ie. current file and open tabs not included by default)
  • Unable to close menu by clicking away from menu
  • Hover tips are overly large and include unnecessary info
  • Back/close buttons overly prominent
  • No hotkey hints
  • Type to search doesn't work on initial menu launch
current_vscode_duochat

Design Proposal

Note

A working prototype is available for user testing and to demo keyboard interactions. It's not a final spec and uses the older IDE-first styling. The North Star designs should take priority. More details in the prototyping repo.

There's multiple teams working on Duo right now so proposed changes have been scoped and organized by risk factor and need for alignment.

High UX ROI

Change Example Issue
Ability to:
  • Open menu with a plus + button
  • Open the menu by typing + in the prompt input
Screen_Recording_2025-05-22_at_4.51.37_PM gitlab-org/gitlab#544992
Change:
  • Replace generic document icon in the context menu with language specific file icons
  • Use specific file language icons in context tokens
Screenshot_2025-05-27_at_8.48.27_PM gitlab-org/gitlab#545188
Change:
  • Send button icon to
  • Disable the send button when prompt input field is empty
Frame_1354 gitlab-org/gitlab#546312 (closed)
Ability to:
  • Immediately start typing to filter when menu launched
  • Prefix matching (e.g. "app" matches "apple," "application," etc.), Token-based matching (e.g. "blue" matches "blue shirt" and "light blue pants")
  • Have the most relevant menu item focused while filtering
  • Prefetch assigned issues and MRs so they can be filtered from global menu category
  • Prefetch N issues/MRs in current project when enter respective sub-category (e.g. Issues, MRs)
ContextMenu_filtersources gitlab-org/gitlab#546092
Change:
  • Prompt input placeholder text from Type / for slash commands to Ask anything (⌥D), + to add context
Screenshot_2025-05-27_at_8.10.32_PM gitlab-org/gitlab#546306

Moderate UX ROI

Change Example Issue
Ability to:
  • Insert inline tokens into prompt input when menu opened by typing +
Screenshot_2025-05-27_at_8.40.57_PM gitlab-org/gitlab#546248
Change:
  • Context Token tool tip layout
Screenshot_2025-05-27_at_8.12.25_PM gitlab-org/gitlab#546255
Misc. UI changes:
  • Back and close button styling to lower contrast
  • Add hotkey hints for Back/Close
Screenshot_2025-05-27_at_8.24.35_PM gitlab-org/gitlab#546263
Change:
  • Remove Included references collapsible and always show tokens above prompt input.
  • Allow tokens to be focused via keyboard (e.g. to delete with backspace)
Screenshot_2025-05-27_at_8.16.37_PM gitlab-org/gitlab#546266 (closed)
Change:
  • Menu items are single line (except for issues). If necessary, truncate file paths starting at start of the file path string
Frame_1355 gitlab-org/gitlab#546289
Ability to add a context source by drag and dropping a file from the file tree TBD

Needs more investigation:

  • Using other symbols to shortcut adding context sources (e.g. #, $)

Feedback

Open questions

  1. What new context sources will get added?

Useful links

Edited by Taylor Vanderhelm