[VS Code] Variables missing when code blocks inserted from Duo Chat suggestions
Checklist
-
I'm using the latest version of the extension (see the latest version in the right column of this page) - Extension version: v5.15.0
-
I'm using the latest VS Code version (find the latest version here) - VS Code version: 1.93.1
-
I'm using a supported version of GitLab (see README for the supported version) - GitLab version: Happens on GitLab.com
Summary
When Duo Chat returns a response that includes a code block with a variable in the format ${VAR_NAME} and the newly added insert button is used (as against copy/paste), the variables are missing in the inserted code. This was tested in WebIDE and VS Code, see conversation on Slack: https://gitlab.slack.com/archives/CMELFQS4B/p1728573581630019
Steps to reproduce
- As Duo to create a CI script that will include variables or as it to refactor an existing like the CloudFromation template at https://gitlab.com/gitlab-da/playground/abubakar/video-demos/serverless-duo/duo-lambda/-/blob/main/template.yml?ref_type=heads
- Insert any code block that contains the variable into the editor window
- Variables would be missing
- Here is a sample recording: https://drive.google.com/file/d/1PeepY2YFbuVUc2ep-hzsMPFZqvOLJlrf/view?usp=sharing
What is the current bug behavior?
Variables in Code blocks from Duo Chat's responses are missing when inserted into the Editor
What is the expected correct behavior?
Code should be inserted as is, with no part missing.
Relevant logs and/or screenshots
See video recording: https://drive.google.com/file/d/1PeepY2YFbuVUc2ep-hzsMPFZqvOLJlrf/view?usp=sharing
Screenshot:
Possible fixes
cc: @dnsmichi
Edited by Abubakar Siddiq Ango