[go: up one dir, main page]

Skip to content

[IDE] Revisit Duo context menu for IDE

The Problem

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 frequently repeated workflow so even small improvements will have good ROI for developer productivity and UX.

Current Example
  • 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

There's multiple instances of roadmap work across teams that could impact the original direction for revising the context menu. To minimize redundant work changes are marked by risk factor.

Low risk, do now

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#544992
Change:
  • Replace generic document icon in the context menu with language specific file icons
  • Use specific file language icons in context tokens
gitlab#545188
Change:
  • Send button icon to
  • Disable the send button when prompt input field is empty
Frame_1354
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
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
Ability to:
  • Toggle menu item selection with Enter

Some risk, needs alignment

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
Change:
  • Context Token tool tip layout
Screenshot_2025-05-27_at_8.12.25_PM
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
Change:
  • Remove Included references collapsible and always show tokens above prompt input.
Screenshot_2025-05-27_at_8.16.37_PM
Change:
  • Menu items are single line (except for issues). If necessary, truncate file paths starting at start of the file path string
Frame_1355

Higher risk, wait

Change Example

Needs more investigation:

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

Open questions

  1. What new context sources will get added?

Useful links

Edited by Taylor Vanderhelm