Skip to content

GitLab Chat Follow Up - Fix API URL

Zack Cuddy requested to merge gitlab-chat-fix-api-path into master

What does this MR do and why?

Fixes bug with API using a relative path rather than an absolute path.

note: Api.buildURL() handles gon.relative_url_root.

Screenshots or screen recordings

N/A

How to set up and validate locally

  • Ensure you are on GitLab Ultimate with a valid license
  • Enable Feature Flags: Feature.enable(:openai_experimentation) and Feature.enable(:tanuki_bot)
  1. Ensure the New navigation is enabled. You can enable it by clicking your User profile photo in the top right and toggle the switch
  2. Click the help link in the bottom left of the new Sidebar navigation
  3. Click Ask the GitLab Chat link
  4. Open network tab and then send request to GitLab Chat (note: the API request will likely fail 500 as it isn't easily setup for GDK yet)
  5. Ensure network request goes to ${PATH}/-/llm/tanuki_bot/ask
  6. Go to a page that has a path (IE. a Project)
  7. Follow same steps as above and ensure the network request goes to ${PATH}/-/llm/tanuki_bot/ask, ignoring the UI path

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading