Skip to content

Stream Duo Chat slash commands responses

Alejandro Rodríguez requested to merge duo-chat-slash-command-streaming into master

What does this MR do and why?

Add streaming to responses from Duo Chat slash commands (i.e. /explain, /refactor, /tests). We put the streaming handler code in the shared concern AiDependant so we can use it everywhere is needed.

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

How to set up and validate locally

  • Create a Personal Access Token on your local instance with at least api scope
  • On VSCode with the GitLab extension (standalone app, Web IDE is not working for me): Remove all accounts, if any, from your extension. I don't know if this is needed, but if you only have credentials for your local instance you can be sure you're not reaching GitLab.com :)

Screenshot_2024-02-12_at_14.13.29

  • Add an account to the extension. Use http://127.0.0.1:3000 as your instance URL, and your access token as the credentials

Screenshot_2024-02-12_at_14.21.22

  • On the Gitlab Duo Chat tab, select some code and use one of the slash commands

Screen_Recording_2024-02-12_at_14.30.36

Closes #440310 (closed)

Edited by Alejandro Rodríguez

Merge request reports