Skip to content

DuoChat: Duo chat will update the description of an MR if open on separate tab.

Checklist

Summary

When editing an MR description in a separate tab, if you ask Duo Chat a question, the question asked and the answer from Duo Chat will be written into the open MR description editor page.

Related discussion on Slack (internal):

Related gitlab.com issue:

Steps to reproduce

Reproduction Path 1

  1. From gitlab UI, start editing the description of a MR
  2. Leave the MR open in edit mode, then open Duo Chat inside of VS code
  3. Highlight some code and use the /explain command, note Duo responds in the chat
  4. Go back to the MR you were editing and note that the Duo response was also added in there

Note: This behavior doesn't seem to be specific to slash commands. If you are editing an MR, then anything you type in Duo Chat in VS Code and anything Duo says will be put into the MR description as well.

Reproduction Path 2

  1. From gitlab UI, go to an MR and Open the code in the Web IDE
  2. From gitlab UI, start editing the description of the MR
  3. Leave the MR open in edit mode, go back to the Web IDE page
  4. Highlight some code and use the /explain command, note Duo responds in the chat
  5. Go back to the MR you were editing and note that the Duo response was also added in there

Things To Note

  1. The code you are editing both in the VSCode IDE and the WebIDE must be within the same project as the MR that you are editing.

What is the current bug behavior?

When asking Duo Chat a question while having an MR page open and in edit mode, it will input the Duo Chat question asked and the response into the MR description that is being edited on a seperate tab in the web browser.

What is the expected correct behavior?

Duo Chat requests and responses should not update the MR description at all.

Relevant logs and/or screenshots

Recording_Of_Bug

Possible fixes

  • The current fix that is going to be put in place for this is to remove the resourceId from within the sendAiAction method.
Edited by Dillon Wheeler