Resolve "Web IDE should be distinguished from web UI in Duo Chat slash commands dashboard"

What does this MR do and why?

Solves the problem where web IDE and web were not distinguished separately in snowplow logs.

References

The MR that caused the initial problem !170643 (merged)

MR acceptance checklist

Screenshots or screen recordings

N/A

How to set up and validate locally

Prerequisite

Have Duo chat on web IDE working locally

Validation steps

We won't be able to test directly, because snowplow micro gives an error when running GDK with HTTPS. But that is required to run Duo Chat on web IDE locally.

We can add a print statement here, something like:

puts("here is the client", determine_client(ai_message))

And run gdk tail rails-background-jobs to look for the logged output.

Web IDE scenario:

  • Go to Duo Chat on web IDE and ask a question
  • You should see that the client in the logs is web_ide
  • Reset terminal to get a clear screen of logs

Web scenario

  • Go to Duo Chat on any page on web and ask a question
  • You should see that the client in the logs is 'web'

Related to #513340 (closed)

Edited by Lesley Razzaghian

Merge request reports

Loading