Skip to content

Handle user input without selected code for slash commands

Eva Kadlecová requested to merge 1468-improve-explain into master

What does this MR do and why?

This MR alters the behaviour when using slash commands in Duo Chat within the VS code extension. Previously, when a user didn't select any code and entered their own input, the response would sometimes mention that no code was selected.

Now, the chat responds directly to the input without referencing the code selection.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image.png image.png

How to set up and validate locally

  1. Connect to VS code with your local GDK instance.
  2. Run AI Gateway locally.
  3. Type /explain <text> to the Duo Chat in VS Code without selecting any code.
  4. The response should not mention <selected_code>.

Related to gitlab-vscode-extension#1468 and its parent issue gitlab-vscode-extension#1215

Edited by Eva Kadlecová

Merge request reports